##// END OF EJS Templates
Add css classes to journals display to facilitate theming...
Jean-Baptiste Barth -
r3943:b6d9f2bddf40
parent child
Show More
@@ -39,4 +39,11 module JournalsHelper
39 onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
39 onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
40 link_to text, '#', options.merge(:onclick => onclick)
40 link_to text, '#', options.merge(:onclick => onclick)
41 end
41 end
42
43 def css_journal_classes(journal)
44 s = 'journal'
45 s << ' has-notes' unless journal.notes.blank?
46 s << ' has-details' unless journal.details.blank?
47 s
48 end
42 end
49 end
@@ -1,6 +1,6
1 <% reply_links = authorize_for('issues', 'edit') -%>
1 <% reply_links = authorize_for('issues', 'edit') -%>
2 <% for journal in journals %>
2 <% for journal in journals %>
3 <div id="change-<%= journal.id %>" class="journal">
3 <div id="change-<%= journal.id %>" class="<%= css_journal_classes(journal) %>">
4 <h4><div class="journal-link"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
4 <h4><div class="journal-link"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
5 <%= avatar(journal.user, :size => "24") %>
5 <%= avatar(journal.user, :size => "24") %>
6 <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
6 <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
General Comments 0
You need to be logged in to leave comments. Login now