Fixing coding standards
This commit is contained in:
parent
3d76540405
commit
7e4f41db71
@ -73,3 +73,7 @@ Style/HashTransformValues:
|
||||
|
||||
Naming/VariableNumber:
|
||||
Enabled: false
|
||||
|
||||
Style/StringConcatenation:
|
||||
Exclude:
|
||||
- 'app/views/additionals/_select2_ajax_call.*'
|
||||
|
@ -4,15 +4,10 @@ linters:
|
||||
RuboCop:
|
||||
ignored_cops:
|
||||
- Layout/ArgumentAlignment
|
||||
- Layout/ArrayAlignment
|
||||
- Layout/BlockEndNewline
|
||||
- Layout/EmptyLineAfterGuardClause
|
||||
- Layout/HashAlignment
|
||||
- Layout/IndentationConsistency
|
||||
- Layout/IndentationWidth
|
||||
- Layout/IndentFirstArgument
|
||||
- Layout/IndentFirstArrayElement
|
||||
- Layout/IndentFirstHashElement
|
||||
- Layout/MultilineArrayBraceLayout
|
||||
- Layout/MultilineAssignmentLayout
|
||||
- Layout/MultilineBlockLayout
|
||||
@ -21,20 +16,8 @@ linters:
|
||||
- Layout/MultilineMethodCallIndentation
|
||||
- Layout/MultilineMethodDefinitionBraceLayout
|
||||
- Layout/MultilineOperationIndentation
|
||||
- Layout/TrailingBlankLines
|
||||
- Layout/TrailingEmptyLines
|
||||
- Layout/TrailingWhitespace
|
||||
- Lint/BlockAlignment
|
||||
- Lint/EndAlignment
|
||||
- Lint/Void
|
||||
- Metrics/BlockLength
|
||||
- Metrics/BlockNesting
|
||||
- Metrics/LineLength
|
||||
- Naming/FileName
|
||||
- Rails/OutputSafety
|
||||
- Style/ConditionalAssignment
|
||||
- Style/FrozenStringLiteralComment
|
||||
- Style/IdenticalConditionalBranches
|
||||
- Style/IfUnlessModifier
|
||||
- Style/Next
|
||||
- Style/WhileUntilModifier
|
||||
|
@ -1,7 +1,7 @@
|
||||
- footer = Additionals.setting(:global_footer)
|
||||
- footer = Additionals.setting :global_footer
|
||||
- if footer.present?
|
||||
.additionals-footer
|
||||
= textilizable(footer)
|
||||
= textilizable footer
|
||||
|
||||
- if @additionals_help_items.present?
|
||||
javascript:
|
||||
@ -9,7 +9,7 @@
|
||||
$('a.help').parent().append("<ul class=\"menu-children\">#{escape_javascript @additionals_help_items}</ul>");
|
||||
});
|
||||
|
||||
- if Additionals.setting?(:open_external_urls)
|
||||
- if Additionals.setting? :open_external_urls
|
||||
javascript:
|
||||
$(function() {
|
||||
$('a.external').attr({ 'target': '_blank',
|
||||
|
@ -1,2 +1,2 @@
|
||||
- if Additionals.setting?(:add_go_to_top)
|
||||
- if Additionals.setting? :add_go_to_top
|
||||
a#gototop
|
||||
|
@ -7,8 +7,7 @@ table.list.issue-report.table-of-values
|
||||
tbody
|
||||
- options = { set_filter: 1 }
|
||||
- @chart[:filters].each do |line|
|
||||
- if line[:filter]
|
||||
- options.merge! line[:filter]
|
||||
- options.merge! line[:filter] if line[:filter]
|
||||
tr class="#{cycle 'odd', 'even'}"
|
||||
td.name class="#{line[:id].to_s == '0' ? 'summary' : ''}"
|
||||
- if line[:filter].nil?
|
||||
|
@ -1,11 +1,10 @@
|
||||
= render(partial: 'additionals/live_search_ajax_call.js', layout: false, formats: [:js])
|
||||
- unless defined? classes
|
||||
- classes = 'title'
|
||||
- classes = 'title' unless defined? classes
|
||||
h2 class="#{classes}"
|
||||
= @query.new_record? ? l(title) : h(@query.name)
|
||||
span.additionals-live-search
|
||||
= text_field_tag(:search,
|
||||
= text_field_tag :search,
|
||||
q,
|
||||
autocomplete: 'off',
|
||||
class: 'live-search-field',
|
||||
placeholder: l(:label_query_name_search))
|
||||
placeholder: l(:label_query_name_search)
|
||||
|
@ -2,5 +2,4 @@
|
||||
= additionals_library_load :font_awesome
|
||||
= stylesheet_link_tag 'additionals', plugin: 'additionals'
|
||||
= javascript_include_tag 'additionals', plugin: 'additionals'
|
||||
- unless Redmine::Plugin.installed? 'redmine_hrm'
|
||||
- render_custom_top_menu_item
|
||||
- render_custom_top_menu_item unless Redmine::Plugin.installed? 'redmine_hrm'
|
||||
|
@ -16,8 +16,8 @@ fieldset.box
|
||||
- columns.each do |s|
|
||||
label.inline
|
||||
- value = @settings[setting_name_totals.to_sym].present? ? @settings[setting_name_totals.to_sym].include?(s.name.to_s) : false
|
||||
= check_box_tag("settings[#{setting_name_totals}][]",
|
||||
= check_box_tag "settings[#{setting_name_totals}][]",
|
||||
s.name,
|
||||
value,
|
||||
id: nil)
|
||||
id: nil
|
||||
= s.caption
|
||||
|
@ -9,10 +9,7 @@
|
||||
|
||||
.splitcontent
|
||||
.splitcontentleft
|
||||
|
||||
- if @dashboard.new_record?
|
||||
= hidden_field_tag 'dashboard[dashboard_type]', @dashboard.dashboard_type
|
||||
|
||||
= hidden_field_tag 'dashboard[dashboard_type]', @dashboard.dashboard_type if @dashboard.new_record?
|
||||
- if @project && @allowed_projects.present? && @allowed_projects.count > 1
|
||||
p
|
||||
= f.select :project_id,
|
||||
|
@ -1,7 +1,7 @@
|
||||
- if @subprojects.any?
|
||||
h3.icon.icon-projects
|
||||
= l(:label_subproject_plural)
|
||||
= l :label_subproject_plural
|
||||
ul.subprojects
|
||||
- @subprojects.each do |project|
|
||||
li
|
||||
= link_to(project.name, project_path(project), class: project.css_classes).html_safe
|
||||
= link_to project.name, project_path(project), class: project.css_classes
|
||||
|
@ -7,7 +7,7 @@
|
||||
h3 = l(:label_issue_change_status)
|
||||
ul.issue-status-change-sidebar
|
||||
- statuses.each do |s|
|
||||
- if s != @issue.status
|
||||
- next if s == @issue.status
|
||||
li
|
||||
- if s.is_closed?
|
||||
= link_to(font_awesome_icon('fas_caret-square-left', post_text: s.name),
|
||||
|
@ -6,8 +6,7 @@
|
||||
edit_project_dashboard_path(@project, @dashboard),
|
||||
class: 'icon icon-edit'
|
||||
|
||||
- unless Redmine::Plugin.installed? 'redmine_reporting'
|
||||
= bookmark_link @project
|
||||
= bookmark_link @project unless Redmine::Plugin.installed? 'redmine_reporting'
|
||||
= call_hook :view_project_contextual_links, project: @project
|
||||
|
||||
- if @dashboard&.editable?
|
||||
@ -49,9 +48,7 @@
|
||||
class: 'icon icon-del'
|
||||
|
||||
= sidebar_action_toggle @dashboard_sidebar, @dashboard, @project
|
||||
- unless @dashboard_sidebar
|
||||
= render_dashboard_actionlist @dashboard, @project
|
||||
|
||||
= render_dashboard_actionlist @dashboard, @project unless @dashboard_sidebar
|
||||
= call_hook :view_project_actions_dropdown, project: @project
|
||||
|
||||
- if User.current.allowed_to?(:edit_project, @project)
|
||||
|
@ -1,4 +1,3 @@
|
||||
- if Additionals.setting?(:new_issue_on_profile) && @memberships.present?
|
||||
- project_url = memberships_new_issue_project_url user, @memberships
|
||||
- if project_url.present?
|
||||
= link_to l(:label_issue_new), project_url, class: 'user-new-issue icon icon-add'
|
||||
= link_to l(:label_issue_new), project_url, class: 'user-new-issue icon icon-add' if project_url.present?
|
||||
|
@ -21,8 +21,7 @@
|
||||
= delete_dashboard_link dashboard_path(@dashboard),
|
||||
class: 'icon icon-del'
|
||||
= sidebar_action_toggle @dashboard_sidebar, @dashboard
|
||||
- unless @dashboard_sidebar
|
||||
= render_dashboard_actionlist @dashboard
|
||||
= render_dashboard_actionlist @dashboard unless @dashboard_sidebar
|
||||
|
||||
= call_hook :view_welcome_show_actions_dropdown
|
||||
|
||||
|
@ -16,7 +16,8 @@
|
||||
= l :field_login
|
||||
' :
|
||||
= link_to user.login, "/users/#{user.id}"
|
||||
- unless user.pref.hide_mail
|
||||
- next if user.pref.hide_mail
|
||||
|
||||
.user.line
|
||||
= l :field_mail
|
||||
' :
|
||||
|
Loading…
Reference in New Issue
Block a user