Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
#
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2019 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -25,19 +25,20 @@ module JournalsHelper
|
|||
ids.any? ? Attachment.where(:id => ids).select(&:thumbnailable?) : []
|
||||
end
|
||||
|
||||
def render_notes(issue, journal, options={})
|
||||
content = ''
|
||||
css_classes = "wiki"
|
||||
# Returns the action links for an issue journal
|
||||
def render_journal_actions(issue, journal, options={})
|
||||
links = []
|
||||
if journal.notes.present?
|
||||
links << link_to(l(:button_quote),
|
||||
quoted_issue_path(issue, :journal_id => journal),
|
||||
:remote => true,
|
||||
:method => 'post',
|
||||
:title => l(:button_quote),
|
||||
:class => 'icon-only icon-comment'
|
||||
) if options[:reply_links]
|
||||
|
||||
if options[:reply_links]
|
||||
indice = journal.indice || @journal.issue.visible_journals_with_index.find{|j| j.id == @journal.id}.indice
|
||||
links << link_to(l(:button_quote),
|
||||
quoted_issue_path(issue, :journal_id => journal, :journal_indice => indice),
|
||||
:remote => true,
|
||||
:method => 'post',
|
||||
:title => l(:button_quote),
|
||||
:class => 'icon-only icon-comment'
|
||||
)
|
||||
end
|
||||
if journal.editable_by?(User.current)
|
||||
links << link_to(l(:button_edit),
|
||||
edit_journal_path(journal),
|
||||
|
@ -49,21 +50,22 @@ module JournalsHelper
|
|||
links << link_to(l(:button_delete),
|
||||
journal_path(journal, :journal => {:notes => ""}),
|
||||
:remote => true,
|
||||
:method => 'put', :data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => 'put', :data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete),
|
||||
:class => 'icon-only icon-del'
|
||||
)
|
||||
css_classes << " editable"
|
||||
end
|
||||
end
|
||||
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
|
||||
content << textilizable(journal, :notes)
|
||||
content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes)
|
||||
safe_join(links, ' ')
|
||||
end
|
||||
|
||||
def render_notes(issue, journal, options={})
|
||||
content_tag('div', textilizable(journal, :notes), :id => "journal-#{journal.id}-notes", :class => "wiki")
|
||||
end
|
||||
|
||||
def render_private_notes_indicator(journal)
|
||||
content = journal.private_notes? ? l(:field_is_private) : ''
|
||||
css_classes = journal.private_notes? ? 'private' : ''
|
||||
css_classes = journal.private_notes? ? 'badge badge-private private' : ''
|
||||
content_tag('span', content.html_safe, :id => "journal-#{journal.id}-private_notes", :class => css_classes)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue