Patch #31506 » 0001-Remove-trailing-whitespaces-from-app.patch
| app/controllers/attachments_controller.rb | ||
|---|---|---|
| 239 | 239 |
def detect_content_type(attachment, is_thumb = false) |
| 240 | 240 |
content_type = attachment.content_type |
| 241 | 241 |
if content_type.blank? || content_type == "application/octet-stream" |
| 242 |
content_type =
|
|
| 242 |
content_type = |
|
| 243 | 243 |
Redmine::MimeType.of(attachment.filename).presence || |
| 244 | 244 |
"application/octet-stream" |
| 245 | 245 |
end |
| app/controllers/previews_controller.rb | ||
|---|---|---|
| 18 | 18 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | 19 | |
| 20 | 20 |
class PreviewsController < ApplicationController |
| 21 |
before_action :find_project, :except => :text
|
|
| 21 |
before_action :find_project, :except => :text |
|
| 22 | 22 |
before_action :find_attachments |
| 23 | 23 | |
| 24 | 24 |
def issue |
| app/helpers/members_helper.rb | ||
|---|---|---|
| 36 | 36 |
s + content_tag('span', links, :class => 'pagination')
|
| 37 | 37 |
end |
| 38 | 38 | |
| 39 |
# Returns inheritance information for an inherited member role
|
|
| 39 |
# Returns inheritance information for an inherited member role |
|
| 40 | 40 |
def render_role_inheritance(member, role) |
| 41 | 41 |
content = member.role_inheritance(role).map do |h| |
| 42 | 42 |
if h.is_a?(Project) |
| ... | ... | |
| 45 | 45 |
l(:label_inherited_from_group, :name => h.name.to_s) |
| 46 | 46 |
end |
| 47 | 47 |
end.compact.uniq |
| 48 |
|
|
| 48 | ||
| 49 | 49 |
if content.present? |
| 50 | 50 |
content_tag('span', content.join(", "), :class => "info")
|
| 51 | 51 |
end |
| app/helpers/search_helper.rb | ||
|---|---|---|
| 63 | 63 |
:all_words => params[:all_words], :scope => params[:scope], t => 1) |
| 64 | 64 |
end |
| 65 | 65 |
('<ul>'.html_safe +
|
| 66 |
links.map {|link| content_tag('li', link)}.join(' ').html_safe +
|
|
| 66 |
links.map {|link| content_tag('li', link)}.join(' ').html_safe +
|
|
| 67 | 67 |
'</ul>'.html_safe) unless links.empty? |
| 68 | 68 |
end |
| 69 | 69 |
end |
| app/helpers/workflows_helper.rb | ||
|---|---|---|
| 21 | 21 |
def options_for_workflow_select(name, objects, selected, options={})
|
| 22 | 22 |
option_tags = ''.html_safe |
| 23 | 23 |
multiple = false |
| 24 |
if selected
|
|
| 24 |
if selected |
|
| 25 | 25 |
if selected.size == objects.size |
| 26 | 26 |
selected = 'all' |
| 27 | 27 |
else |
| ... | ... | |
| 51 | 51 |
options = [["", ""], [l(:label_readonly), "readonly"]] |
| 52 | 52 |
options << [l(:label_required), "required"] unless field_required?(field) |
| 53 | 53 |
html_options = {}
|
| 54 |
|
|
| 54 | ||
| 55 | 55 |
if perm = permissions[status.id][name] |
| 56 | 56 |
if perm.uniq.size > 1 || perm.size < @roles.size * @trackers.size |
| 57 | 57 |
options << [l(:label_no_change_option), "no_change"] |
| ... | ... | |
| 76 | 76 | |
| 77 | 77 |
def transition_tag(workflows, old_status, new_status, name) |
| 78 | 78 |
w = workflows.select {|w| w.old_status == old_status && w.new_status == new_status}.size
|
| 79 |
|
|
| 79 | ||
| 80 | 80 |
tag_name = "transitions[#{ old_status.try(:id) || 0 }][#{new_status.id}][#{name}]"
|
| 81 | 81 |
if old_status == new_status |
| 82 | 82 |
check_box_tag(tag_name, "1", true, |
| app/models/mail_handler.rb | ||
|---|---|---|
| 459 | 459 |
end |
| 460 | 460 |
end |
| 461 | 461 | |
| 462 |
# Returns the text content of the email.
|
|
| 462 |
# Returns the text content of the email. |
|
| 463 | 463 |
# If the value of Setting.mail_handler_preferred_body_part is 'html', |
| 464 | 464 |
# it returns text converted from the text/html part of the email. |
| 465 | 465 |
# Otherwise, it returns text/plain part. |