From ed254f7694fac0a56741aa7ea68907a88bd5b9e9 Mon Sep 17 00:00:00 2001 From: Rahul Date: Wed, 13 Mar 2019 21:04:39 +0530 Subject: [PATCH] remove submit proposal from homepage submit proposal should not be present if cfp is nil Fixes https://github.com/openSUSE/osem/issues/2418 --- app/views/conferences/_conference_details.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/conferences/_conference_details.html.haml b/app/views/conferences/_conference_details.html.haml index 1de55697..1504e847 100644 --- a/app/views/conferences/_conference_details.html.haml +++ b/app/views/conferences/_conference_details.html.haml @@ -41,7 +41,8 @@ - if !current_user.nil? && current_user.proposal_count(conference) > 0 = link_to "My Proposals", conference_program_proposals_path(conference.short_title), class: 'btn btn-default' - elsif can? :new, conference.program.events.new - = link_to "Submit Proposal", new_conference_program_proposal_path(conference.short_title), class: 'btn btn-default' + - if conference.program.cfp_open? + = link_to "Submit Proposal", new_conference_program_proposal_path(conference.short_title), class: 'btn btn-default' - if current_user && current_user.booths.where(conference_id: conference.id).count > 0 = link_to 'My Booth Requests', conference_booths_path(conference.short_title), class: 'btn btn-default' - elsif can? :new, conference.booths.new