Vote #67024
完了Remove empty ul tags in the issue history
開始日:
2010/04/09
期日:
進捗率:
0%
予定工数:
Redmineorg_URL:
category_id:
10
version_id:
14
issue_org_id:
5281
author_id:
9265
assigned_to_id:
0
comments:
1
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
説明
I was a bit annoyed that the @ul@ with the details in history always showed even when empty. Sure, it does not render in most browsers since it's empty but I wasn't to happy about it either. :)
And when I added the if sentence I also added a CSS class to the @ul@ just to make it easier to style if needed.
Attached diff
Index: app/views/issues/_history.rhtml
===================================================================
--- app/views/issues/_history.rhtml (revision 3629)
+++ app/views/issues/_history.rhtml (working copy)
@@ -6,11 +6,13 @@
<%= content_tag('a', '', :name => "note-#{journal.indice}")%>
<%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %>
-
- <% for detail in journal.details %>
+ <% if journal.details.any? %>
+
+ <% for detail in journal.details %>
- <%= show_detail(detail) %>
+ <% end %>
+
<% end %>
-
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
Use it if needed.
journals
Patch committed in r3666. Thanks.
--------------------------------------------------------------------------------