diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 064a202cb..f03c76038 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -5,7 +5,7 @@ // 03. Show participation // 04. List participation // 05. Featured -// 06. Proposals successfull +// 06. Proposals successful // // 01. Votes and supports @@ -942,7 +942,7 @@ } } -// 06. Proposals successfull +// 06. Proposals successful // ------------------------- .dark-heading { @@ -1001,9 +1001,9 @@ } .sucessfull-proposals-banner, -.successfull .panel { +.successful .panel { - .icon-successfull { + .icon-successful { border-right: 60px solid #FFD200; border-top: 0; border-bottom: 60px solid transparent; @@ -1034,7 +1034,7 @@ } } -.successfull { +.successful { .panel { position: relative; diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index 7d2149cad..f97334d84 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -22,7 +22,7 @@ class DebatesController < ApplicationController def index_customization @featured_debates = @debates.featured - @proposal_successfull_exists = Proposal.successfull.exists? + @proposal_successful_exists = Proposal.successful.exists? end def show diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index c729401aa..3bf559c17 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -28,8 +28,8 @@ class ProposalsController < ApplicationController def index_customization discard_archived load_retired - load_successfull_proposals - load_featured unless @proposal_successfull_exists + load_successful_proposals + load_featured unless @proposal_successful_exists end def vote @@ -103,8 +103,8 @@ class ProposalsController < ApplicationController end end - def load_successfull_proposals - @proposal_successfull_exists = Proposal.successfull.exists? + def load_successful_proposals + @proposal_successful_exists = Proposal.successful.exists? end end diff --git a/app/models/proposal.rb b/app/models/proposal.rb index 7bd4b7a92..75e5cbe20 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -50,7 +50,7 @@ class Proposal < ActiveRecord::Base scope :last_week, -> { where("proposals.created_at >= ?", 7.days.ago)} scope :retired, -> { where.not(retired_at: nil) } scope :not_retired, -> { where(retired_at: nil) } - scope :successfull, -> { where("cached_votes_up + physical_votes >= ?", Proposal.votes_needed_for_success)} + scope :successful, -> { where("cached_votes_up + physical_votes >= ?", Proposal.votes_needed_for_success)} def to_param "#{id}-#{title}".parameterize @@ -159,7 +159,7 @@ class Proposal < ActiveRecord::Base Setting['votes_for_proposal_success'].to_i end - def successfull? + def successful? total_votes >= Proposal.votes_needed_for_success end diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 7912bf421..4cee62dd3 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -29,11 +29,11 @@ <%= render "shared/banner" %> <% end %> - <% if @proposal_successfull_exists %> - <%= render "proposals/successfull_banner" %> + <% if @proposal_successful_exists %> + <%= render "proposals/successful_banner" %> <% end %> - <% unless @tag_filter || @search_terms || !has_featured? || @proposal_successfull_exists %> + <% unless @tag_filter || @search_terms || !has_featured? || @proposal_successful_exists %> <%= render "featured_debates" %> <% end %> diff --git a/app/views/proposals/_proposal.html.erb b/app/views/proposals/_proposal.html.erb index 436409580..d0a56cd20 100644 --- a/app/views/proposals/_proposal.html.erb +++ b/app/views/proposals/_proposal.html.erb @@ -1,8 +1,8 @@
Proposal.votes_needed_for_success) %>" + class="proposal clear <%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>" data-type="proposal">
-
+
@@ -53,10 +53,10 @@
- <% if proposal.successfull? %> + <% if proposal.successful? %>

- <%= t("proposals.proposal.successfull", + <%= t("proposals.proposal.successful", voting: link_to(t("proposals.proposal.voting"), polls_path)).html_safe %>

diff --git a/app/views/proposals/_proposal_ballots_banner.html.erb b/app/views/proposals/_proposal_ballots_banner.html.erb index 1e095b767..662865c44 100644 --- a/app/views/proposals/_proposal_ballots_banner.html.erb +++ b/app/views/proposals/_proposal_ballots_banner.html.erb @@ -1,7 +1,7 @@