Actions
Patch #5281
closedRemove empty ul tags in the issue history
Start date:
2010-04-09
Due date:
% Done:
0%
Estimated time:
Description
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 %></h4>
- <ul>
- <% for detail in journal.details %>
+ <% if journal.details.any? %>
+ <ul class="details">
+ <% for detail in journal.details %>
<li><%= show_detail(detail) %></li>
+ <% end %>
+ </ul>
<% end %>
- </ul>
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
</div>
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
Use it if needed.
Files
Actions