Fix volunteer teams layout

This commit is contained in:
Petko Bordjukov 2015-09-02 00:20:23 +03:00
parent b9c4670f17
commit 256671d0be
3 changed files with 12 additions and 9 deletions

View File

@ -4,6 +4,7 @@
@import 'bootstrap/variables'; @import 'bootstrap/variables';
@import 'bootstrap/mixins'; @import 'bootstrap/mixins';
@import 'bootstrap/grid'; @import 'bootstrap/grid';
@import 'bootstrap/utilities';
@import 'initfest/styles'; @import 'initfest/styles';
@import 'initfest/forms'; @import 'initfest/forms';

View File

@ -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']

View File

@ -3,12 +3,4 @@
h1 = VolunteerTeam.model_name.human(count: 2).mb_chars.capitalize h1 = VolunteerTeam.model_name.human(count: 2).mb_chars.capitalize
.container.volunteer_teams .container.volunteer_teams
- @volunteer_teams.each do |vt| = render partial: 'volunteer_team', collection: @volunteer_teams
.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']