osem-fcy/app/views/conferences/_tickets.haml
Haseeb Khan f81381560b Disable links for tickets on splashpage
* Conditional rendering to disable links for tickets on splash screen
* Only enable links when registration is open

Fixes https://github.com/openSUSE/osem/issues/2433
2019-05-14 14:40:57 +05:00

37 lines
1.3 KiB
Text

= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#tickets' } Tickets
- cache [conference, tickets, '#splash#tickets'] do
%section#tickets
.container
.row
.col-md-12.text-center
%h2
Support
= conference.title
.row.row-centered
- tickets.each do |ticket|
.col-md-3.col-sm-3.col-centered.col-top
- if conference.registration_open?
= link_to(conference_tickets_path(conference.short_title),
class: 'thumbnail') do
.caption
%h3.text-center.word_break
= ticket.title
.word_break
= markdown(ticket.description)
%button.btn-block.btn.btn-lg.btn-success
%i.fa.fa-ticket.fa-fw
= humanized_money_with_symbol(ticket.price)
- else
.thumbnail
.caption
%h3.text-center.word_break
= ticket.title
.word_break
= markdown(ticket.description)
%button.btn-block.btn.btn-lg.btn-success.disabled
%i.fa.fa-ticket.fa-fw
= humanized_money_with_symbol(ticket.price)