-@show.chart.sections.each do |section|
  %table.table#ticket-type-table
    %td{:style => 'width: 30px'}
      %ul.nav.in-table
        %li.dropdown{:id => "#menu#{section.id}"}
          =icon_link_to(' ', "#menu#{section.id}", 'icon-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
      &nbsp 
    %td="#{section.show.capacity} tickets"
    %td="#{section.show.open} open"
    %td="#{section.show.on_sale} on sale"
    %td="#{section.show.off_sale} off sale"
    %td="#{section.show.sold} sold"
    %td="#{section.show.comped} comp"

  #tickets
    .row-fluid
      .span4
        %h4 Ticket Types
      .span8
        =icon_link_to("Add New Ticket Type", new_section_ticket_type_path(section, :format => :html), 'icon-plus-sign', 'btn add-new-ticket-type-link', '', {"data-remote" => 'true'})
    = render :partial => 'ticket_table', :locals => { :section => section, :show => @show, :tickets => @show.tickets }

-@show.chart.sections.each do |section|
  .modal{:id => "addTickets#{section.id}", :style => "width: 650px"}
    .modal-header 
      .close{'data-dismiss'=>'modal'} x
      .row-fluid
        .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
        %strong=section.name
        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 }
          

-@show.chart.sections.each do |section|
  .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 }
          

-@show.chart.sections.each do |section|
  .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 }