Fix coding standards
This commit is contained in:
parent
ba0d3dcfb6
commit
b075c8ceab
@ -1,9 +1,7 @@
|
||||
module AdditionalsProjectsHelper
|
||||
def project_overview_name(_project, dashboard = nil)
|
||||
name = [l(:label_overview)]
|
||||
if dashboard.present?
|
||||
name << dashboard.name if dashboard.always_expose? || !dashboard.system_default
|
||||
end
|
||||
name << dashboard.name if dashboard.present? && (dashboard.always_expose? || !dashboard.system_default)
|
||||
|
||||
safe_join name, Additionals::LIST_SEPARATOR
|
||||
end
|
||||
|
@ -207,13 +207,12 @@ module DashboardsHelper
|
||||
|
||||
if dashboard.editable?
|
||||
icons = []
|
||||
if block_definition[:no_settings].blank?
|
||||
if !block_definition.key?(:with_settings_if) || block_definition[:with_settings_if].call(@project)
|
||||
icons << link_to_function(l(:label_options),
|
||||
"$('##{block}-settings').toggle();",
|
||||
class: 'icon-only icon-settings',
|
||||
title: l(:label_options))
|
||||
end
|
||||
if block_definition[:no_settings].blank? &&
|
||||
(!block_definition.key?(:with_settings_if) || block_definition[:with_settings_if].call(@project))
|
||||
icons << link_to_function(l(:label_options),
|
||||
"$('##{block}-settings').toggle();",
|
||||
class: 'icon-only icon-settings',
|
||||
title: l(:label_options))
|
||||
end
|
||||
icons << tag.span('', class: 'icon-only icon-sort-handle sort-handle', title: l(:button_move))
|
||||
icons << link_to(l(:button_delete),
|
||||
|
@ -63,8 +63,9 @@ module Additionals
|
||||
|
||||
add_autowatcher(User.current)
|
||||
add_autowatcher(author) if (new_record? || author_id != author_id_was) && author != User.current
|
||||
unless assigned_to_id.nil? || assigned_to_id == User.current.id
|
||||
add_autowatcher(assigned_to) if new_record? || assigned_to_id != assigned_to_id_was
|
||||
|
||||
if !assigned_to_id.nil? && assigned_to_id != User.current.id && (new_record? || assigned_to_id != assigned_to_id_was)
|
||||
add_autowatcher(assigned_to)
|
||||
end
|
||||
|
||||
true
|
||||
@ -75,11 +76,11 @@ module Additionals
|
||||
end
|
||||
|
||||
def editable_with_additionals?(user = User.current)
|
||||
return false unless editable_without_additionals?(user)
|
||||
return false unless editable_without_additionals? user
|
||||
return true unless closed?
|
||||
return true unless Additionals.setting?(:issue_freezed_with_close)
|
||||
return true unless Additionals.setting? :issue_freezed_with_close
|
||||
|
||||
user.allowed_to?(:edit_closed_issues, project)
|
||||
user.allowed_to? :edit_closed_issues, project
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -11,12 +11,11 @@ module Additionals
|
||||
|
||||
module InstanceOverwriteMethods
|
||||
def respond_to(&block)
|
||||
if @project && @content
|
||||
if @_action_name == 'show'
|
||||
additionals_include_header
|
||||
additionals_include_footer
|
||||
end
|
||||
if @project && @content && @_action_name == 'show'
|
||||
additionals_include_header
|
||||
additionals_include_footer
|
||||
end
|
||||
|
||||
super(&block)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user