app/views/memberships/index.html.haml in artfully_ose-1.2.0.pre.17 vs app/views/memberships/index.html.haml in artfully_ose-1.2.0.pre.18

- old
+ new

@@ -27,27 +27,40 @@ = 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 + %table.zebra.table{'ng-init' => "scope = { showExpired: false, expiredStyle: {textDecoration: 'line-through'} }"} %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 + - if membership.expired? + %tr{'ng-show' => 'scope.showExpired', 'ng-style' => 'scope.expiredStyle'} + %td.grouped-checkbox= check_box_tag "membership_ids[]", membership.id, false, :id => "membership_id_#{membership.id}", 'ng-disabled' => 'true' + %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 + - else + %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 + + - if @expired_count > 0 + = link_to "See #{@expired_count} lapsed & expired memberships", '#', 'ng-show' => '!scope.showExpired', 'ng-click' => 'scope.showExpired = true' + = link_to "Hide #{@expired_count} lapsed & expired memberships", '#', 'ng-show' => 'scope.showExpired', 'ng-click' => 'scope.showExpired = false' #extend.modal .modal-header .close{'data-dismiss'=>'modal'} x %h3 Change Expiration