Merged r4062 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4132 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
e32fc44dc2
commit
823fd16c3a
3 files changed
+9
-8
No files matched your search
@@ -39,11 +39,4 @@ module JournalsHelper
|
|||||||
onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
|
onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
|
||||||
link_to text, '#', options.merge(:onclick => onclick)
|
link_to text, '#', options.merge(:onclick => onclick)
|
||||||
end
|
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
|
end
|
||||||
@@ -65,4 +65,12 @@ class Journal < ActiveRecord::Base
|
|||||||
def attachments
|
def attachments
|
||||||
journalized.respond_to?(:attachments) ? journalized.attachments : nil
|
journalized.respond_to?(:attachments) ? journalized.attachments : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Returns a string of css classes
|
||||||
|
def css_classes
|
||||||
|
s = 'journal'
|
||||||
|
s << ' has-notes' unless notes.blank?
|
||||||
|
s << ' has-details' unless details.blank?
|
||||||
|
s
|
||||||
|
end
|
||||||
end
|
end
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<% reply_links = authorize_for('issues', 'edit') -%>
|
<% reply_links = authorize_for('issues', 'edit') -%>
|
||||||
<% for journal in journals %>
|
<% for journal in journals %>
|
||||||
<div id="change-<%= journal.id %>" class="<%= css_journal_classes(journal) %>">
|
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>">
|
||||||
<h4><div class="journal-link"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
|
<h4><div class="journal-link"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
|
||||||
<%= avatar(journal.user, :size => "24") %>
|
<%= avatar(journal.user, :size => "24") %>
|
||||||
<%= content_tag('a', '', :name => "note-#{journal.indice}")%>
|
<%= content_tag('a', '', :name => "note-#{journal.indice}")%>
|
||||||
|
|||||||
Reference in new issue
Block a user