diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 1ab1eb726..064a202cb 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -846,7 +846,7 @@ // ------------ .featured-debates, .featured-proposals, -.proposals-ballot, .proposals-ballot-list { +.enquiries-list { padding: $line-height/2 0; @include breakpoint(medium) { @@ -953,6 +953,11 @@ padding-bottom: $line-height; } + &.enquiries { + background: #2D3E50 image-url('heading_enquiries.jpg') no-repeat; + background-position: 70%; + } + p { margin-bottom: 0; @@ -971,7 +976,7 @@ } } -.featured-proposals-ballot-banner { +.sucessfull-proposals-banner { background: #2D3E50 image-url("ballot_tiny.gif") no-repeat; background-position: 75% 0; position: relative; @@ -995,7 +1000,7 @@ } } -.featured-proposals-ballot-banner, +.sucessfull-proposals-banner, .successfull .panel { .icon-successfull { @@ -1019,9 +1024,9 @@ } } -.proposals-ballot-list { +.enquiries-list { - .proposal-sucessfull { + .enquiry { background: white; border-top: 1px solid $border; padding: $line-height 0; diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index ede5b0f5d..c729401aa 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -28,7 +28,7 @@ class ProposalsController < ApplicationController def index_customization discard_archived load_retired - load_proposal_ballots + load_successfull_proposals load_featured unless @proposal_successfull_exists end @@ -103,7 +103,7 @@ class ProposalsController < ApplicationController end end - def load_proposal_ballots + def load_successfull_proposals @proposal_successfull_exists = Proposal.successfull.exists? end diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 2cd3f2d53..7912bf421 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -30,10 +30,10 @@ <% end %> <% if @proposal_successfull_exists %> - <%= render "proposals/proposal_ballots_banner" %> + <%= render "proposals/successfull_banner" %> <% end %> - <% unless @tag_filter || @search_terms || !has_featured? || @proposal_ballots.present? || @proposal_successfull_exists %> + <% unless @tag_filter || @search_terms || !has_featured? || @proposal_successfull_exists %> <%= render "featured_debates" %> <% end %> diff --git a/app/views/enquiries/index.html.erb b/app/views/enquiries/index.html.erb new file mode 100644 index 000000000..68e780cb5 --- /dev/null +++ b/app/views/enquiries/index.html.erb @@ -0,0 +1,41 @@ +
+
+
+

+ <%= t("enquiries.index.title") %> +

+

+ <%= t("enquiries.index.description_html").html_safe %> +

+
+
+
+ +
+
+
+ <%= render 'shared/filter_subnav', i18n_namespace: "enquiries.index" %> + + <% if @enquiries.present? %> +
+ <% @enquiries.each do |enquiry| %> +
+

<%= link_to enquiry.title, enquiry %>

+
+ <%= t('enquiries.index.dates', + open_at: l(enquiry.open_at.to_date), + closed_at: l(enquiry.closed_at.to_date)).html_safe %> +
+
+ <% end %> +
+ + <%= paginate @enquiries %> + <% else %> +
+ <%= t("enquiries.index.no_enquiries_#{@current_filter}") %> +
+ <% end %> +
+
+
diff --git a/app/views/proposals/_proposal.html.erb b/app/views/proposals/_proposal.html.erb index e786d7896..436409580 100644 --- a/app/views/proposals/_proposal.html.erb +++ b/app/views/proposals/_proposal.html.erb @@ -56,8 +56,8 @@ <% if proposal.successfull? %>

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

<% if can? :create, Poll::Question %> diff --git a/app/views/proposals/_successfull_banner.html.erb b/app/views/proposals/_successfull_banner.html.erb new file mode 100644 index 000000000..c29ed5fe9 --- /dev/null +++ b/app/views/proposals/_successfull_banner.html.erb @@ -0,0 +1,9 @@ +
+ <%= link_to polls_path do %> +
+
+

<%= t("enquiries.banner.featured_title") %>

+

<%= t("enquiries.banner.info") %>

+
+ <% end %> +
diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index df9339619..6fce1c742 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -32,7 +32,7 @@ <% end %> <% if @proposal_successfull_exists %> - <%= render "proposal_ballots_banner" %> + <%= render "successfull_banner" %> <% elsif @featured_proposals.present? %>