summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-09-03 20:05:51 +0000
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2010-09-03 20:05:51 +0000
commitb6d9f2bddf40eed35c4172342516542640304ac6 (patch)
treee423bc6272372c52419f0a0cad71e6ffca736615
parent4776a5a42716181aaa51edf3fc6fc4bc0d19231e (diff)
downloadredmine-b6d9f2bddf40eed35c4172342516542640304ac6.tar.gz
redmine-b6d9f2bddf40eed35c4172342516542640304ac6.zip
Add css classes to journals display to facilitate theming
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4057 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/journals_helper.rb7
-rw-r--r--app/views/issues/_history.rhtml2
2 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/journals_helper.rb b/app/helpers/journals_helper.rb
index c8d53f253..990bfb1e5 100644
--- a/app/helpers/journals_helper.rb
+++ b/app/helpers/journals_helper.rb
@@ -39,4 +39,11 @@ module JournalsHelper
onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
link_to text, '#', options.merge(:onclick => onclick)
end
+
+ def css_journal_classes(journal)
+ s = 'journal'
+ s << ' has-notes' unless journal.notes.blank?
+ s << ' has-details' unless journal.details.blank?
+ s
+ end
end
diff --git a/app/views/issues/_history.rhtml b/app/views/issues/_history.rhtml
index a95cbf81c..4ea2dd2ac 100644
--- a/app/views/issues/_history.rhtml
+++ b/app/views/issues/_history.rhtml
@@ -1,6 +1,6 @@
<% reply_links = authorize_for('issues', 'edit') -%>
<% for journal in journals %>
- <div id="change-<%= journal.id %>" class="journal">
+ <div id="change-<%= journal.id %>" class="<%= css_journal_classes(journal) %>">
<h4><div class="journal-link"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
<%= avatar(journal.user, :size => "24") %>
<%= content_tag('a', '', :name => "note-#{journal.indice}")%>