Lots more work on making RTL layout work
This commit is contained in:
parent
6234436cb8
commit
d075fc4c1f
20 changed files with 702 additions and 293 deletions
|
@ -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 %>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -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] %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)" %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<p style="float: right">
|
||||
<p id="cc_logo">
|
||||
<%= link_to(
|
||||
image_tag("cc_button.png",
|
||||
:alt => t('layouts.license.alt'),
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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 %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue