Lots more work on making RTL layout work

This commit is contained in:
Tom Hughes 2011-07-02 01:00:51 +01:00
parent 6234436cb8
commit d075fc4c1f
20 changed files with 702 additions and 293 deletions

View file

@ -1,4 +1,4 @@
<%= user_thumbnail diary_comment.user, :style => "float: right" %>
<%= user_thumbnail diary_comment.user %>
<h4 id="comment<%= diary_comment.id %>"><%= t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at, :format => :friendly)) %></h4>
<%= htmlize(diary_comment.body) %>
<% if_administrator(:span) do %>

View file

@ -1,2 +1,2 @@
<%= user_thumbnail diary_list_entry.user, :style => "float: right" %>
<%= user_thumbnail diary_list_entry.user %>
<%= render :partial => "diary_entry", :object => diary_list_entry %>

View file

@ -1,41 +1,42 @@
<% if @this_user %>
<%= user_image @this_user, :style => "float: right" %>
<% end %>
<h2><%= h(@title) %></h2>
<% if @this_user %>
<% if_user(@this_user) do %>
<%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
<div id="diary_list">
<% if @this_user %>
<%= user_image @this_user %>
<% end %>
<% else %>
<% if_logged_in do %>
<%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
<% end %>
<% end %>
<% if @entries.empty? %>
<p><%= t 'diary_entry.list.no_entries' %></p>
<% else %>
<p><%= t 'diary_entry.list.recent_entries' %></p>
<hr />
<h2><%= h(@title) %></h2>
<% if @this_user %>
<%= render :partial => 'diary_entry', :collection => @entries %>
<% if_user(@this_user) do %>
<%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
<% end %>
<% else %>
<%= render :partial => 'diary_list_entry', :collection => @entries %>
<% if_logged_in do %>
<%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
<% end %>
<% end %>
<%= link_to t('diary_entry.list.older_entries'), { :page => @entry_pages.current.next, :language => params[:language] } if @entry_pages.current.next %>
<% if @entry_pages.current.next and @entry_pages.current.previous %>|<% end %>
<%= link_to t('diary_entry.list.newer_entries'), { :page => @entry_pages.current.previous, :language => params[:language] } if @entry_pages.current.previous %>
<% if @entries.empty? %>
<p><%= t 'diary_entry.list.no_entries' %></p>
<% else %>
<p><%= t 'diary_entry.list.recent_entries' %></p>
<br />
<% end %>
<hr />
<%= rss_link_to :action => 'rss', :language => params[:language] %>
<% if @this_user %>
<%= render :partial => 'diary_entry', :collection => @entries %>
<% else %>
<%= render :partial => 'diary_list_entry', :collection => @entries %>
<% end %>
<%= link_to t('diary_entry.list.older_entries'), { :page => @entry_pages.current.next, :language => params[:language] } if @entry_pages.current.next %>
<% if @entry_pages.current.next and @entry_pages.current.previous %>|<% end %>
<%= link_to t('diary_entry.list.newer_entries'), { :page => @entry_pages.current.previous, :language => params[:language] } if @entry_pages.current.previous %>
<br />
<% end %>
<%= rss_link_to :action => 'rss', :language => params[:language] %>
</div>
<% content_for :head do %>
<%= auto_discovery_link_tag :atom, :action => 'rss', :language => params[:language] %>

View file

@ -1,26 +1,28 @@
<%= user_image @entry.user, :style => "float: right" %>
<div id="diary_entry">
<%= user_image @entry.user %>
<h2><%= link_to t('diary_entry.view.user_title', :user => h(@entry.user.display_name)), :action => :list %></h2>
<h2><%= link_to t('diary_entry.view.user_title', :user => h(@entry.user.display_name)), :action => :list %></h2>
<%= render :partial => 'diary_entry', :object => @entry %>
<%= render :partial => 'diary_entry', :object => @entry %>
<a id="comments"></a>
<a id="comments"></a>
<%= render :partial => 'diary_comment', :collection => @entry.visible_comments %>
<%= render :partial => 'diary_comment', :collection => @entry.visible_comments %>
<% if_logged_in(:div) do %>
<h4 id="newcomment"><%= t 'diary_entry.view.leave_a_comment' %></h4>
<% if_logged_in(:div) do %>
<h4 id="newcomment"><%= t 'diary_entry.view.leave_a_comment' %></h4>
<%= error_messages_for 'diary_comment' %>
<%= error_messages_for 'diary_comment' %>
<% form_for :diary_comment, @diary_comment, :url => { :action => 'comment' } do |f| %>
<%= f.text_area :body, :cols => 80, :rows => 5 %>
<br />
<br />
<%= submit_tag t('diary_entry.view.save_button') %>
<% form_for :diary_comment, @diary_comment, :url => { :action => 'comment' } do |f| %>
<%= f.text_area :body, :cols => 80, :rows => 5 %>
<br />
<br />
<%= submit_tag t('diary_entry.view.save_button') %>
<% end %>
<% end %>
<% end %>
<% if_not_logged_in(:div) do %>
<h4 id="newcomment"><%= t("diary_entry.view.login_to_leave_a_comment", :login_link => link_to(t("diary_entry.view.login"), :controller => 'user', :action => 'login', :referer => request.request_uri)) %></h4>
<% end %>
<% if_not_logged_in(:div) do %>
<h4 id="newcomment"><%= t("diary_entry.view.login_to_leave_a_comment", :login_link => link_to(t("diary_entry.view.login"), :controller => 'user', :action => 'login', :referer => request.request_uri)) %></h4>
<% end %>
</div>

View file

@ -6,6 +6,7 @@
<%= javascript_include_tag 'menu' %>
<!--[if lt IE 7]><%= javascript_include_tag 'pngfix' %><![endif]--> <!-- thanks, microsoft! -->
<%= stylesheet_link_tag 'common' %>
<%= stylesheet_link_tag t('html.dir') %>
<!--[if IE]><%= stylesheet_link_tag 'large', :media => "screen" %><![endif]--> <!-- IE is totally broken with CSS media queries -->
<%= stylesheet_link_tag 'small', :media => "only screen and (max-width:641px)" %>
<%= stylesheet_link_tag 'large', :media => "screen and (min-width: 642px)" %>

View file

@ -5,15 +5,15 @@
<% form_for :message, :url => { :action => "new", :display_name => @to_user.display_name } do |f| %>
<table>
<tr valign="top">
<th><%= t'message.new.subject' %></th>
<td class="fieldName"><%= t'message.new.subject' %></td>
<td><%= f.text_field :title, :size => 60, :value => @subject %></td>
</tr>
<tr valign="top">
<th><%= t'message.new.body' %></th>
<td class="fieldName"><%= t'message.new.body' %></td>
<td><%= f.text_area :body, :cols => 80, :value => @body %></td>
</tr>
<tr>
<th></th>
<td></td>
<td><%= submit_tag t('message.new.send_button') %></td>
</tr>
</table>

View file

@ -4,17 +4,17 @@
<table>
<tr>
<th align="right"><%= t'message.read.from' %></th>
<th class="fieldName"><%= t'message.read.from' %></th>
<td><%= link_to h(@message.sender.display_name), :controller => 'user', :action => 'view', :display_name => @message.sender.display_name %></td>
<td rowspan="4" valign="top"><%= user_thumbnail @message.sender %></td>
</tr>
<tr>
<th align="right"><%= t'message.read.subject' %></th>
<th class="fieldName"><%= t'message.read.subject' %></th>
<td><%= h(@message.title) %></td>
<td></td>
</tr>
<tr>
<th align="right"><%= t'message.read.date' %></th>
<th class="fieldName"><%= t'message.read.date' %></th>
<td><%= l @message.sent_on, :format => :friendly %></td>
<td></td>
</tr>
@ -41,17 +41,17 @@
<table>
<tr>
<th align="right"><%= t'message.read.to' %></th>
<th class="fieldName"><%= t'message.read.to' %></th>
<td><%= link_to h(@message.recipient.display_name), :controller => 'user', :action => 'view', :display_name => @message.recipient.display_name %></td>
<td rowspan="4" valign="top"><%= user_thumbnail @message.recipient %></td>
</tr>
<tr>
<th align="right"><%= t'message.read.subject' %></th>
<th class="fieldName"><%= t'message.read.subject' %></th>
<td><%= h(@message.title) %></td>
<td></td>
</tr>
<tr>
<th align="right"><%= t'message.read.date' %></th>
<th class="fieldName"><%= t'message.read.date' %></th>
<td><%= l @message.sent_on, :format => :friendly %></td>
<td></td>
</tr>

View file

@ -1,8 +1,8 @@
<div id="sidebar">
<table class="sidebar_title" width="100%">
<tr>
<td align="left" id="sidebar_title"><% t 'site.sidebar.search_results' %></td>
<td align="right"><a href="javascript:closeSidebar()"><%= t 'site.sidebar.close' %></a></td>
<td id="sidebar_title"><% t 'site.sidebar.search_results' %></td>
<td id="sidebar_close"><a href="javascript:closeSidebar()"><%= t 'site.sidebar.close' %></a></td>
</tr>
</table>
<div id="sidebar_content">

View file

@ -1,4 +1,4 @@
<p style="float: right">
<p id="cc_logo">
<%= link_to(
image_tag("cc_button.png",
:alt => t('layouts.license.alt'),

View file

@ -17,16 +17,15 @@
</noscript>
<div id="map">
<div id="permalink">
<a href="/" id="permalinkanchor"><%= t 'site.index.permalink' %></a><br/>
<a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a>
</div>
</div>
<iframe id="linkloader" style="display: none">
</iframe>
<div id="permalink">
<a href="/" id="permalinkanchor"><%= t 'site.index.permalink' %></a><br/>
<a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a>
</div>
<div id="attribution">
<table width="100%">
<tr>
@ -256,7 +255,11 @@ end
sidebar_width = sidebar_width + 5
}
<% if t('html.dir') == "ltr" -%>
$("map").style.left = (sidebar_width) + "px";
<% else -%>
$("map").style.right = (sidebar_width) + "px";
<% end -%>
$("map").style.width = ($("content").offsetWidth - sidebar_width) + "px";
$("map").style.height = ($("content").offsetHeight - 2) + "px";

View file

@ -4,10 +4,10 @@
<% form_for :trace, @trace, :url => { :action => "create" }, :html => { :multipart => true } do |f| %>
<table>
<tr><td align="right"><%= t'trace.trace_form.upload_gpx' %></td><td><%= f.file_field :gpx_file, :size => 50, :maxlength => 255 %></td></tr>
<tr><td align="right"><%= t'trace.trace_form.description' %></td><td><%= f.text_field :description, :size => 50, :maxlength => 255 %></td></tr>
<tr><td align="right"><%= t'trace.trace_form.tags' %></td><td><%= f.text_field :tagstring, :size => 50, :maxlength => 255 %> (<%= t'trace.trace_form.tags_help' %>)</td></tr>
<tr><td align="right"><%= t'trace.trace_form.visibility' %></td><td><%= f.select :visibility, [[t('trace.visibility.private'),"private"],[t('trace.visibility.public'),"public"],[t('trace.visibility.trackable'),"trackable"],[t('trace.visibility.identifiable'),"identifiable"]] %> <span class="minorNote">(<a href="<%= t'trace.trace_form.visibility_help_url' %>"><%= t'trace.trace_form.visibility_help' %></a>)</span></td></tr>
<tr><td class="fieldName"><%= t'trace.trace_form.upload_gpx' %></td><td><%= f.file_field :gpx_file, :size => 50, :maxlength => 255 %></td></tr>
<tr><td class="fieldName"><%= t'trace.trace_form.description' %></td><td><%= f.text_field :description, :size => 50, :maxlength => 255 %></td></tr>
<tr><td class="fieldName"><%= t'trace.trace_form.tags' %></td><td><%= f.text_field :tagstring, :size => 50, :maxlength => 255 %> (<%= t'trace.trace_form.tags_help' %>)</td></tr>
<tr><td class="fieldName"><%= t'trace.trace_form.visibility' %></td><td><%= f.select :visibility, [[t('trace.visibility.private'),"private"],[t('trace.visibility.public'),"public"],[t('trace.visibility.trackable'),"trackable"],[t('trace.visibility.identifiable'),"identifiable"]] %> <span class="minorNote">(<a href="<%= t'trace.trace_form.visibility_help_url' %>"><%= t'trace.trace_form.visibility_help' %></a>)</span></td></tr>
<tr><td></td><td><%= submit_tag t('trace.trace_form.upload_button') %> | <a href="<%= t'trace.trace_form.help_url' %>"><%= t'trace.trace_form.help' %></a></td></tr>
</table>
<% end %>

View file

@ -1,5 +1,5 @@
<div class="user_popup">
<%= user_thumbnail popup, :style => "float :left" %>
<%= user_thumbnail popup %>
<p><%= t('user.popup.' + type) %></p>
<p><%= link_to popup.display_name, :controller => "user", :action => "view", :display_name => popup.display_name %></p>
</div>

View file

@ -113,7 +113,7 @@
<td></td>
<td>
<p><%= t 'user.account.update home location on click' %> <input type="checkbox" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" /> </p>
<div id="map" class="user_map" style="border:1px solid black; position:relative; width:500px; height:400px;"></div>
<div id="map" class="user_map"></div>
</td>
</tr>

View file

@ -1,125 +1,127 @@
<%= user_image @this_user, :style => "float: right" %>
<div id="user_details">
<%= user_image @this_user %>
<h2><%= h(@this_user.display_name) %>
<h2><%= h(@this_user.display_name) %>
<% UserRole::ALL_ROLES.each do |role| %>
<% if @user and @user.administrator? %>
<% if @this_user.has_role? role %>
<%= link_to(image_tag("roles/#{role}.png", :size => "20x20", :border => 0, :alt => t("user.view.role.revoke.#{role}"), :title => t("user.view.role.revoke.#{role}")), :controller => 'user_roles', :action => 'revoke', :display_name => @this_user.display_name, :role => role) %>
<% UserRole::ALL_ROLES.each do |role| %>
<% if @user and @user.administrator? %>
<% if @this_user.has_role? role %>
<%= link_to(image_tag("roles/#{role}.png", :size => "20x20", :border => 0, :alt => t("user.view.role.revoke.#{role}"), :title => t("user.view.role.revoke.#{role}")), :controller => 'user_roles', :action => 'revoke', :display_name => @this_user.display_name, :role => role) %>
<% else %>
<%= link_to(image_tag("roles/blank_#{role}.png", :size => "20x20", :border => 0, :alt => t("user.view.role.grant.#{role}"), :title => t("user.view.role.grant.#{role}")), :controller => 'user_roles', :action => 'grant', :display_name => @this_user.display_name, :role => role) %>
<% end %>
<% elsif @this_user.has_role? role %>
<%= image_tag("roles/#{role}.png", :size => "20x20", :border => 0, :alt => t("user.view.role.#{role}"), :title => t("user.view.role.#{role}")) %>
<% end %>
<% end %></h2>
<div id="userinformation">
<% if @user and @this_user.id == @user.id %>
<!-- Displaying user's own profile page -->
<%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
|
<%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
|
<%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
|
<%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
|
<%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
|
<%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %>
|
<%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %>
<% if @user and @user.moderator? %>
| <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %>
<% end %>
<% else %>
<%= link_to(image_tag("roles/blank_#{role}.png", :size => "20x20", :border => 0, :alt => t("user.view.role.grant.#{role}"), :title => t("user.view.role.grant.#{role}")), :controller => 'user_roles', :action => 'grant', :display_name => @this_user.display_name, :role => role) %>
<!-- Displaying another user's profile page -->
<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %>
|
<%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
|
<%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
|
<%= link_to t('user.view.traces'), :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %>
|
<% if @user and @user.is_friends_with?(@this_user) %>
<%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
<% else %>
<%= link_to t('user.view.add as friend'), :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>
<% end %>
|
<%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %>
<% if @this_user.moderator? %>
| <%= link_to t('user.view.moderator_history'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @this_user.display_name %>
<% end %>
<% if @user and @user.moderator? %>
| <%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %>
<% end %>
<% end %>
<% elsif @this_user.has_role? role %>
<%= image_tag("roles/#{role}.png", :size => "20x20", :border => 0, :alt => t("user.view.role.#{role}"), :title => t("user.view.role.#{role}")) %>
<% end %>
<% end %></h2>
<div id="userinformation">
<% if @user and @this_user.id == @user.id %>
<!-- Displaying user's own profile page -->
<%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
|
<%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
|
<%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
|
<%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
|
<%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
|
<%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %>
|
<%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %>
<% if @user and @user.moderator? %>
| <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %>
<% end %>
<% else %>
<!-- Displaying another user's profile page -->
<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %>
|
<%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
|
<%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
|
<%= link_to t('user.view.traces'), :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %>
|
<% if @user and @user.is_friends_with?(@this_user) %>
<%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
<% else %>
<%= link_to t('user.view.add as friend'), :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>
<% end %>
|
<%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %>
<% if @this_user.moderator? %>
| <%= link_to t('user.view.moderator_history'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @this_user.display_name %>
<% end %>
<% if @user and @user.moderator? %>
| <%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %>
<% end %>
<% end %>
<% if @user and @user.administrator? %>
<br/>
<% if ["active", "confirmed"].include? @this_user.status %>
<%= link_to t('user.view.deactivate_user'), {:controller => 'user', :action => 'set_status', :status => 'pending', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% elsif ["pending"].include? @this_user.status %>
<%= link_to t('user.view.activate_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% end %>
<% if ["active", "suspended"].include? @this_user.status %>
<%= link_to t('user.view.confirm_user'), {:controller => 'user', :action => 'set_status', :status => 'confirmed', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% end %>
<% if ["pending", "active", "confirmed", "suspended"].include? @this_user.status %>
<%= link_to t('user.view.hide_user'), {:controller => 'user', :action => 'set_status', :status => 'deleted', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% else %>
<%= link_to t('user.view.unhide_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% end %>
<%= link_to t('user.view.delete_user'), {:controller => 'user', :action => 'delete', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %>
<% end %>
</div>
<p><b><%= t 'user.view.mapper since' %></b> <%= l @this_user.creation_time, :format => :friendly %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %></p>
<% if @user and @user.administrator? %>
<p><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></p>
<p><b><%= t 'user.view.created from' %></b> <%= @this_user.creation_ip %></p>
<p><b><%= t 'user.view.status' %></b> <%= @this_user.status.capitalize %></p>
<p><b><%= t 'user.view.spam score' %></b> <%= @this_user.spam_score %></p>
<% end %>
<h3><%= t 'user.view.description' %></h3>
<div id="description"><%= htmlize(@this_user.description) %></div>
<% if @user and @this_user.id == @user.id %>
<div id="map" class="user_map" style="border: 1px solid black; position: relative; width: 400px; height: 400px; float: right;">
<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
<p style="position: absolute; top: 0; bottom: 0; width: 90%; height: 30%; margin: auto 5%">
<%= t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name) %>
</p>
<% else %>
<%= render :partial => 'map', :locals => { :setting_location => false, :show_other_users => true } %>
<% if @user and @user.administrator? %>
<br/>
<% if ["active", "confirmed"].include? @this_user.status %>
<%= link_to t('user.view.deactivate_user'), {:controller => 'user', :action => 'set_status', :status => 'pending', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% elsif ["pending"].include? @this_user.status %>
<%= link_to t('user.view.activate_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% end %>
<% if ["active", "suspended"].include? @this_user.status %>
<%= link_to t('user.view.confirm_user'), {:controller => 'user', :action => 'set_status', :status => 'confirmed', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% end %>
<% if ["pending", "active", "confirmed", "suspended"].include? @this_user.status %>
<%= link_to t('user.view.hide_user'), {:controller => 'user', :action => 'set_status', :status => 'deleted', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% else %>
<%= link_to t('user.view.unhide_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
<% end %>
<%= link_to t('user.view.delete_user'), {:controller => 'user', :action => 'delete', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %>
<% end %>
</div>
<% friends = @this_user.friends.collect { |f| f.befriendee } %>
<% nearby = @this_user.nearby - friends %>
<p><b><%= t 'user.view.mapper since' %></b> <%= l @this_user.creation_time, :format => :friendly %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %></p>
<h3 style="margin-top: 0"><%= t 'user.view.your friends' %></h3>
<% if friends.empty? %>
<%= t 'user.view.no friends' %>
<% else %>
<table id="friends">
<%= render :partial => "contact", :collection => friends %>
</table>
<% if @user and @user.administrator? %>
<p><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></p>
<p><b><%= t 'user.view.created from' %></b> <%= @this_user.creation_ip %></p>
<p><b><%= t 'user.view.status' %></b> <%= @this_user.status.capitalize %></p>
<p><b><%= t 'user.view.spam score' %></b> <%= @this_user.spam_score %></p>
<% end %>
<h3><%= t 'user.view.nearby users' %></h3>
<h3><%= t 'user.view.description' %></h3>
<% if nearby.empty? %>
<%= t 'user.view.no nearby users' %>
<% else %>
<table id="nearbyusers">
<%= render :partial => "contact", :collection => nearby %>
</table>
<div id="description"><%= htmlize(@this_user.description) %></div>
<% if @user and @this_user.id == @user.id %>
<div id="map" class="user_map">
<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
<p style="position: absolute; top: 0; bottom: 0; width: 90%; height: 30%; margin: auto 5%">
<%= t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name) %>
</p>
<% else %>
<%= render :partial => 'map', :locals => { :setting_location => false, :show_other_users => true } %>
<% end %>
</div>
<% friends = @this_user.friends.collect { |f| f.befriendee } %>
<% nearby = @this_user.nearby - friends %>
<h3 style="margin-top: 0"><%= t 'user.view.your friends' %></h3>
<% if friends.empty? %>
<%= t 'user.view.no friends' %>
<% else %>
<table id="friends">
<%= render :partial => "contact", :collection => friends %>
</table>
<% end %>
<h3><%= t 'user.view.nearby users' %></h3>
<% if nearby.empty? %>
<%= t 'user.view.no nearby users' %>
<% else %>
<table id="nearbyusers">
<%= render :partial => "contact", :collection => nearby %>
</table>
<% end %>
<% end %>
<% end %>
</div>

View file

@ -1373,11 +1373,11 @@ en:
heading: "The user %{user} does not exist"
body: "Sorry, there is no user with the name %{user}. Please check your spelling, or maybe the link you clicked is wrong."
trace_form:
upload_gpx: "Upload GPX File"
description: "Description"
tags: "Tags"
upload_gpx: "Upload GPX File:"
description: "Description:"
tags: "Tags:"
tags_help: "comma delimited"
visibility: "Visibility"
visibility: "Visibility:"
visibility_help: "what does this mean?"
visibility_help_url: "http://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces"
upload_button: "Upload"

View file

@ -2,14 +2,6 @@
/* Default rules for the body of every page */
html body {
text-align: left;
}
html[dir='rtl'] body {
text-align: right;
}
body {
font-family: Arial,sans-serif;
color: #000;
@ -93,7 +85,9 @@ hr {
-moz-border-radius: 5px;
}
#intro p { margin: 5px; }
#intro p {
margin: 5px;
}
/*
* Rules for alert boxes shown in the left sidebar when important
@ -108,7 +102,6 @@ hr {
border: 1px solid #ccc;
background: #d00;
line-height: 1.2em;
text-align: left;
font-size: 14px;
border-radius: 5px;
-moz-border-radius: 5px;
@ -127,7 +120,6 @@ hr {
border: 1px solid #ccc;
background: #ea0;
line-height: 1.2em;
text-align: left;
font-size: 14px;
border-radius: 5px;
-moz-border-radius: 5px;
@ -141,7 +133,6 @@ hr {
margin: 5px;
padding: 5px;
border: 1px solid #ccc;
left: 0px;
background: #ddd;
line-height: 1.2em;
font-size: 14px;
@ -150,42 +141,25 @@ hr {
-moz-border-radius: 5px;
}
html[dir='rtl'] .left_menu {
right: 0;
text-align: right;
}
.left_menu td {
font-size: 12px;
padding-right: 4px;
}
.left_menu h1 {
font-style: normal;
font-size: 15px;
padding: 0em 0em 0em 1em;
text-align: left;
}
.left_menu ul {
padding-left: 0px;
margin: 0px;
list-style-type: none;
}
html[dir='rtl'] .left_menu ul {
padding-right: 0px;
}
.left_menu li {
margin: 0px;
padding: 0px;
}
.left_menu img {
margin: 2px 8px 0px 0px;
}
.left_menu a {
color: #000;
}
@ -213,9 +187,7 @@ html[dir='rtl'] .left_menu ul {
margin: 5px;
padding: 5px;
border: 1px solid #ccc;
left: 0px;
line-height: 1.2em;
/* text-align: left; */
font-size: 12px;
background: #eee;
border-radius: 5px;
@ -235,7 +207,6 @@ html[dir='rtl'] .left_menu ul {
.whereami {
line-height: 22px;
vertical-align: bottom;
float: right;
}
.search_container {
@ -294,16 +265,10 @@ html[dir='rtl'] .left_menu ul {
{
height: 20px;
margin: 0px;
padding-left: 215px;
padding-top: 5px;
background: url('../images/tab_bottom.gif') repeat-x bottom;
}
html[dir='rtl'] #tabnav {
padding-left: 0;
padding-right: 215px;
}
#tabnav li
{
margin: 0px;
@ -312,19 +277,13 @@ html[dir='rtl'] #tabnav {
list-style-type: none;
}
html[dir='rtl'] #tabnav li {
float: right;
}
#tabnav a, #tabnav a:link, #tabnav a:visited
{
float: left;
background: #f3f3f3;
font-size: 13px;
line-height: 14px;
font-weight: bold;
padding: 2px 10px;
margin-right: 4px;
border: 1px solid #ccc;
text-decoration: none;
color: #333;
@ -356,21 +315,14 @@ html[dir='rtl'] #tabnav li {
/* Rules for greeting bar in the top right corner */
#greeting {
float: right;
height: 20px;
margin: 0px;
padding-right: 10px;
padding-top: 5px;
font-size: 13px;
line-height: 14px;
background: url('../images/tab_bottom.gif') repeat-x bottom;
}
html[dir='rtl'] #greeting {
float: left;
padding-left: 10px;
}
.greeting-bar-unread {
font-weight: bold;
}
@ -381,7 +333,6 @@ html[dir='rtl'] #greeting {
z-index: 20000000;
position: absolute;
top: 15px;
left: 15px
}
/* Rules for OpenLayers maps */
@ -391,8 +342,6 @@ html[dir='rtl'] #greeting {
border: 1px solid black;
margin: 0px;
padding: 0px;
left: 0px;
right: 2px;
top: 0px;
bottom: 0px;
}
@ -405,9 +354,7 @@ html[dir='rtl'] #greeting {
z-index: 10000;
position: absolute;
bottom: 15px;
right: 15px;
font-size: smaller;
text-align: right;
}
/* Rules for edit menu */
@ -446,12 +393,11 @@ html[dir='rtl'] #greeting {
margin: 0px;
padding: 0px;
width: 30%;
left: 0px;
top: 0px;
bottom: 0px;
}
#sidebar_content {
#sidebar #sidebar_content {
overflow: auto;
position: absolute;
font-size: 13px;
@ -462,7 +408,7 @@ html[dir='rtl'] #greeting {
right: 0px;
}
.sidebar_title {
#sidebar .sidebar_title {
margin: 0px;
padding: 3px 6px;
height: 29px;
@ -475,21 +421,21 @@ html[dir='rtl'] #greeting {
/* Rules for the map key which appears in the popout sidebar */
#mapkey h3 {
font-size: 110%;
font-weight: normal;
text-align: center;
font-size: 110%;
font-weight: normal;
text-align: center;
}
#mapkey .mapkey-table {
padding-left: 5px;
padding-right: 5px;
padding-left: 5px;
padding-right: 5px;
}
#mapkey .mapkey-table-key {
}
#mapkey .mapkey-table-value {
font-size: 90%;
font-size: 90%;
}
/* Rules for search results which appear in the popout sidebar */
@ -581,16 +527,8 @@ html[dir='rtl'] #greeting {
padding: 0px;
margin: 0px;
position: absolute;
right: 10px;
bottom: 10px;
line-height: 1.2em;
text-align: left;
}
html[dir='rtl'] #content {
margin-right: 190px;
left: 10px;
text-align: right;
}
#slim_container {
@ -621,7 +559,6 @@ html[dir='rtl'] #content {
#slim_header img {
vertical-align: middle;
margin-right: 5px;
margin-bottom: 5px;
}
@ -634,7 +571,6 @@ html[dir='rtl'] #content {
#changeset_list {
width: 50%;
font-size: small;
text-align: left;
border-collapse: collapse;
border-width: 0px;
margin-top: 1px;
@ -664,11 +600,9 @@ html[dir='rtl'] #content {
}
#changeset_list_map {
float: right;
position: absolute;
top: 0px;
bottom: 0px;
right: 0px;
width: 49%;
min-height: 400px;
border: solid 1px black;
@ -677,10 +611,8 @@ html[dir='rtl'] #content {
/* Rules for the data browser */
#browse_navigation {
float: right;
width: 250px;
text-align: center;
margin-left: 10px;
}
table.browse_details th {
@ -688,10 +620,7 @@ table.browse_details th {
}
#browse_map {
float: right;
width: 250px;
text-align: right;
margin-left: 10px;
}
#browse_map #small_map {
@ -704,7 +633,6 @@ table.browse_details th {
#trace_list {
font-size: small;
text-align: left;
border-collapse: collapse;
border-width: 0px;
}
@ -731,7 +659,6 @@ table.browse_details th {
}
#user_list_actions {
float: right;
margin-top: 10px;
}
@ -744,10 +671,6 @@ table.browse_details th {
-moz-border-radius: 15px;
}
#login_wrapper input[type=submit] {
float: right;
}
#login_login {
background-color: #f5f5ff;
border: 1px solid #f3f3ff;
@ -821,14 +744,6 @@ div#slim_content form#termsForm {
width: auto;
}
form#termsForm div#buttons {
float: right;
}
form#termsForm input#agree {
margin-left: 50px;
}
p#contributorGuidance {
background-color: #f5f5ff;
border: 1px solid #f3f3ff;
@ -843,6 +758,12 @@ p#contributorGuidance {
padding-bottom: 10px;
}
#accountForm .user_map {
position: relative;
width: 500px;
height: 400px;
}
#accountImage td {
padding-bottom: 0px;
}
@ -859,6 +780,14 @@ p#contributorGuidance {
display: inline !important;
}
/* Rules for the user view */
#user_details .user_map {
position: relative;
width: 400px;
height: 400px;
}
/* Rules for the user map */
.user_map .olControlPanZoomBar {
@ -880,6 +809,10 @@ p#contributorGuidance {
margin-right: 2px;
}
.user_popup img.user_thumbnail {
float: left;
}
/* Rules for message in/out box page */
#messages {
@ -939,9 +872,7 @@ p#contributorGuidance {
}
#errorExplanation h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
background-color: #c00;
@ -962,7 +893,6 @@ p#contributorGuidance {
/* Rules for forms */
.fieldName {
text-align: right;
font-weight: bold;
}
@ -978,11 +908,6 @@ input[type="submit"] {
border: 1px solid black;
}
input.openid_url {
background: url('../images/openid_input.png') repeat-y left white;
padding-left: 16px;
}
/* Rules for user images */
img.user_image {

View file

@ -9,7 +9,6 @@
/* Rules for the main content area */
#content {
left: 192px;
top: 35px;
}

233
public/stylesheets/ltr.css Normal file
View file

@ -0,0 +1,233 @@
/* Styles for LTR languages */
/* Default rules for the body of every page */
html body {
text-align: left;
}
/*
* Rules for alert boxes shown in the left sidebar when important
* information needs to be conveyed such as when the site is
* undergoing maintenance.
*/
#alert {
text-align: left;
}
/*
* Rules for notice boxes shown in the left sidebar when important, but
* non-critical information needs to be conveyed such as notices about
* donation drives.
*/
.notice {
text-align: left;
}
/* Rules for the menu displayed in the left sidebar */
.left_menu {
left: 0px;
}
.left_menu td {
padding-right: 4px;
}
.left_menu h1 {
text-align: left;
padding: 0em 0em 0em 1em;
}
.left_menu ul {
padding-left: 0px;
}
.left_menu img {
margin: 2px 8px 0px 0px;
}
/*
* Rules for "optional boxes" which appear in the left sidebar on
* certain pages. Current users are the seach box on the main page
* and the tag cloud on the traces pages.
*/
.optionalbox {
left: 0px;
text-align: left;
}
/* Rules for the search box */
.whereami {
float: right;
}
/* Rules for tabbed navigation bar */
#tabnav
{
padding-left: 215px;
}
#tabnav a, #tabnav a:link, #tabnav a:visited
{
float: left;
margin-right: 4px;
}
/* Rules for greeting bar in the top right corner */
#greeting {
float: right;
padding-right: 10px;
}
/* Rules for the message shown in place of the map when javascript is disabled */
#noscript {
left: 15px
}
/* Rules for OpenLayers maps */
#map {
left: 0px;
right: 2px;
}
#permalink {
left: 15px;
text-align: left;
}
/* Rules for the popout map sidebar */
#sidebar {
left: 0px;
}
#sidebar #sidebar_title {
text-align: left;
}
#sidebar #sidebar_close {
text-align: right;
}
/* Rules for the main content area */
#content {
left: 192px;
right: 10px;
text-align: left;
}
#slim_header img {
margin-right: 5px;
}
/* Rules for the copyright page */
#cc_logo {
float: right;
}
/* Rules for the changeset list shown by the history tab etc */
#changeset_list {
text-align: left;
}
#changeset_list_map {
float: right;
right: 0px;
}
/* Rules for the data browser */
#browse_navigation {
float: right;
margin-left: 10px;
}
#browse_map {
float: right;
text-align: right;
margin-left: 10px;
}
/* Rules for the trace list shown by the traces tab etc */
#trace_list {
text-align: right;
}
/* Rules for the diary list */
#diary_list img.user_thumbnail {
float: right;
}
/* Rules for the diary entry view */
#diary_entry img.user_image {
float: right;
}
#diary_entry img.user_thumbnail {
float: right;
}
/* Rules for the user list */
#user_list_actions {
float: right;
}
/* Rules for the login page */
#login_wrapper input[type=submit] {
float: right;
}
/* Rules for the account confirmation page */
form#termsForm div#buttons {
float: right;
}
form#termsForm input#agree {
margin-left: 50px;
}
/* Rules for the user view */
#user_details img.user_image {
float: right;
}
#user_details .user_map {
float: right;
}
/* Rules for rails validation error boxes */
#errorExplanation h2 {
text-align: left;
padding: 5px 5px 5px 15px;
}
/* Rules for forms */
.fieldName {
text-align: right;
}
input.openid_url {
background: url('../images/openid_input.png') repeat-y left white;
padding-left: 16px;
}

240
public/stylesheets/rtl.css Normal file
View file

@ -0,0 +1,240 @@
/* Styles for RTL languages */
/* Default rules for the body of every page */
html body {
text-align: right;
}
/*
* Rules for alert boxes shown in the left sidebar when important
* information needs to be conveyed such as when the site is
* undergoing maintenance.
*/
#alert {
text-align: right;
}
/*
* Rules for notice boxes shown in the left sidebar when important, but
* non-critical information needs to be conveyed such as notices about
* donation drives.
*/
.notice {
text-align: right;
}
/* Rules for the menu displayed in the left sidebar */
.left_menu {
right: 0px;
}
.left_menu td {
padding-left: 4px;
}
.left_menu h1 {
text-align: right;
padding: 0em 1em 0em 0em;
}
.left_menu ul {
padding-right: 0px;
}
.left_menu img {
margin: 2px 0px 0px 8px;
}
/*
* Rules for "optional boxes" which appear in the left sidebar on
* certain pages. Current users are the seach box on the main page
* and the tag cloud on the traces pages.
*/
.optionalbox {
right: 0px;
text-align: right;
}
/* Rules for the search box */
.whereami {
float: left;
}
/* Rules for tabbed navigation bar */
#tabnav
{
padding-right: 215px;
}
/*
#tabnav li {
float: right;
}
*/
#tabnav a, #tabnav a:link, #tabnav a:visited
{
float: right;
margin-left: 4px;
}
/* Rules for greeting bar in the top right corner */
#greeting {
float: left;
padding-left: 10px;
}
/* Rules for the message shown in place of the map when javascript is disabled */
#noscript {
right: 15px
}
/* Rules for OpenLayers maps */
#map {
right: 0px;
left: 2px;
}
#permalink {
right: 15px;
text-align: right;
}
/* Rules for the popout map sidebar */
#sidebar {
right: 0px;
}
#sidebar #sidebar_title {
text-align: right;
}
#sidebar #sidebar_close {
text-align: left;
}
/* Rules for the main content area */
#content {
right: 192px;
left: 10px;
text-align: right;
}
#slim_header img {
margin-left: 5px;
}
/* Rules for the copyright page */
#cc_logo {
float: left;
}
/* Rules for the changeset list shown by the history tab etc */
#changeset_list {
text-align: right;
}
#changeset_list_map {
float: left;
left: 0px;
}
/* Rules for the data browser */
#browse_navigation {
float: left;
margin-right: 10px;
}
#browse_map {
float: left;
text-align: left;
margin-right: 10px;
}
/* Rules for the trace list shown by the traces tab etc */
#trace_list {
text-align: right;
}
/* Rules for the diary list */
#diary_list img.user_thumbnail {
float: left;
}
/* Rules for the diary entry view */
#diary_entry img.user_image {
float: left;
}
#diary_entry img.user_thumbnail {
float: left;
}
/* Rules for the user list */
#user_list_actions {
float: left;
}
/* Rules for the login page */
#login_wrapper input[type=submit] {
float: left;
}
/* Rules for the account confirmation page */
form#termsForm div#buttons {
float: left;
}
form#termsForm input#agree {
margin-right: 50px;
}
/* Rules for the user view */
#user_details img.user_image {
float: left;
}
#user_details .user_map {
float: left;
}
/* Rules for rails validation error boxes */
#errorExplanation h2 {
text-align: right;
padding: 5px 15px 5px 5px;
}
/* Rules for forms */
.fieldName {
text-align: left;
}
input.openid_url {
background: url('../images/openid_input.png') repeat-y right white;
padding-right: 16px;
}

View file

@ -95,7 +95,10 @@ h1 {
#content {
left: 10px;
right: 10px;
top: 47px;
margin-left: 0px;
margin-right: 0px;
}
/* Rules for the signup form */