- 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", 'data-toggle' => 'modal' %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 %td.item-description=link_to membership.membership_type.name, membership_type_path(membership.membership_type.id) %td=l membership.starts_at, :format => :slashed_date %td=l membership.ends_at, :format => :slashed_date %td.price.right=number_as_cents membership.sold_price %td.fee.right TODO #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 =form_tag "#", :class => "form-horizontal", :method => :post do .modal-header .close{'data-dismiss'=>'modal'} x %h3 Change Membership .modal-body .control-group %label.control-label="Membership Type" .controls = select_tag :membership_type, options_from_collection_for_select(@membership_types, 'id', 'name') .control-group %label.control-label Price per membership .controls .input-prepend %span.add-on $ = text_field_tag :sold_price, "", :class => 'span1' #payment-controls.controls %label.radio = radio_button_tag(:payment_method, :cash, true, :class => 'payment-method', :humanized_value => 'Cash') Cash %label.radio = radio_button_tag(:payment_method, :comp, false, :class => 'payment-method', :humanized_value => 'Comp') Comp %label.radio = radio_button_tag(:payment_method, :credit_card_manual, false, :class => 'payment-method', :humanized_value => 'Credit card') Credit #payment-info.hidden.well .control-group %label.control-label="Name on Card" .controls= text_field_tag("credit_card[name]", params[:cardholder_name]) .control-group %label.control-label="Card Number" .controls= text_field_tag("credit_card[number]", params[:card_number]) .control-group %label.control-label="Expiration Date" .date_field.controls = select_tag("credit_card[month]", options_for_select(1..12, params["month"]), :class => 'input-small inline') = select_tag("credit_card[year]", options_for_select(Time.now.year..Time.now.year + 10, params["year"]), :class => 'input-small inline') .modal-footer =link_to "Process Membership Change", "#", :class => "btn btn-success", 'data-dismiss'=>'modal' =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' #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 =text_field_tag "ends_at", "", :class => "datepicker" .modal-footer =submit_tag "Change Expiration", :class => "btn btn-success" =link_to "Cancel", "#", :class => "btn btn-danger", 'data-dismiss'=>'modal' -content_for :custom_js do :javascript $(".payment-method").change(function(){ if($(this).attr('value') != 'credit_card_manual'){ $("#payment-info").addClass("hidden"); $("#credit_card_number").val("") $("#credit_card_name").val("") } else { $("#payment-info").removeClass("hidden"); } });