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:
parent
f6a87331be
commit
28063129c7
133 changed files with 1461 additions and 1461 deletions
15
app/views/admin/tracks/_form.html.haml
Normal file
15
app/views/admin/tracks/_form.html.haml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
-if @track.new_record?
|
||||
New
|
||||
= @track.name
|
||||
Track
|
||||
.row
|
||||
.col-md-12
|
||||
= semantic_form_for(@track, :url => (@track.new_record? ? admin_conference_tracks_path : admin_conference_track_path(@conference.short_title, @track))) do |f|
|
||||
= f.input :name
|
||||
= f.input :color, :input_html => {:size => 6, :type => "color"}, :required=> true
|
||||
= f.input :description, :input_html => {:rows => 2, data: { provide: "markdown-editable" } }, hint: markdown_hint
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :color, :input_html => {:size => 6, :type => "color"}, :required=> true %>
|
||||
<%= f.input :description, :input_html => {:rows => 2, data: { provide: "markdown-editable" } }, hint: markdown_hint %>
|
||||
<%= remove_association_link :track, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,5 +1,36 @@
|
|||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@conference, :url => admin_conference_track_path(@conference.short_title, @conference.tracks)) do |f|
|
||||
= dynamic_association :tracks, "Tracks", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 Tracks
|
||||
%p.text-muted
|
||||
Categorize events in your conference
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover#tracks
|
||||
%thead
|
||||
%th Name
|
||||
%th Description
|
||||
%th Color
|
||||
%th Actions
|
||||
%tbody
|
||||
- @conference.tracks.each do |track|
|
||||
%tr
|
||||
%td
|
||||
= link_to(admin_conference_track_path(@conference.short_title, track)) do
|
||||
= track.name
|
||||
%td
|
||||
%p
|
||||
= truncate(track.description)
|
||||
%td
|
||||
%span.label{style: "background-color: #{track.color};"}
|
||||
= track.color
|
||||
%td
|
||||
.btn-group{role: "group"}
|
||||
= link_to 'Edit', edit_admin_conference_track_path(@conference.short_title, track.id),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
= link_to 'Delete', admin_conference_track_path(@conference.short_title, track.id),
|
||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete #{track.name}?" }
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= link_to 'New Track', new_admin_conference_track_path(@conference.short_title), class: 'btn btn-success'
|
||||
|
||||
|
|
|
|||
31
app/views/admin/tracks/show.html.haml
Normal file
31
app/views/admin/tracks/show.html.haml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
= @track.name
|
||||
Track
|
||||
%p.text-muted
|
||||
Events in this track
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover.datatable
|
||||
%thead
|
||||
%th Title
|
||||
%th Type
|
||||
%th Submitter
|
||||
%th State
|
||||
%th Time
|
||||
%tbody
|
||||
- @track.events.each_with_index do |event|
|
||||
%tr
|
||||
%td
|
||||
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
||||
%td
|
||||
= event.event_type.title
|
||||
%td
|
||||
=link_to event.submitter.name, admin_user_path(event.submitter)
|
||||
%td
|
||||
= event.state
|
||||
%td
|
||||
= event.start_time
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue