Commit 1bc95023 authored by Gualter's avatar Gualter

Add condition to show only to users with accepted sessions

parent 408f63c3
......@@ -135,6 +135,10 @@ class Ability
event.event_ratings.peer_reviews.where(person: @user.person).any?
end
can :buy_tickets, Conference do |conference|
@user.person.events.accepted_but_not_paid.where(conference_id: conference.id).any?
end
# Submitters can either edit themselves
can :crud, Person, id: @user.person.id
......
......@@ -3,13 +3,14 @@
%p=t('cfp.thanks_for_interest', :title => conference.title)
- if cfp_hard_deadline_over?
%p=t('cfp.hard_deadline_over')
%pretix-widget{:event => "https://tickets.degrowth.net/malmo2018/", :voucher => "SEBZ8X38BCDSTSYT"}
%noscript
.pretix-widget
.pretix-widget-info-message
JavaScript is disabled in your browser. To access our ticket shop without JavaScript, please
= succeed "." do
%a{:href => "https://tickets.degrowth.net/malmo2018/", :rel => "noopener", :target => "_blank"} click here
- if can? :buy_tickets, conference
%pretix-widget{:event => "https://tickets.degrowth.net/malmo2018/", :voucher => "SEBZ8X38BCDSTSYT"}
%noscript
.pretix-widget
.pretix-widget-info-message
JavaScript is disabled in your browser. To access our ticket shop without JavaScript, please
= succeed "." do
%a{:href => "https://tickets.degrowth.net/malmo2018/", :rel => "noopener", :target => "_blank"} click here
- elsif not conference.in_the_past
- if person.events_in(conference).size > 0
-# if person.availabilities_in(conference).count == 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment