Apply Layout/LineLength rubocop rule
Note we're excluding a few files: * Configuration files that weren't generated by us * Migration files that weren't generated by us * The Gemfile, since it includes an important comment that must be on the same line as the gem declaration * The Budget::Stats class, since the heading statistics are a mess and having shorter lines would require a lot of refactoring
This commit is contained in:
@@ -6,7 +6,10 @@ module AdminHelper
|
||||
def official_level_options
|
||||
options = [["", 0]]
|
||||
(1..5).each do |i|
|
||||
options << [[t("admin.officials.level_#{i}"), setting["official_level_#{i}_name"]].compact.join(": "), i]
|
||||
options << [
|
||||
[t("admin.officials.level_#{i}"), setting["official_level_#{i}_name"]].compact.join(": "),
|
||||
i
|
||||
]
|
||||
end
|
||||
options
|
||||
end
|
||||
|
||||
@@ -21,9 +21,17 @@ module CommentsHelper
|
||||
|
||||
def comment_button_text(parent_id, commentable)
|
||||
if commentable.class == Legislation::Question
|
||||
parent_id.present? ? t("comments_helper.reply_button") : t("legislation.questions.comments.comment_button")
|
||||
if parent_id.present?
|
||||
t("comments_helper.reply_button")
|
||||
else
|
||||
t("legislation.questions.comments.comment_button")
|
||||
end
|
||||
else
|
||||
parent_id.present? ? t("comments_helper.reply_button") : t("comments_helper.comment_button")
|
||||
if parent_id.present?
|
||||
t("comments_helper.reply_button")
|
||||
else
|
||||
t("comments_helper.comment_button")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -8,7 +8,11 @@ module CommunitiesHelper
|
||||
end
|
||||
|
||||
def community_description(community)
|
||||
community.from_proposal? ? t("community.show.description.proposal") : t("community.show.description.investment")
|
||||
if community.from_proposal?
|
||||
t("community.show.description.proposal")
|
||||
else
|
||||
t("community.show.description.investment")
|
||||
end
|
||||
end
|
||||
|
||||
def author?(community, participant)
|
||||
@@ -28,7 +32,11 @@ module CommunitiesHelper
|
||||
end
|
||||
|
||||
def community_access_text(community)
|
||||
community.from_proposal? ? t("community.sidebar.description.proposal") : t("community.sidebar.description.investment")
|
||||
if community.from_proposal?
|
||||
t("community.sidebar.description.proposal")
|
||||
else
|
||||
t("community.sidebar.description.investment")
|
||||
end
|
||||
end
|
||||
|
||||
def create_topic_link(community)
|
||||
|
||||
@@ -49,7 +49,10 @@ module MailerHelper
|
||||
end
|
||||
|
||||
def css_for_mailer_button
|
||||
mailer_font_family + "background: #004a83;border-radius: 6px;color: #fff!important;display: inline-block;font-weight: bold;margin: 0;min-width: 200px;padding: 10px 15px;text-align: center;text-decoration: none;"
|
||||
mailer_font_family + "background: #004a83;border-radius: 6px;color: #fff!important;" \
|
||||
"display: inline-block;font-weight: bold;margin: 0;" \
|
||||
"min-width: 200px;padding: 10px 15px;text-align: center;" \
|
||||
"text-decoration: none;"
|
||||
end
|
||||
|
||||
def css_for_mailer_link
|
||||
|
||||
@@ -2,7 +2,8 @@ module ProposalsHelper
|
||||
def progress_bar_percentage(proposal)
|
||||
case proposal.cached_votes_up
|
||||
when 0 then 0
|
||||
when 1..Proposal.votes_needed_for_success then (proposal.total_votes.to_f * 100 / Proposal.votes_needed_for_success).floor
|
||||
when 1..Proposal.votes_needed_for_success
|
||||
(proposal.total_votes.to_f * 100 / Proposal.votes_needed_for_success).floor
|
||||
else 100
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user