UI/UX changes related to tracks
Add confirmed and cfp_active scopes to Track Render markdown in track's description Make the views more similar to the proposal/events views Change the sequence of columns in admin/Tracks#index Remove the short_name column from the index views Add button "My Tracks" in the user menu Fix track count in proposals Add details of track in admin/Tracks#show Use tabs to show track details and events
This commit is contained in:
parent
f9903eba16
commit
3d250ecf75
14 changed files with 269 additions and 132 deletions
|
|
@ -6,39 +6,46 @@
|
|||
Categorize events in your conference
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover#tracks
|
||||
%table.table.table-hover.table-striped.table-bordered.datatable#tracks
|
||||
%thead
|
||||
%th Name
|
||||
%th Short name
|
||||
%th Description
|
||||
%th Submitter
|
||||
%th Color
|
||||
%th State
|
||||
%th Included in the Cfp
|
||||
%th Room
|
||||
%th Start Date
|
||||
%th End Date
|
||||
%th Submitter
|
||||
%th Included in Cfp
|
||||
%th State
|
||||
%th Actions
|
||||
%tbody
|
||||
- @tracks.each do |track|
|
||||
%tr
|
||||
%td
|
||||
= link_to(admin_conference_program_track_path(@conference.short_title, track)) do
|
||||
= track.name
|
||||
%td
|
||||
= track.short_name
|
||||
%td{style: "padding: 15px 0px 0px 10px;"}
|
||||
= link_to admin_conference_program_track_path(@conference.short_title, track), class: 'btn' do
|
||||
%span.label{style: "background-color: #{track.color}; color: #{ contrast_color(track.color) }"}
|
||||
= track.name
|
||||
%td
|
||||
%p
|
||||
= truncate(track.description)
|
||||
= markdown(truncate(track.description))
|
||||
%td
|
||||
- if track.self_organized?
|
||||
= link_to track.submitter.name, admin_user_path(track.submitter)
|
||||
- else
|
||||
N/A
|
||||
= track.room.try(:name)
|
||||
%td
|
||||
%span.label{style: "background-color: #{track.color}; color: #{ contrast_color(track.color) }"}
|
||||
= track.color
|
||||
= track.start_date.strftime('%A, %B %-d. %Y') if track.start_date
|
||||
%td
|
||||
= track.end_date.strftime('%A, %B %-d. %Y') if track.end_date
|
||||
%td
|
||||
= link_to track.submitter.name, admin_user_path(track.submitter) if track.self_organized?
|
||||
%td.text-center
|
||||
= check_box_tag "#{@conference.short_title}_#{track.short_name}", track.id, track.cfp_active,
|
||||
class: 'switch-checkbox', method: :patch,
|
||||
url: toggle_cfp_inclusion_admin_conference_program_track_path(@conference.short_title, id: track.short_name)+"?included=",
|
||||
data: { size: 'small',
|
||||
on_color: 'success',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
|
||||
%td.text-center
|
||||
- if track.self_organized?
|
||||
.btn-group
|
||||
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
|
||||
|
|
@ -48,39 +55,12 @@
|
|||
= render 'change_state_dropdown', track: track
|
||||
- else
|
||||
= track.state.humanize
|
||||
%td
|
||||
= check_box_tag "#{@conference.short_title}_#{track.short_name}", track.id, track.cfp_active,
|
||||
class: 'switch-checkbox', method: :patch,
|
||||
url: toggle_cfp_inclusion_admin_conference_program_track_path(@conference.short_title, id: track.short_name)+"?included=",
|
||||
data: { size: 'small',
|
||||
on_color: 'success',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
|
||||
%td
|
||||
- if track.room
|
||||
= link_to track.room.name, admin_conference_venue_room_path(@conference.short_title, track.room.id)
|
||||
- else
|
||||
N/A
|
||||
%td
|
||||
- if track.start_date
|
||||
= track.start_date.strftime('%A, %B %-d. %Y')
|
||||
- else
|
||||
N/A
|
||||
%td
|
||||
- if track.end_date
|
||||
= track.end_date.strftime('%A, %B %-d. %Y')
|
||||
- else
|
||||
N/A
|
||||
%td
|
||||
.btn-group{role: "group"}
|
||||
- if can? :edit, track
|
||||
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
= link_to 'Edit', edit_admin_conference_program_track_path(@conference.short_title, track), class: 'btn btn-primary'
|
||||
- if can? :destroy, track
|
||||
= link_to 'Delete', admin_conference_program_track_path(@conference.short_title, track),
|
||||
method: :delete, class: 'btn btn-danger',
|
||||
= link_to 'Delete', admin_conference_program_track_path(@conference.short_title, track), method: :delete, class: 'btn btn-danger',
|
||||
data: { confirm: "Do you really want to delete #{track.name}? Attention: This track will be removed from all Events that have it set" }
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue