- in_section :people - content_for :title do #{@person} =render "people/header" .row .span12 .row-fluid .span6 %ul.in-table %li.dropdown{:id => "#menu#bulkactions"} =icon_link_to('Work with...', "#menu#bulkactions", 'icon-asterisk', 'dropdown-toggle dropdown btn', '') %ul.dropdown-menu %li = link_to "Full Refund", "#full-refund", 'data-toggle' => 'modal' %li = link_to "Partial Refund", "#partial-refund", 'data-toggle' => 'modal' %li = link_to "Change Expiration", "#extend", 'data-toggle' => 'modal' %li = link_to "Change Membership", "#change", 'ng-controller' => 'ChangeMembershipController', 'ng-click' => 'changeSelected($event)' %li = link_to "Cancel Membership", "#cancel", 'data-toggle' => 'modal' .span6.right = icon_link_to("View Record", person_path(@person), 'icon-share-alt', 'btn', '') = link_to "Log In", "#", 'data-toggle' => 'modal', :class => 'btn' = link_to "Reset Password", "#", 'data-toggle' => 'modal', :class => 'btn btn-danger' =form_tag bulk_update_person_memberships_path(@person), :method => :post do #items %table.zebra.table %thead %tr %th.grouped-checkbox= check_box_tag :all, nil, false, :class => :checkall %th Membership Type %th Starts %th Expires %th.right Price Paid %th.right Fee %tbody - @person.memberships.each do |membership| %tr %td.grouped-checkbox= check_box_tag "membership_ids[]", membership.id, false, :id => "membership_id_#{membership.id}" %td.item-description=link_to membership.membership_type.name, membership_type_path(membership.membership_type.id) %td.starts-at=l membership.starts_at, :format => :slashed_date %td.ends-at=l membership.ends_at, :format => :slashed_date %td.price.right=number_as_cents membership.sold_price %td.fee.right TODO #extend.modal .modal-header .close{'data-dismiss'=>'modal'} x %h3 Change Expiration .modal-body .control-group %label Change the expiration of these memberships to: .controls .datepicker-alt-field =hidden_field_tag "ends_at", "" .modal-footer =submit_tag "Change Expiration", :class => "btn btn-success" =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal' #full-refund.modal .modal-header .close{'data-dismiss'=>'modal'} x %h3 Refund Membership .modal-body %p="#{@person} will receive a full refund for these memberships" .modal-footer =link_to "Process Refund", "#", :class => "btn btn-success", 'data-dismiss'=>'modal' =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal' #change.modal{'ng-controller' => 'ChangeMembershipController'} =form_tag person_membership_changes_path, :class => "form-horizontal", 'novalidate' => 'novalidate', 'name' => 'changeForm', :method => :post do .modal-header .close{'data-dismiss'=>'modal'} x %h3 Change Membership .modal-body .control-group %label.control-label="Selected Memberships" .controls %ol %li{'ng-repeat' => 'membership in selected'} = hidden_field_tag('membership_ids[]', '{{membership.id}}') = '{{membership.type}} - {{membership.price}}' .control-group %label.control-label="New Membership Type" .controls = select_tag :membership_type_id, options_for_membership_types(@membership_types, include_price: true) .control-group %label.control-label Price Per Membership .controls = text_field_tag :price, '0', :class => 'span1 currency', 'ng-model' => 'price', 'ng-change' => 'updateTotal()' .control-group %label.control-label Total Price .controls = text_field_tag 'total', '', :class => 'span1', :disabled => 'disabled', 'ng-model' => 'total' .control-group %label.control-label Payment Method #payment-controls.controls %label.radio = radio_button_tag(:payment_method, :cash, true, :class => 'payment-method', :humanized_value => 'Cash', 'ng-model' => 'payment_method') Cash %label.radio = radio_button_tag(:payment_method, :comp, false, :class => 'payment-method', :humanized_value => 'Comp', 'ng-model' => 'payment_method') Comp %label.radio = radio_button_tag(:payment_method, :credit_card_manual, false, :class => 'payment-method', :humanized_value => 'Credit card', 'ng-model' => 'payment_method') Credit #payment-info.well{'ng-show' => "'credit_card_manual' == payment_method"} .control-group %label.control-label='Name on Card' .controls= text_field_tag('credit_card_info[name]') .control-group %label.control-label='Card Number' .controls= text_field_tag('credit_card_info[number]') .control-group %label.control-label='Expiration Date' .date_field.controls = select_tag('credit_card_info[month]', options_for_select(1..12), :class => 'input-small inline') = select_tag('credit_card_info[year]', options_for_select(Time.now.year..Time.now.year + 10), :class => 'input-small inline') .modal-footer = submit_tag "Process Membership Change", :class => "btn btn-success" =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal' #partial-refund.modal .modal-header .close{'data-dismiss'=>'modal'} x %h3 Refund Membership .modal-body .control-group %label Enter refund amount: .controls =text_field_tag "whatever", "", :class => "currency" %p="#{@person} will receive a partial refund for the above amount and these memberships will be cancelled." .modal-footer =link_to "Process Refund", "#", :class => "btn btn-success", 'data-dismiss'=>'modal' =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal' #cancel.modal .modal-header .close{'data-dismiss'=>'modal'} x %h3 Cancel Membership .modal-body %p="These memberships will be cancelled." .modal-footer =link_to "Cancel Memberhships", "#", :class => "btn btn-success", 'data-dismiss'=>'modal' =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal'