diff options
author | jessib <jessib@leap.se> | 2013-05-06 12:58:34 -0700 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-07-17 10:47:13 +0200 |
commit | 62b32320f38627dad870c7b3157576c48674c42b (patch) | |
tree | 3f64557604995d84a1477b7e66f820baffd3ed59 /billing/app/views | |
parent | fe0ac266a797523492fe3b2c750e7862f51b152f (diff) |
Show single active subscription from user's page, with link to index showing all the user's subscriptions.
Diffstat (limited to 'billing/app/views')
-rw-r--r-- | billing/app/views/customers/_subscription.html.haml | 1 | ||||
-rw-r--r-- | billing/app/views/customers/show.html.haml | 8 | ||||
-rw-r--r-- | billing/app/views/subscriptions/index.html.haml | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/billing/app/views/customers/_subscription.html.haml b/billing/app/views/customers/_subscription.html.haml deleted file mode 100644 index a57f6e9..0000000 --- a/billing/app/views/customers/_subscription.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render :partial => "subscriptions/subscription_details", :locals => {:subscription => subscription} diff --git a/billing/app/views/customers/show.html.haml b/billing/app/views/customers/show.html.haml index 7416682..b36ebaf 100644 --- a/billing/app/views/customers/show.html.haml +++ b/billing/app/views/customers/show.html.haml @@ -2,7 +2,7 @@ = link_to 'Make Payment', new_payment_path, :class => :btn %h3 Transaction History = render(:partial => "transaction", :collection => @transactions) # show subset with link to see more -- if @subscriptions.any? - %h3 Active Subscriptions - = # todo: won't really have multiple subscriptions - = render(:partial => "subscription", :collection => @subscriptions)
\ No newline at end of file +- if @active_subscription + %h3 Active Subscription + = render :partial => "subscriptions/subscription_details", :locals => {:subscription => @active_subscription} + = link_to 'All subscriptions', subscriptions_path
\ No newline at end of file diff --git a/billing/app/views/subscriptions/index.html.haml b/billing/app/views/subscriptions/index.html.haml new file mode 100644 index 0000000..c885f90 --- /dev/null +++ b/billing/app/views/subscriptions/index.html.haml @@ -0,0 +1,2 @@ +- @subscriptions.each do |s| + = render :partial => "subscription_details", :locals => {:subscription => s}
\ No newline at end of file |