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

42 lines
1.6 KiB
Plaintext

.row
.col-lg-12
.panel.panel-default
.panel-heading
h2.panel-title= User.model_name.human(count: 2).mb_chars.capitalize
.panel-body
table.table.table-striped.table-hover.record-table#conferences
thead
tr
th = User.human_attribute_name :picture
th = User.human_attribute_name :title
th = User.human_attribute_name :admin
th.actions
tbody
- @users.each do |user|
- profile = user.personal_profile(@conference)
- if profile.present?
tr
td= image_tag(profile.picture.thumb.url)
td= profile.name
td.boolean-col
= link_to [:toggle_admin, :management, @conference, profile], method: :put do
- if user.admin?
.btn.btn-primary= icon('circle-o')
- else
.btn.btn-success= icon('dot-circle-o')
td.actions
div.btn-group.btn-group-sm
= action_buttons(@conference, profile, [:show, :edit, :destroy])
- else
tr
td= image_tag(PictureUploader.new.thumb.url)
td= user.email
td
td.actions
div.btn-group.btn-group-sm
-# TODO translation
= link_to 'Създай профил', [:new, :management, @conference, :personal_profile, {user_id: user.id}]