diff --git a/lib/initfest/assets/stylesheets/initfest/application.scss b/lib/initfest/assets/stylesheets/initfest/application.scss index ef387a3..41d685a 100644 --- a/lib/initfest/assets/stylesheets/initfest/application.scss +++ b/lib/initfest/assets/stylesheets/initfest/application.scss @@ -4,6 +4,7 @@ @import 'bootstrap/variables'; @import 'bootstrap/mixins'; @import 'bootstrap/grid'; +@import 'bootstrap/utilities'; @import 'initfest/styles'; @import 'initfest/forms'; diff --git a/lib/initfest/views/public/volunteerships/_volunteer_team.slim b/lib/initfest/views/public/volunteerships/_volunteer_team.slim new file mode 100644 index 0000000..9e2ed79 --- /dev/null +++ b/lib/initfest/views/public/volunteerships/_volunteer_team.slim @@ -0,0 +1,10 @@ +- if volunteer_team_counter % 3 == 0 + .clearfix.visible-lg-block +.col-lg-3 + h2 = volunteer_team.name + .description + = simple_format volunteer_team.description + - if volunteer_team.include? current_user + = button_to t('views.volunteerships.withdraw_application'), volunteership_path(volunteer_team.volunteerships.where(volunteer: current_user).first), class: ['btn-link', 'btn-link-red'], method: :delete + - else + = button_to t('views.volunteerships.apply'), volunteer_team_volunteership_path(volunteer_team), class: ['btn-link'] diff --git a/lib/initfest/views/public/volunteerships/index.slim b/lib/initfest/views/public/volunteerships/index.slim index 2db5855..957d8c2 100644 --- a/lib/initfest/views/public/volunteerships/index.slim +++ b/lib/initfest/views/public/volunteerships/index.slim @@ -3,12 +3,4 @@ h1 = VolunteerTeam.model_name.human(count: 2).mb_chars.capitalize .container.volunteer_teams - - @volunteer_teams.each do |vt| - .col-lg-3 - h2 = vt.name - p - = vt.description - - if vt.include? current_user - = button_to t('views.volunteerships.withdraw_application'), volunteership_path(vt.volunteerships.where(volunteer: current_user).first), class: ['btn-link', 'btn-link-red'], method: :delete - - else - = button_to t('views.volunteerships.apply'), volunteer_team_volunteership_path(vt), class: ['btn-link'] + = render partial: 'volunteer_team', collection: @volunteer_teams