Fixing coding standards

This commit is contained in:
Alexander Meindl 2020-08-08 12:13:03 +02:00
parent 400ac2f2f8
commit 7da3d5d1a9
10 changed files with 42 additions and 37 deletions

View File

@ -1,6 +1,6 @@
.info = t(:label_top_menu_help_html)
.info = t :label_top_menu_help_html
br
h3 = l(:label_custom_menu_items)
h3 = l :label_custom_menu_items
- 5.times do |i|
fieldset
@ -15,13 +15,13 @@ h3 = l(:label_custom_menu_items)
= additionals_settings_textfield "custom_menu#{i}_title".to_sym, label: l(:field_title), size: 80
i
| (
= l(:label_optional)
= l :label_optional
| )
p
label = h l(:label_permissions)
- permission_field = 'custom_menu' + i.to_s + '_roles'
- permission_field = "custom_menu#{i}_roles"
- menu_roles = Struct.new(:id, :name)
= select_tag('settings[' + permission_field + ']',
= select_tag("settings[#{permission_field}]",
options_from_collection_for_select(Role.sorted.collect { |m| menu_roles.new(m.id, m.name) },
:id,
:name,
@ -30,10 +30,12 @@ h3 = l(:label_custom_menu_items)
em.info = l(:menu_roles_info)
br
h3 = l(:label_settings)
h3 = l :label_settings
p
= additionals_settings_checkbox :remove_help
em.info = l(:remove_help_info)
em.info = l :remove_help_info
p
= additionals_settings_checkbox :remove_mypage
em.info = l(:remove_mypage_info)
em.info = l :remove_mypage_info

View File

@ -1,4 +1,4 @@
h3.icon.icon-document = l(:label_document_plural)
h3.icon.icon-document = l :label_document_plural
- if @can_edit
div id="#{block}-settings" style='display: none;'
@ -19,9 +19,9 @@ h3.icon.icon-document = l(:label_document_plural)
p
- if @project
= link_to l(:label_document_view_all), project_documents_path(@project)
- else
/- else
/ no route available
/= link_to l(:label_news_view_all), documents_path
- else
p.nodata = l(:label_no_data)
p.nodata = l :label_no_data

View File

@ -6,7 +6,7 @@ h3 = block_definition[:label]
- if @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?)
ul.reporting-list
- unless @project.homepage.blank?
- if @project.homepage.present?
li
span.label
= l(:field_homepage)

View File

@ -1,5 +1,5 @@
h3.icon.icon-issue
= l(:label_issue_tracking)
= l :label_issue_tracking
'
= link_to l(:label_details),
project_issues_report_details_path(@project, detail: 'tracker'),
@ -12,11 +12,11 @@ h3.icon.icon-issue
tr
th
th
= l(:label_open_issues_plural)
= l :label_open_issues_plural
th
= l(:label_closed_issues_plural)
= l :label_closed_issues_plural
th
= l(:label_total)
= l :label_total
tbody
- @trackers.each do |tracker|
tr
@ -25,9 +25,11 @@ h3.icon.icon-issue
td
= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, set_filter: 1, tracker_id: tracker.id)
td
= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i), project_issues_path(@project, set_filter: 1, tracker_id: tracker.id, status_id: 'c')
= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i),
project_issues_path(@project, set_filter: 1, tracker_id: tracker.id, status_id: 'c')
td.total
= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, set_filter: 1, tracker_id: tracker.id, status_id: '*')
= link_to @total_issues_by_tracker[tracker].to_i,
project_issues_path(@project, set_filter: 1, tracker_id: tracker.id, status_id: '*')
p
= link_to l(:label_issue_view_all), project_issues_path(@project, set_filter: 1)
' |

View File

@ -26,7 +26,7 @@
locals: { query_block[:entities_var] => query.send(query_block[:entries_method],
limit: settings[:max_entries] || DashboardContent::DEFAULT_MAX_ENTRIES),
query: query,
query_options: { sort_param: "sort",
query_options: { sort_param: 'sort',
sort_link_options: { method: :post, remote: true } } }
- else
p.nodata = l(:label_no_data)

View File

@ -48,7 +48,7 @@ h3
- entries_by_day[day].each do |entry|
tr.time-entry.hascontextmenu id="time-entry-#{entry.id}"
td.activity
= check_box_tag("ids[]", entry.id, false, style: 'display:none;', id: nil)
= check_box_tag('ids[]', entry.id, false, style: 'display: none;', id: nil)
= entry.activity
td.subject
= entry.project

View File

@ -7,7 +7,7 @@
edit_project_dashboard_path(@project, @dashboard),
class: 'icon icon-edit'
- unless Redmine::Plugin.installed?('redmine_reporting')
- unless Redmine::Plugin.installed? 'redmine_reporting'
= bookmark_link @project
= call_hook :view_project_contextual_links, project: @project
@ -40,7 +40,6 @@
= link_to l(:button_copy), copy_project_path(@project), class: 'icon icon-copy'
= link_to l(:button_delete), project_path(@project), method: :delete, class: 'icon icon-del'
- if User.current.allowed_to? :save_dashboards, @project
= link_to l(:label_new_dashboard),
new_project_dashboard_path(@project),

View File

@ -1,4 +1,6 @@
- if field_name == 'assigned_to_id'
- rows = Setting.issue_group_assignment? ? @project.visible_principals : @project.visible_users # rubocop:disable Lint/UselessAssignment
- elsif field_name == 'author_id'
- rows = @project.visible_users # rubocop:disable Lint/UselessAssignment
ruby:
case field_name
when 'assigned_to_id'
rows = Setting.issue_group_assignment? ? @project.visible_principals : @project.visible_users # rubocop:disable Lint/UselessAssignment
when 'author_id'
rows = @project.visible_users # rubocop:disable Lint/UselessAssignment

View File

@ -7,14 +7,14 @@
tr id="project-#{project.id}" class="#{project_list_css_classes(project, level)}"
td.name
span[style='font-weight: bold;']
- if Redmine::Plugin.installed?('redmine_reporting')
= project_name_with_icon(project)
- if Redmine::Plugin.installed? 'redmine_reporting'
= project_name_with_icon project
- else
= link_to_project(project)
= link_to_project project
- if project.homepage?
' :
= link_to(project.homepage, project.homepage, @html_options)
- if with_create_issue && User.current.allowed_to?(:add_issues, project)
= link_to('',
= link_to '',
new_project_issue_path(project_id: project),
class: 'icon icon-add', title: l(:label_issue_new))
class: 'icon icon-add', title: l(:label_issue_new)

View File

@ -6,18 +6,18 @@
div[style="float: left; display: block; margin-right: 5px;"]
= avatar(user, size: 50)
.user.line[style="font-weight: bold;"]
= link_to_user(user)
= link_to_user user
- if !user_roles.nil? && user_roles[user.id]
.user.line
= l(:field_role)
= l :field_role
' :
= user_roles[user.id].join(', ').html_safe
.user.line
= l(:field_login)
= l :field_login
' :
= link_to user.login, '/users/' + user.id.to_s
= link_to user.login, "/users/#{user.id}"
- unless user.pref.hide_mail
.user.line
= l(:field_mail)
= l :field_mail
' :
= mail_to(user.mail, nil, encode: 'javascript')
= mail_to user.mail, nil, encode: 'javascript'