Merge pull request #190 from ChrisBr/step_by_step_list
Implements todo list for instance dashboard
This commit is contained in:
commit
ab21bb14de
13 changed files with 333 additions and 102 deletions
20
app/views/admin/conference/_registrations.html.haml
Normal file
20
app/views/admin/conference/_registrations.html.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
.well#registrations
|
||||
.row
|
||||
.text-center
|
||||
%h4 Conference registrations over time
|
||||
.row
|
||||
.registrationsChart{"data-chart"=>"#{registrations.to_json}", "data-conferences"=>"#{conferences.to_json}", "data-weeks"=>"#{registration_weeks.to_json}"}
|
||||
%canvas#registrationsChart{"data-name"=>"registrations"}
|
||||
.row
|
||||
.text-center
|
||||
weeks
|
||||
.row
|
||||
.conferenceCheckboxes#registrationsCheckboxes
|
||||
- conferences.each do |conference|
|
||||
%div
|
||||
%span{"style"=>"border-bottom: 3px solid #{conference.color};", "data-chart"=> "registrations"}
|
||||
- if conference.pending?
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}", "checked"=>"checked"}
|
||||
- else
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}"}
|
||||
#{conference.short_title}
|
||||
20
app/views/admin/conference/_submissions.html.haml
Normal file
20
app/views/admin/conference/_submissions.html.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
.well#submissions
|
||||
.row
|
||||
.text-center
|
||||
%h4 Event submissions over time
|
||||
.row
|
||||
.submissionsChart{"data-chart"=>"#{submissions.to_json}", "data-conferences"=>"#{conferences.to_json}", "data-weeks"=>"#{cfp_weeks.to_json}"}
|
||||
%canvas#submissionsChart{"data-name"=>"submissions"}
|
||||
.row
|
||||
.text-center
|
||||
weeks
|
||||
.row
|
||||
.conferenceCheckboxes#submissionsCheckboxes
|
||||
- conferences.each do |conference|
|
||||
%div
|
||||
%span{"style"=>"border-bottom: 3px solid #{conference.color};", "data-chart"=> "submissions"}
|
||||
- if conference.pending?
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}", "checked"=>"checked"}
|
||||
- else
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}"}
|
||||
#{conference.short_title}
|
||||
29
app/views/admin/conference/_todo_list.html.haml
Normal file
29
app/views/admin/conference/_todo_list.html.haml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
.list-group
|
||||
%li.list-group-item
|
||||
%h4
|
||||
Conference progress
|
||||
.progress
|
||||
.progress-bar{ 'role'=>'progressbar', 'aria-valuenow'=>"#{conference_progress['process']}", 'aria-valuemin'=>'0',
|
||||
'aria-valuemax'=>'100', 'style'=>"width: #{conference_progress['process']}%;" }
|
||||
= conference_progress['process'] + '%'
|
||||
%li{'class'=>class_for_todo(conference_progress['registration'])}
|
||||
%span{'class'=>icon_for_todo(conference_progress['registration'])}
|
||||
= link_to 'Set up registration period', edit_admin_conference_path(conference_progress['short_title'], :anchor => 'conference-end-datepicker')
|
||||
%li{'class'=>class_for_todo(conference_progress['cfp'])}
|
||||
%span{'class'=>icon_for_todo(conference_progress['cfp'])}
|
||||
= link_to 'Set up call for papers', admin_conference_callforpapers_path(conference_progress['short_title'])
|
||||
%li{'class'=>class_for_todo(conference_progress['venue'])}
|
||||
%span{'class'=>icon_for_todo(conference_progress['venue'])}
|
||||
= link_to 'Add venue', admin_conference_venue_info_path(conference_progress['short_title'])
|
||||
%li{'class'=>class_for_todo(conference_progress['rooms'])}
|
||||
%span{'class'=>icon_for_todo(conference_progress['rooms'])}
|
||||
= link_to 'Add rooms', admin_conference_rooms_path(conference_progress['short_title'])
|
||||
%li{'class'=>class_for_todo(conference_progress['tracks'])}
|
||||
%span{'class'=>icon_for_todo(conference_progress['tracks'])}
|
||||
= link_to 'Add tracks', admin_conference_tracks_path(conference_progress['short_title'])
|
||||
%li{'class'=>class_for_todo(conference_progress['event_types'])}
|
||||
%span{'class'=>icon_for_todo(conference_progress['event_types'])}
|
||||
= link_to 'Add event types', admin_conference_eventtypes_path(conference_progress['short_title'])
|
||||
%li{'class'=>class_for_todo(conference_progress['difficulty_levels'])}
|
||||
%span{'class'=>icon_for_todo(conference_progress['difficulty_levels'])}
|
||||
= link_to 'Add difficulty levels', admin_conference_difficulty_levels_path(conference_progress['short_title'])
|
||||
21
app/views/admin/conference/_top_boxes.html.haml
Normal file
21
app/views/admin/conference/_top_boxes.html.haml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
.col-sm-4
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-user
|
||||
.text
|
||||
%label.text-muted total user: #{@total_user}
|
||||
%label.text-muted new user: #{@new_user}
|
||||
.col-sm-4
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-star
|
||||
.text
|
||||
%label.text-muted total registrations: #{@total_reg}
|
||||
%label.text-muted new registrations: #{@new_reg}
|
||||
.col-sm-4
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-comment
|
||||
.text
|
||||
%label.text-muted total submissions: #{@total_submissions}
|
||||
%label.text-muted new submissions: #{@new_submissions}
|
||||
|
|
@ -1,93 +1,13 @@
|
|||
.row
|
||||
.col-sm-2
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-user
|
||||
.text
|
||||
%var
|
||||
= @total_user
|
||||
%label.text-muted total user
|
||||
.col-sm-2
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-thumbs-up
|
||||
.text
|
||||
%var
|
||||
= @new_user
|
||||
%label.text-muted new user
|
||||
.col-sm-2
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-heart-empty
|
||||
.text
|
||||
%var
|
||||
= @active_user
|
||||
%label.text-muted active user
|
||||
.col-sm-2
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-star
|
||||
.text
|
||||
%var
|
||||
= @total_reg
|
||||
%label.text-muted total registrations
|
||||
.col-sm-2
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-usd
|
||||
.text
|
||||
%var
|
||||
= @new_reg
|
||||
%label.text-muted new registrations
|
||||
.col-sm-2
|
||||
.dashbox.well.well-sm.text-center
|
||||
.icon
|
||||
%i.glyphicon.glyphicon-comment
|
||||
.text
|
||||
%var
|
||||
= @submissions_count
|
||||
%label.text-muted submissions
|
||||
= render partial: 'top_boxes', locals: { total_user: @total_user, new_user: @new_user, active_user: @active_user,
|
||||
total_reg: @total_reg, new_reg: @new_reg, submissions_count: @submissions_count }
|
||||
.row
|
||||
.col-md-12
|
||||
.well#submissions
|
||||
.row
|
||||
.text-center
|
||||
%h4 Event submissions over time
|
||||
.row
|
||||
.submissionsChart{"data-chart"=>"#{@submissions.to_json}", "data-conferences"=>"#{@conferences.to_json}", "data-weeks"=>"#{@cfp_weeks.to_json}"}
|
||||
%canvas#submissionsChart{"data-name"=>"submissions"}
|
||||
.row
|
||||
.text-center
|
||||
weeks
|
||||
.row
|
||||
.conferenceCheckboxes#submissionsCheckboxes
|
||||
- @conferences.each do |conference|
|
||||
%div
|
||||
%span{"style"=>"border-bottom: 3px solid #{conference.color};", "data-chart"=> "submissions"}
|
||||
- if conference.pending?
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}", "checked"=>"checked"}
|
||||
- else
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}"}
|
||||
#{conference.short_title}
|
||||
.col-md-8
|
||||
= render partial: 'submissions', locals: { conferences: @conferences, submissions: @submissions,
|
||||
cfp_weeks: @cfp_weeks }
|
||||
.col-md-4
|
||||
.row
|
||||
.col-md-12
|
||||
.well#registrations
|
||||
.row
|
||||
.text-center
|
||||
%h4 Conference registrations over time
|
||||
.row
|
||||
.registrationsChart{"data-chart"=>"#{@registrations.to_json}", "data-conferences"=>"#{@conferences.to_json}", "data-weeks"=>"#{@registration_weeks.to_json}"}
|
||||
%canvas#registrationsChart{"data-name"=>"registrations"}
|
||||
.row
|
||||
.text-center
|
||||
weeks
|
||||
.row
|
||||
.conferenceCheckboxes#registrationsCheckboxes
|
||||
- @conferences.each do |conference|
|
||||
%div
|
||||
%span{"style"=>"border-bottom: 3px solid #{conference.color};", "data-chart"=> "registrations"}
|
||||
- if conference.pending?
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}", "checked"=>"checked"}
|
||||
- else
|
||||
%input{"type"=>"checkbox", "name"=>"#{conference.short_title}"}
|
||||
#{conference.short_title}
|
||||
.col-md-8
|
||||
= render partial: 'registrations', locals: { conferences: @conferences, registrations: @registrations,
|
||||
registration_weeks: @registration_weeks }
|
||||
.col-md-4
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
%h1
|
||||
%span.glyphicon.glyphicon-dashboard
|
||||
Dashboard for #{@conference.title}
|
||||
%hr
|
||||
.row
|
||||
.col-md-8
|
||||
%h1 Dashboard for #{@conference.title}
|
||||
.col-md-4
|
||||
= render partial: 'todo_list', locals: { conference_progress: @conference_progress }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue