app/views/admin/groups/_subscription.haml
%div{ class: 'panel' }
%h3 Subscription
%div{ class: 'panel-contents' }
%table{ id: 'subscription-table' }
%tr
%th Id
%th Groups count
%th Plan
%th Status
%th Accepted members count
%th= "Active members count"
%th Expires at
%th Renews at
%th Renewed at
%th Chargify Id
%tr
%td= link_to subscription.id, admin_subscription_path(subscription.id)
%td= Group.where(subscription_id: subscription.id).count
%td= subscription.plan
%td= subscription.state
%td= subscription.count_accepted_members
%td= subscription.count_active_members
%td= subscription.expires_at
%td= subscription.renews_at
%td= subscription.renewed_at
- if subscription.chargify_subscription_id.present?
%td= link_to subscription.chargify_subscription_id, "https://loomio.chargify.com/subscriptions/#{subscription.chargify_subscription_id}"
- else
%td= nil