summaryrefslogtreecommitdiff
path: root/billing/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'billing/app/views')
-rw-r--r--billing/app/views/billing_admin/show.html.haml17
-rw-r--r--billing/app/views/subscriptions/_subscription_details.html.haml11
2 files changed, 27 insertions, 1 deletions
diff --git a/billing/app/views/billing_admin/show.html.haml b/billing/app/views/billing_admin/show.html.haml
new file mode 100644
index 0000000..78843e5
--- /dev/null
+++ b/billing/app/views/billing_admin/show.html.haml
@@ -0,0 +1,17 @@
+- # todo: move into helper, as following 2 are pretty much identical
+%legend= t(:more_than_90_days_past_due)
+- if @past_due_atleast_90_days.empty?
+ = t(:none)
+- else
+ - @past_due_atleast_90_days.each do |past_due_subscription|
+ = render :partial => "subscriptions/subscription_details", :locals => {:subscription => past_due_subscription, :show_user => user_for_subscription(past_due_subscription)}
+
+%legend= t(:all_past_due)
+- if @all_past_due.empty?
+ = t(:none)
+- else
+ - @all_past_due.each do |past_due_subscription|
+ = render :partial => "subscriptions/subscription_details", :locals => {:subscription => past_due_subscription, :show_user => user_for_subscription(past_due_subscription)}
+
+%legend= t(:your_settings)
+= link_to 'view own billing settings', show_or_new_customer_link(current_user) \ No newline at end of file
diff --git a/billing/app/views/subscriptions/_subscription_details.html.haml b/billing/app/views/subscriptions/_subscription_details.html.haml
index 6eda7ca..27b00c7 100644
--- a/billing/app/views/subscriptions/_subscription_details.html.haml
+++ b/billing/app/views/subscriptions/_subscription_details.html.haml
@@ -1,7 +1,16 @@
%p
+ - if local_assigns[:show_user]
+ User:
+ = link_to show_user.login, user_overview_path(show_user)
+ ID:
= link_to subscription.id, user_subscription_path(@user, subscription.id)
Balance:
- = number_to_currency(subscription.balance)
+ - subscription_balance_currency = number_to_currency(subscription.balance)
+ - if subscription.balance > 0
+ %font{:color => "red"}
+ = subscription_balance_currency
+ - else
+ = subscription_balance_currency
Bill on:
= subscription.billing_day_of_month
Start date: