clarion/app/views/management/volunteers/index.html.slim

60 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

2016-10-09 07:17:34 +03:00
- content_for :title
2016-10-09 07:23:07 +03:00
= Volunteer.model_name.human(count: 2).mb_chars.capitalize
2016-10-09 07:17:34 +03:00
.row
.col-lg-12
h1.page-header
= Volunteer.model_name.human(count: 2).mb_chars.capitalize
small<
| (
= t '.total', current: @volunteers.count, total: current_conference.volunteers.count
=< Volunteer.model_name.human(count: current_conference.volunteers.count).mb_chars.downcase
| )
.row
2016-10-09 15:11:22 +03:00
.col-md-3.collapse#filters
2016-10-09 07:17:34 +03:00
.panel.panel-default
.panel-heading
= VolunteerTeam.model_name.human.mb_chars.capitalize
.panel-body
ul.nav.nav-pills.nav-stacked
= content_tag :li, role: "presentation", class: @filters[:volunteer_team_id].blank? ? 'active' : nil
= link_to management_conference_volunteers_path(current_conference, filters: @filters.except(:volunteer_team_id))
= t '.all'
span.badge.pull-right = current_conference.volunteers.count
2016-10-09 07:17:34 +03:00
- current_conference.volunteer_teams.each do |volunteer_team|
= content_tag :li, role: "presentation", class: @filters[:volunteer_team_id] == volunteer_team.id.to_s ? 'active' : nil
= link_to management_conference_volunteers_path(current_conference, filters: @filters.merge({volunteer_team_id: volunteer_team.id}))
= volunteer_team.name
2016-10-09 15:11:22 +03:00
span.badge.pull-right = volunteer_team.volunteers.count
.col-md-9
2016-10-09 07:17:34 +03:00
.panel.panel-default
table.table.table-striped.table-hover.record-table#conferences
thead
tr
th = t '.profile'
th = Volunteer.human_attribute_name :volunteer_team
2016-10-09 07:17:34 +03:00
th.actions
tbody
- @volunteers.each do |volunteer|
tr
td
.media
.media-left
- if volunteer.picture.present?
= image_tag volunteer.picture.variant(resize_to_limit: [50, 50])
2016-10-09 07:17:34 +03:00
- else
= image_tag('avatar-placeholder.png')
2016-10-09 07:17:34 +03:00
.media-body
h4.media-heading
= volunteer.name
p
= icon(volunteer.confirmed_at.present? ? "envelope" : "envelope-o", "#{volunteer.confirmed_at.nil? ? '(unverified) ' : ''}#{volunteer.email}")
2016-10-09 07:17:34 +03:00
td
= volunteer.volunteer_team.name
2016-10-09 07:17:34 +03:00
td.actions
div.btn-group.btn-group-sm
= action_buttons(current_conference, volunteer, [:show, :edit])
.panel-footer.text-right
= link_to management_conference_volunteers_path(current_conference, format: 'csv', filters: @filters), class: 'btn btn-info'
2016-10-09 07:17:34 +03:00
= icon :download, t('.export')