app/views/shows/show.html.haml in artfully_ose-1.3.0.pre3 vs app/views/shows/show.html.haml in artfully_ose-1.3.0.pre4

- old
+ new

@@ -6,22 +6,101 @@ .span3 - in_sub_section :shows =render :partial=>'events/menu' .span9 = render "shared/error_messages", :target => @event - #show-headline.row-fluid - .span6 + .row-fluid + .span4 %h3=l @show.datetime_local_to_event, :format => :day_time - .row-fluid - .span5 - =render :partial => "work_with", :locals => {:show => @show} - .span6 - =icon_link_to("Box Office", new_event_show_sales_path(@event,@show,:render => 'boxoffice'), 'fa-shopping-cart', 'btn', '') - .span6 - = render :partial => "glance", :locals => { :report => @show.glance, :show => @show } - #sections + .span4 + .center{:style => "padding-top:20px"} + .badge.badge-success.show-state= @show.state + .span4 + .pull-right{:style => "padding-top:12px"} + =render :partial => "work_with", :locals => {:show => @show} + + %table.table#ticket-type-table + %td{:style => "width: 30px"} + -unless @event.assigned? + -if current_user.can? :manage, @show + -section = @show.chart.sections.first + %ul.nav.in-table + %li.dropdown{:id => "#menu#{section.id}"} + =icon_link_to(' ', "#menu#{section.id}", 'fa-asterisk', 'dropdown-toggle dropdown btn btn-mini', '') + %ul.dropdown-menu + %li + =link_to "Put on sale", "#putOnSale#{section.id}", 'data-toggle' => 'modal' + %li + =link_to "Take off sale", "#takeOffSale#{section.id}", 'data-toggle' => 'modal' + %li + =link_to "Add tickets", "#addTickets#{section.id}", 'data-toggle' => 'modal' + %td=pluralize(@show.chart.sections.first.ticket_types.length, "ticket type") + %td="#{@show.capacity} seats" + %td="#{@show.open} open" + %td="#{@show.on_sale} on sale" + %td="#{@show.off_sale} hold" + %td="#{@show.sold} sold" + %td="#{@show.comped} comp" + + =render :partial => "#{@show.chart.class.name.underscore.pluralize}/show" + +-section = @show.chart.sections.first + +-if current_user.can? :manage, @show + .modal{:id => "addTickets#{section.id}", :style => "width: 650px"} + .modal-header + .close{'data-dismiss'=>'modal'} x .row-fluid - .span3 - %h4 Ticket Capacity - = render :partial => 'sections_table', :locals => { :show => @show, :tickets => @show.tickets } + .span10 + %h3 Add Tickets + .modal-body + = form_tag show_tickets_path(@show), :class => 'form-inline add-tickets-form' do + = hidden_field_tag :section_id, section.id + Add + = text_field_tag :quantity, "0", :placeholder => '0', :class => 'span1' + tickets to this show and put them + = select_tag(:on_sale, options_for_select({"on sale" => "true", "off sale" => "false"}), :class=>'input-small') + = submit_tag "Go", :class => "btn" + .row-fluid + .span12 + %h6 About this show + = render :partial => 'shared/show_summary', :locals => { :show => @show } + -#newTicketType.modal + .modal{:id => "takeOffSale#{section.id}"} + .modal-header + .close{'data-dismiss'=>'modal'} x + .row-fluid + .span10 + %h3 Take Tickets Off Sale + .modal-body + =form_tag off_sale_sections_path(:id => section.id), :method => :post, :class=>'form-inline' do + Quantity: + =text_field_tag :quantity, section.summary.available, :class => 'span1' + %button.btn{:type=>'submit'} + Take off sale + .row-fluid + .span12 + %h6 About this show + = render :partial => 'shared/show_summary', :locals => { :show => @show } + + + .modal{:id => "putOnSale#{section.id}"} + .modal-header + .close{'data-dismiss'=>'modal'} x + .row-fluid + .span10 + %h3 Put Tickets On Sale + .modal-body + =form_tag on_sale_sections_path(:id => section.id), :method => :post, :class=>'form-inline' do + Quantity: + =text_field_tag :quantity, section.summary.off_sale, :class => 'span1' + %button.btn{:type=>'submit'} + Put on sale + .row-fluid + .span12 + %h6 About this show + = render :partial => 'shared/show_summary', :locals => { :show => @show } + +-content_for :custom_js do + = javascript_include_tag 'seat-chart' + = javascript_include_tag 'show-seat-chart'