From f02aaac81ead386642f6f769574dc35875943da5 Mon Sep 17 00:00:00 2001 From: Nishanth Vijayan Date: Fri, 29 Jul 2016 21:26:10 +0530 Subject: [PATCH] Show an event's missing info in event#show --- app/views/admin/events/show.html.haml | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/app/views/admin/events/show.html.haml b/app/views/admin/events/show.html.haml index 8d08be2c..6db61172 100644 --- a/app/views/admin/events/show.html.haml +++ b/app/views/admin/events/show.html.haml @@ -4,6 +4,13 @@ = link_to "Proposal", "#proposal-content", "data-toggle"=>"tab" %li = link_to "History", "#history-content", "data-toggle"=>"tab" + %li + %a{href: '#proposal-tasks', "data-toggle"=>"tab"} + Tasks + %span.label.label-danger{style: 'border-radius: 1em;'} + - progress_status = @event.progress_status + = progress_status.reject{ |_key, value| value || value.nil? }.length + .tab-content #proposal-content.tab-pane.active = render 'proposal' @@ -42,3 +49,36 @@ = render partial: 'shared/object_changes', locals: { version: version } %td = render partial: 'shared/changelog_actions', locals: { version: version } + + #proposal-tasks.tab-pane + - progress_percentage = @event.calculate_progress + .col-md-12 + %h3 + = @event.title + %br + %table.table.table-hover + %tr + %td= link_to 'Submitter must be registered to the conference', admin_conference_registrations_path(@event.program.conference.short_title) + %td{'class'=>class_for_todo(progress_status['registered'])} + %span{'class'=>[icon_for_todo(progress_status['registered']), 'fa-lg']} + %tr + %td= link_to 'Fill out submitter biography', edit_user_path(@event.submitter) + %td{'class'=>class_for_todo(progress_status['biography'])} + %span{'class'=>[icon_for_todo(progress_status['biography']), 'fa-lg']} + %tr + %td= link_to 'Add a subtitle', edit_conference_program_proposal_path(@event.program.conference.short_title, @event) + %td{'class'=>class_for_todo(progress_status['subtitle'])} + %span{'class'=>[icon_for_todo(progress_status['subtitle']), 'fa-lg']} + %tr + %td= link_to 'Add a commercial', edit_conference_program_proposal_path(@event.program.conference.short_title, @event, anchor: 'commercials-content') + %td{'class'=>class_for_todo(progress_status['commercial'])} + %span{'class'=>[icon_for_todo(progress_status['commercial']), 'fa-lg']} + - unless progress_status['track'].nil? + %tr + %td= link_to 'Add a track', edit_conference_program_proposal_path(@event.program.conference.short_title, @event) + %td{'class'=>class_for_todo(progress_status['track'])} + %span{'class'=>[icon_for_todo(progress_status['track']), 'fa-lg']} + %tr + %td= link_to 'Add a difficulty level', edit_conference_program_proposal_path(@event.program.conference.short_title, @event) + %td{'class'=>class_for_todo(progress_status['difficulty_level'])} + %span{'class'=>[icon_for_todo(progress_status['difficulty_level']), 'fa-lg']}