Implement consistent admin interface

* Consistent route/model/controller/view layout
* Get rid of unused photos, speakers, dietchoices, social_events controllers
* Drop unused :public from Rooms and :description from CallForPapers
This commit is contained in:
Henne Vogelsang 2014-11-25 10:47:18 +01:00
parent f6a87331be
commit 28063129c7
133 changed files with 1461 additions and 1461 deletions

View file

@ -0,0 +1,15 @@
.row
.col-md-12
.page-header
%h1
-if @target.new_record?
New
Target
.row
.col-md-8
= semantic_form_for(@target, :url => (@target.new_record? ? admin_conference_targets_path : admin_conference_target_path(@conference.short_title, @target))) do |f|
= f.input :due_date, as: :string, input_html: { class: 'target-due-date-datepicker'}, label: 'Until when do you want to have '
= f.input :target_count, label: 'this amount of '
= f.input :unit, as: :select, label: 'Unit', class: 'form-control', collection: Target.units.values, include_blank: false, label: 'units '
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,6 +0,0 @@
.nested-fields
= f.inputs do
= f.input :due_date, as: :string, input_html: { class: 'target-due-date-datepicker', readonly: 'readonly' }
= f.input :target_count
= f.input :unit, as: :select, label: 'Unit', class: 'form-control', collection: Target.units.values, include_blank: false
= remove_association_link :target, f

View file

@ -1,5 +1,35 @@
.row
.col-md-8
= semantic_form_for(@conference, url: admin_conference_target_path(@conference.short_title, @conference.targets)) do |f|
= dynamic_association :targets, 'Targets', f
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
.col-md-12
.page-header
%h1 Targets
%p.text-muted
Set up goals for your conference
.row
.col-md-12
%table.table.table-hover#targets
%thead
%tr
%th Due Date
%th Target Count
%th Unit
%th Actions
%tbody
- @targets.each do |target|
%tr
%td{'id'=> "due_date_#{target.id}"}
= target.due_date
%td{'id'=> "count#{target.id}"}
= target.target_count
%td{'id'=> "unit_#{target.id}"}
= target.unit
%td
.btn-group
= link_to 'Edit',
edit_admin_conference_target_path(@conference.short_title, target.id),
class: 'btn btn-primary'
= link_to 'Delete',
admin_conference_target_path(@conference.short_title, target.id),
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete this target?" }
.row
.col-md-12
= link_to 'New Target', new_admin_conference_target_path, class: 'btn btn-success pull-right'