Changed author display on issues, news and document files.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@732 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-09-15 15:20:08 +00:00
parent 89b349818b
commit 3c6ddc9cec
17 changed files with 41 additions and 7 deletions
+4
View File
@@ -73,6 +73,10 @@ module ApplicationHelper
@date_format_setting == 0 ? l_datetime(time) : (time.strftime("%Y-%m-%d") + ' ' + l_time(time))
end
def authoring(created, author)
l(:label_added_time_by, author.name, distance_of_time_in_words(Time.now, created))
end
def day_name(day)
l(:general_day_names).split(',')[day-1]
end
+1 -1
View File
@@ -19,7 +19,7 @@
</div>
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
(<%= number_to_human_size attachment.filesize %>)<br />
<em><%= attachment.author.name %>, <%= format_date(attachment.created_on) %></em><br />
<span class="author"><%= authoring attachment.created_on, attachment.author %></span><br />
<%= lwr(:label_download, attachment.downloads) %>
</li>
<% end %>
+1 -1
View File
@@ -8,7 +8,7 @@
<h2><%= @issue.tracker.name %> #<%= @issue.id %>: <%=h @issue.subject %></h2>
<p class="author">
<%= l(:label_added_time_by, distance_of_time_in_words(Time.now, @issue.created_on), link_to_user(@issue.author)) %>.
<%= authoring @issue.created_on, @issue.author %>.
<%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) if @issue.created_on != @issue.updated_on %>.
</p>
<div class="box">
+2 -2
View File
@@ -1,5 +1,5 @@
<p><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless @project %>
<%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %><br />
<% unless news.summary.blank? %><%=h news.summary %><br /><% end %>
<em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br />
<%= news.comments_count %> <%= lwr(:label_comment, news.comments_count).downcase %><br /></p>
<span class="author"><%= authoring news.created_on, news.author %>
<%= "<br />#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase}" if news.comments_count > 0 %></span></p>
+1 -1
View File
@@ -6,7 +6,7 @@
<h2><%=h @news.title %></h2>
<p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
<%= @news.author.name %>, <%= format_time(@news.created_on) %></em></p>
<span class="author"><%= authoring @news.created_on, @news.author %></span></em></p>
<%= textilizable(@news.description) %>
<br />