user ability for registration is used for chcking whether a user can register or not

This commit is contained in:
Your Name
2017-10-13 02:39:36 +05:30
committed by Naman Gupta
parent b1f32caf7c
commit e607aca680
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
- progress_status = event.progress_status
%ul.list-unstyled
- if @conference.registration_open? || (@conference.user_registered? current_user)
- if can? :create, @conference.registrations.new
%li{'class'=>class_for_todo(progress_status['registered'])}
%span{'class'=>icon_for_todo(progress_status['registered'])}
- if progress_status['registered']

View File

@@ -48,7 +48,7 @@
The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal.
%br
It will also be more likely that visitors find your proposal interesting enough to attend.
- if (@conference.registration_open?) && !(@conference.user_registered? current_user)
- if can? :create, @conference.registrations.new
%p
%strong
Why do I need to register to the conference?
@@ -74,7 +74,7 @@
%td.col-md-2{style: "padding:20px 8px 20px 8px;"}
= link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }"
- if (@conference.registration_open?) || (@conference.user_registered? current_user)
- if can? :create, @conference.registrations.new
- progress_percentage = event.calculate_progress
.progress
%div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"}