More slim converts

This commit is contained in:
Alexander Meindl 2017-12-14 17:48:04 +01:00
parent 1dcdf1692d
commit d87fae457b
12 changed files with 67 additions and 43 deletions

View File

@ -1,3 +1,36 @@
linters:
LineLength:
max: 140
RuboCop:
ignored_cops:
- Layout/AlignArray
- Layout/AlignHash
- Layout/AlignParameters
- Layout/BlockEndNewline
- Layout/FirstParameterIndentation
- Layout/IndentArray
- Layout/IndentationConsistency
- Layout/IndentationWidth
- Layout/IndentHash
- Layout/MultilineArrayBraceLayout
- Layout/MultilineAssignmentLayout
- Layout/MultilineBlockLayout
- Layout/MultilineHashBraceLayout
- Layout/MultilineMethodCallBraceLayout
- Layout/MultilineMethodCallIndentation
- Layout/MultilineMethodDefinitionBraceLayout
- Layout/MultilineOperationIndentation
- Layout/TrailingBlankLines
- Layout/TrailingWhitespace
- Lint/BlockAlignment
- Lint/EndAlignment
- Lint/Void
- Metrics/BlockLength
- Metrics/BlockNesting
- Metrics/LineLength
- Naming/FileName
- Rails/OutputSafety
- Style/FrozenStringLiteralComment
- Style/IfUnlessModifier
- Style/Next
- Style/WhileUntilModifier

View File

@ -1,5 +1,5 @@
- login_text = Additionals.settings[:account_login_bottom]
- if login_text.present?
br
.login-additionals
= textilizable(login_text)
br
.login-additionals
= textilizable(login_text)

View File

@ -1,8 +0,0 @@
<% if show_issue_change_author?(issue) && issue.safe_attribute?('author_id') %>
<p id='change_author'><%= form.select :author_id, issue_author_options_for_select(issue.project, issue), { required: true } %></p>
<%= javascript_tag do %>
$('#change_author').insertBefore($('#issue_tracker_id').parent());
<% end %>
<% end %>

View File

@ -0,0 +1,5 @@
- if show_issue_change_author?(issue) && issue.safe_attribute?('author_id')
p#change_author
= form.select :author_id, issue_author_options_for_select(issue.project, issue), { required: true }
javascript:
$('#change_author').insertBefore($('#issue_tracker_id').parent());

View File

@ -1,6 +0,0 @@
<% if @project && User.current.allowed_to?(:edit_issue_author, @project) %>
<p id='change_author'>
<%= label_tag('issue[author_id]', l(:field_author)) %>
<%= select_tag('issue[author_id]', content_tag('option', l(:label_no_change_option), :value => '') + issue_author_options_for_select(@project)) %>
</p>
<% end %>

View File

@ -0,0 +1,4 @@
- if @project && User.current.allowed_to?(:edit_issue_author, @project)
p#change_author
= label_tag('issue[author_id]', l(:field_author))
= select_tag('issue[author_id]', content_tag('option', l(:label_no_change_option), value: '') + issue_author_options_for_select(@project))

View File

@ -1,7 +0,0 @@
<% unless @issue.new_ticket_message.blank? %>
<div class="nodata nodata-left">
<%= textilizable(@issue.new_ticket_message).html_safe %>
</div>
<% end %>

View File

@ -0,0 +1,3 @@
- unless @issue.new_ticket_message.blank?
.nodata.nodata-left
= textilizable(@issue.new_ticket_message).html_safe

View File

@ -1,11 +1,11 @@
- if @users_by_role.any?
- view_roles = memberbox_view_roles
- if view_roles.count>0
.members.box
h3 = l(:label_member_plural)
p
- view_roles.each do |role|
= h role
' :
= @users_by_role[role].sort.collect{|u| link_to_user u}.join(', ').html_safe
br
- if view_roles.count > 0
.members.box
h3 = l(:label_member_plural)
p
- view_roles.each do |role|
= h role
' :
= @users_by_role[role].sort.collect { |u| link_to_user u }.join(', ').html_safe
br

View File

@ -1,5 +1,5 @@
- overview_bottom = Additionals.settings[:overview_bottom]
- unless overview_bottom.blank?
.clear_both
.overview-bottom.wiki.box
= textilizable(overview_bottom)
- if overview_bottom.present?
.clear_both
.overview-bottom.wiki.box
= textilizable(overview_bottom)

View File

@ -1,4 +1,4 @@
- overview_right = Additionals.settings[:overview_right]
- unless overview_right.blank?
.overview-right.wiki.box
= textilizable(overview_right)
- if overview_right.present?
.overview-right.wiki.box
= textilizable(overview_right)

View File

@ -1,4 +1,4 @@
- overview_top = Additionals.settings[:overview_top]
- unless overview_top.blank?
.overview-top.wiki.box
= textilizable(overview_top)
- if overview_top.present?
.overview-top.wiki.box
= textilizable(overview_top)