2015-05-10 13:36:29 +03:00
|
|
|
.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
|
2015-05-25 11:41:11 +03:00
|
|
|
th = User.human_attribute_name :picture
|
2015-05-10 13:36:29 +03:00
|
|
|
th = User.human_attribute_name :title
|
|
|
|
th = User.human_attribute_name :admin
|
|
|
|
th.actions
|
|
|
|
tbody
|
2015-07-30 21:19:03 +03:00
|
|
|
- @users.each do |user|
|
|
|
|
- profile = user.personal_profile(@conference)
|
2015-05-30 18:53:14 +03:00
|
|
|
|
2015-07-30 21:19:03 +03:00
|
|
|
- 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')
|
2015-05-10 13:36:29 +03:00
|
|
|
|
2015-07-30 21:19:03 +03:00
|
|
|
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}]
|