%h1 Listing subscriptions
%table#subscriptions
%thead
%tr
%th Start date
%th End date
%th Subs years
%th Subs type
%th Reminder sent
%th Welcome letter sent
%th Amount paid
%th
-if can? :maintain,Subscription
%th
%th
%tbody
- @subscriptions.each do |subscription|
%tr
%td= subscription.start_date
%td= subscription.end_date
%td= subscription.subs_years
%td= subscription.subs_type
%td= subscription.reminder_sent
%td= subscription.welcome_letter_sent
%td= subscription.amount_paid
%td= link_to 'Show', [@user,subscription]
-if can? :maintain,Subscription
%td= link_to 'Edit', edit_user_subscription_path(@user,subscription)
%td= link_to 'Destroy', [@user,subscription], :method => :delete, :data => { :confirm => 'Are you sure?' }
%br
= link_to 'New Subscription', new_user_subscription_path(@user)