Implemented list of statements

This commit is contained in:
2017-04-14 12:46:03 +02:00
parent 281caaf0fd
commit 7bd771dbc7
9 changed files with 67 additions and 17 deletions
+13
View File
@@ -0,0 +1,13 @@
- supporters = Supporter.where('publicity.state' => :approved).desc(:created_at)
h1 = title t('.title')
- supporters.each do |supporter|
.statement
= image_tag supporter.publicity.avatar.url(:small), alt: "#{supporter.first_name} #{supporter.last_name}"
h2= "#{supporter.first_name} #{supporter.last_name}, #{supporter.city}"
- unless supporter.publicity.organisation.blank?
em= ", #{supporter.publicity.organisation}"
br
= supporter.publicity.statement
hr.clearfix
+1
View File
@@ -8,6 +8,7 @@
= navbar_item t('.arguments'), arguments_path
= navbar_item t('.faq'), faq_path
= navbar_item t('.numbers'), numbers_path
= navbar_item t('.statements'), statements_path
= navbar_item t('.sponsoring'), sponsoring_path
= navbar_item t('.sign_in'), new_supporter_session_path unless supporter_signed_in?
= navbar_item t('.sign_out'), destroy_supporter_session_path, nil, 'data-method' => :delete if supporter_signed_in?