From b6439a7ea016e4a6c4a0b98add5e1abe9edb2ffb Mon Sep 17 00:00:00 2001 From: Chrisbr Date: Sat, 4 Oct 2014 09:30:56 +0200 Subject: [PATCH] Fixes to do list link to registration period fix #505 --- app/views/admin/conference/_todo_list.html.haml | 5 ++++- app/views/admin/conference/show.html.haml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/admin/conference/_todo_list.html.haml b/app/views/admin/conference/_todo_list.html.haml index deb78a77..272e423a 100644 --- a/app/views/admin/conference/_todo_list.html.haml +++ b/app/views/admin/conference/_todo_list.html.haml @@ -9,7 +9,10 @@ %li{'class'=>class_for_todo(conference_progress['registration'])} %span{'class'=>icon_for_todo(conference_progress['registration'])} - if can? :update, @conference - = link_to 'Set up registration period', edit_admin_conference_registration_period_path(conference_progress['short_title']) + - if conference.registration_period + = link_to 'Set up registration period', edit_admin_conference_registration_period_path(conference_progress['short_title']) + - else + = link_to 'Set up registration period', new_admin_conference_registration_period_path(conference_progress['short_title']) - else Set up registration period %li{'class'=>class_for_todo(conference_progress['cfp'])} diff --git a/app/views/admin/conference/show.html.haml b/app/views/admin/conference/show.html.haml index f07e9d2a..d8f6b24e 100644 --- a/app/views/admin/conference/show.html.haml +++ b/app/views/admin/conference/show.html.haml @@ -55,7 +55,8 @@ x: @cfp_weeks, unit: 'weeks' } .col-md-4 - = render partial: 'todo_list', locals: { conference_progress: @conference_progress } + = render partial: 'todo_list', locals: { conference_progress: @conference_progress, + conference: @conference } .row .col-md-12#doughnut %ul.nav.nav-tabs#doughnut_tabs