changes from comments, fix commercials failing test
This commit is contained in:
parent
d794593e10
commit
beb88b848d
15 changed files with 58 additions and 77 deletions
|
|
@ -6,13 +6,13 @@
|
|||
%hr
|
||||
.row
|
||||
.col-md-6
|
||||
= semantic_form_for(:user, url: add_user_admin_conference_path(@conference.short_title, role: @selected), remote: true) do |f|
|
||||
= semantic_form_for(:user, url: add_user_admin_conference_path(@conference.short_title, role: @selection), remote: true) do |f|
|
||||
%h4
|
||||
= f.input :email, label: "Add role '#{@selected}' to user: ", placeholder: "User's email"
|
||||
= f.action :submit, as: :button, label: "Add User", button_html: {value: 'Add', class: 'btn btn-primary'}
|
||||
= f.input :email, label: "Add role '#{@selection.humanize.titleize}' to user: ", placeholder: "User's email", input_html: { required: 'required' }
|
||||
= f.action :submit, as: :button, label: 'Add User', button_html: {value: 'Add', class: 'btn btn-primary'}
|
||||
.row
|
||||
.col-md-12
|
||||
%h3 Users with role #{@selected}
|
||||
%h3 Users with role #{@selection.humanize.titleize}
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%th ID
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
- @role_users[@selection].each do |user|
|
||||
%tr
|
||||
%td
|
||||
= link_to remove_user_admin_conference_path(@conference.short_title, user_id: user.id, role: @selected), method: :delete, remote: true, title: 'Remove user' do
|
||||
= link_to remove_user_admin_conference_path(@conference.short_title, user_id: user.id, role: @selection), method: :delete, remote: true, title: 'Remove user' do
|
||||
%i{class: 'fa fa-times'}
|
||||
= user.id
|
||||
%td= user.name
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
.row
|
||||
.col-md-8
|
||||
.pull-right
|
||||
%b= link_to 'Create New Question','#', 'data-toggle' => 'modal',
|
||||
'data-target' => '#new-question', class: 'btn btn-success'
|
||||
- if can? :create, Question.new(conference_id: @conference.id)
|
||||
%b= link_to 'Create New Question','#', 'data-toggle' => 'modal',
|
||||
'data-target' => '#new-question', class: 'btn btn-success'
|
||||
%br
|
||||
%br
|
||||
- if @questions.count > 0
|
||||
= semantic_form_for(@conference, url: admin_conference_questions_update_conference_path(@conference.short_title)) do |f|
|
||||
.questions{id: 'myquestions'}
|
||||
= render partial: 'questions'
|
||||
= f.submit "Update Questions for #{@conference.short_title}", class: 'btn btn-primary',
|
||||
confirm: 'Are you sure you want to make these changes?'
|
||||
- if can? :update, @conference
|
||||
= f.submit "Update Questions for #{@conference.short_title}", class: 'btn btn-primary',
|
||||
confirm: 'Are you sure you want to make these changes?'
|
||||
|
||||
.modal.fade{id: 'new-question', 'role' => 'dialog', 'aria-hidden' => 'true'}
|
||||
.modal-dialog
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
%table.table
|
||||
- @show_attributes.each do |attr|
|
||||
%tr
|
||||
%td{style: 'width:20%'}
|
||||
%td{class: 'table20'}
|
||||
%b
|
||||
= attr.capitalize.gsub('_', ' ')
|
||||
- if attr == 'roles'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue