Project

General

Profile

Actions

Patch #5281

closed

Remove empty ul tags in the issue history

Added by Henrik Ammer almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
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

history_details_css_class.diff (836 Bytes) history_details_css_class.diff Henrik Ammer, 2010-04-09 13:51
Actions #1

Updated by Jean-Philippe Lang almost 14 years ago

  • Subject changed from History details ul not rendering when empty and add CSS class to Remove empty ul tags in the issue history
  • Status changed from New to Closed
  • Target version set to 1.0.0 (RC)

Patch committed in r3666. Thanks.

Actions

Also available in: Atom PDF