dates and times on the web site.
Also try and improve formatting of message pages a but, and include the
image of the recipient when viewing a sent message.
<%= user_thumbnail diary_comment.user, :style => "float: right" %>
-<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)) %></h4>
+<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 @user && @user.administrator? %>
<%= link_to t('diary_entry.diary_comment.hide_link'), {:action => 'hidecomment', :display_name => @user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id}, {:confirm => t('diary_entry.diary_comment.confirm')} %>
<%= render :partial => "location", :object => diary_entry %>
<br />
<% end %>
-<%= t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :language => diary_entry.language_code) %>
+<%= t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at, :format => :friendly), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :language => diary_entry.language_code) %>
<% if params[:action] == 'list' %>
<br />
<%= link_to t('diary_entry.diary_entry.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %>
<tr id="inbox-<%= message_summary.id %>" class="inbox-row<%= "-unread" if not message_summary.message_read? %>">
<td class="inbox-sender" bgcolor="<%= this_colour %>"><%= link_to h(message_summary.sender.display_name), :controller => 'user', :action => message_summary.sender.display_name %></td>
<td class="inbox-subject" bgcolor="<%= this_colour %>"><%= link_to h(message_summary.title), :controller => 'message', :action => 'read', :message_id => message_summary.id %></td>
- <td class="inbox-sent nowrap" bgcolor="<%= this_colour %>"><%= l message_summary.sent_on %></td>
+ <td class="inbox-sent nowrap" bgcolor="<%= this_colour %>"><%= l message_summary.sent_on, :format => :friendly %></td>
<% if message_summary.message_read? %>
<td><%= button_to t('message.message_summary.unread_button'), {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'unread'}, { :onclick => remote_function(:url => {:controller => 'message', :action => 'mark', :message_id => message_summary.id, :mark => 'unread'}) + "; return false;" } %></td>
<% else %>
<tr class="inbox-row">
<td class="inbox-sender" bgcolor="<%= this_colour %>"><%= link_to h(sent_message_summary.recipient.display_name), :controller => 'user', :action => sent_message_summary.recipient.display_name %></td>
<td class="inbox-subject" bgcolor="<%= this_colour %>"><%= link_to h(sent_message_summary.title), :controller => 'message', :action => 'read', :message_id => sent_message_summary.id %></td>
- <td class="inbox-sent nowrap" bgcolor="<%= this_colour %>"><%= l sent_message_summary.sent_on %></td>
+ <td class="inbox-sent nowrap" bgcolor="<%= this_colour %>"><%= l sent_message_summary.sent_on, :format => :friendly %></td>
<td><%= button_to t('message.sent_message_summary.delete_button'), :controller => 'message', :action => 'delete', :message_id => sent_message_summary.id, :referer => request.request_uri %></td>
</tr>
<table>
<tr>
<th align="right"><%= t'message.read.from' %></th>
- <td>
- <% if @message.sender.image %>
- <%= image_tag url_for_file_column(@message.sender, "image") %>
- <% end %>
-
-<%= link_to h(@message.sender.display_name), :controller => 'user', :action => 'view', :display_name => @message.sender.display_name %></td>
+ <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>
<td><%= h(@message.title) %></td>
+ <td></td>
</tr>
<tr>
<th align="right"><%= t'message.read.date' %></th>
- <td><%= l @message.sent_on %></td>
+ <td><%= l @message.sent_on, :format => :friendly %></td>
+ <td></td>
</tr>
<tr>
<th></th>
<td><%= htmlize(@message.body) %></td>
+ <td></td>
</tr>
</table>
<tr>
<th align="right"><%= 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>
<td><%= h(@message.title) %></td>
+ <td></td>
</tr>
<tr>
<th align="right"><%= t'message.read.date' %></th>
- <td><%= l @message.sent_on %></td>
+ <td><%= l @message.sent_on, :format => :friendly %></td>
+ <td></td>
</tr>
<tr>
<th></th>
<td><%= htmlize(@message.body) %></td>
+ <td></td>
</tr>
</table>
</tr>
<tr>
<td><%= t'trace.edit.uploaded_at' %></td>
- <td><%= l @trace.timestamp %></td>
+ <td><%= l @trace.timestamp, :format => :friendly %></td>
</tr>
<% if @trace.inserted? %>
<tr>
</tr>
<tr>
<td><%= t'trace.view.uploaded' %></td>
- <td><%= l @trace.timestamp %></td>
+ <td><%= l @trace.timestamp, :format => :friendly %></td>
</tr>
<% if @trace.inserted? %>
<tr>
<% end %>
</div>
-<p><b><%= t 'user.view.mapper since' %></b> <%= l @this_user.creation_time %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %></p>
+<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>
en:
html:
dir: ltr
+ time:
+ formats:
+ friendly: "%e %B %Y at %H:%M"
activerecord:
# Translates all the model names, which is used in error handling on the web site
models:
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."
diary_entry:
- posted_by: "Posted by {{link_user}} at {{created}} in {{language_link}}"
+ posted_by: "Posted by {{link_user}} on {{created}} in {{language_link}}"
comment_link: Comment on this entry
reply_link: Reply to this entry
comment_count:
hide_link: Hide this entry
confirm: Confirm
diary_comment:
- comment_from: "Comment from {{link_user}} at {{comment_created_at}}"
+ comment_from: "Comment from {{link_user}} on {{comment_created_at}}"
hide_link: Hide this comment
confirm: Confirm
location:
heading: "Editing trace {{name}}"
filename: "Filename:"
download: "download"
- uploaded_at: "Uploaded at:"
+ uploaded_at: "Uploaded:"
points: "Points:"
start_coord: "Start coordinate:"
map: "map"
pending: "PENDING"
filename: "Filename:"
download: "download"
- uploaded: "Uploaded at:"
+ uploaded: "Uploaded:"
points: "Points:"
start_coordinates: "Start coordinate:"
map: "map"