@@ -201,12 +201,17 module ApplicationHelper | |||
|
201 | 201 | end |
|
202 | 202 | |
|
203 | 203 | def authoring(created, author, options={}) |
|
204 | time_tag = @project.nil? ? content_tag('acronym', distance_of_time_in_words(Time.now, created), :title => format_time(created)) : | |
|
205 | link_to(distance_of_time_in_words(Time.now, created), | |
|
206 | {:controller => 'projects', :action => 'activity', :id => @project, :from => created.to_date}, | |
|
207 | :title => format_time(created)) | |
|
208 | 204 | author_tag = (author.is_a?(User) && !author.anonymous?) ? link_to(h(author), :controller => 'account', :action => 'show', :id => author) : h(author || 'Anonymous') |
|
209 | l(options[:label] || :label_added_time_by, :author => author_tag, :age => time_tag) | |
|
205 | l(options[:label] || :label_added_time_by, :author => author_tag, :age => time_tag(created)) | |
|
206 | end | |
|
207 | ||
|
208 | def time_tag(time) | |
|
209 | text = distance_of_time_in_words(Time.now, time) | |
|
210 | if @project | |
|
211 | link_to(text, {:controller => 'projects', :action => 'activity', :id => @project, :from => time.to_date}, :title => format_time(time)) | |
|
212 | else | |
|
213 | content_tag('acronym', text, :title => format_time(time)) | |
|
214 | end | |
|
210 | 215 | end |
|
211 | 216 | |
|
212 | 217 | def syntax_highlight(name, content) |
@@ -14,7 +14,9 | |||
|
14 | 14 | <h3><%=h @issue.subject %></h3> |
|
15 | 15 | <p class="author"> |
|
16 | 16 | <%= authoring @issue.created_on, @issue.author %>. |
|
17 | <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) + '.' if @issue.created_on != @issue.updated_on %> | |
|
17 | <% if @issue.created_on != @issue.updated_on %> | |
|
18 | <%= l(:label_updated_time, time_tag(@issue.updated_on)) %>. | |
|
19 | <% end %> | |
|
18 | 20 | </p> |
|
19 | 21 | |
|
20 | 22 | <table width="100%"> |
General Comments 0
You need to be logged in to leave comments.
Login now