Improve the physical_tickets page
This commit is contained in:
parent
0dffc20ad1
commit
61ca626df1
2 changed files with 10 additions and 6 deletions
|
|
@ -8,6 +8,7 @@ class PhysicalTicketsController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@physical_tickets = current_user.physical_tickets.by_conference(@conference)
|
@physical_tickets = current_user.physical_tickets.by_conference(@conference)
|
||||||
|
@has_registration_ticket = current_user.ticket_purchases.where(ticket: @conference.registration_tickets, paid: true).any?
|
||||||
@unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid
|
@unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid
|
||||||
@user = current_user
|
@user = current_user
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,17 @@
|
||||||
.text-muted
|
.text-muted
|
||||||
Your tickets for the conference
|
Your tickets for the conference
|
||||||
|
|
||||||
- if !@conference.user_registered?(@user)
|
-# TODO: And if they have a registration ticket?
|
||||||
.row
|
- if !@conference.user_registered?(@user) && @has_registration_ticket
|
||||||
.col-md-12
|
.col-md-12
|
||||||
|
.alert.alert-success{role: 'alert'}
|
||||||
|
= link_to 'Complete Registration',
|
||||||
|
new_conference_conference_registration_path(@conference),
|
||||||
|
class: 'btn btn-info pull-right btn-lg'
|
||||||
|
%h3
|
||||||
|
🎉 Thanks for getting a #{@conference.title} ticket! One last step...
|
||||||
%strong
|
%strong
|
||||||
You are not yet registered for the conference.
|
You are not yet registered for the conference.
|
||||||
= link_to 'Complete Registration',
|
|
||||||
conference_conference_registration_path(@conference),
|
|
||||||
class: 'btn btn-success pull-right'
|
|
||||||
|
|
||||||
.col-md-12
|
.col-md-12
|
||||||
- if @physical_tickets.present?
|
- if @physical_tickets.present?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue