From 5a4f0fa64d36df1d60bdd693580e10ce55949b6a Mon Sep 17 00:00:00 2001 From: claucece Date: Tue, 22 Sep 2015 23:50:04 -0500 Subject: changed routes and links --- .../billing/app/views/subscriptions/index.html.erb | 23 ++++++++++++ .../app/views/subscriptions/index.html.haml | 8 ---- .../app/views/subscriptions/index2.html.haml | 8 ++++ .../billing/app/views/subscriptions/new.html.erb | 43 ---------------------- .../billing/app/views/subscriptions/show.html.haml | 7 ---- .../app/views/subscriptions/show2.html.haml | 7 ++++ 6 files changed, 38 insertions(+), 58 deletions(-) create mode 100644 engines/billing/app/views/subscriptions/index.html.erb delete mode 100644 engines/billing/app/views/subscriptions/index.html.haml create mode 100644 engines/billing/app/views/subscriptions/index2.html.haml delete mode 100644 engines/billing/app/views/subscriptions/new.html.erb delete mode 100644 engines/billing/app/views/subscriptions/show.html.haml create mode 100644 engines/billing/app/views/subscriptions/show2.html.haml (limited to 'engines/billing/app/views') diff --git a/engines/billing/app/views/subscriptions/index.html.erb b/engines/billing/app/views/subscriptions/index.html.erb new file mode 100644 index 0000000..b47fae6 --- /dev/null +++ b/engines/billing/app/views/subscriptions/index.html.erb @@ -0,0 +1,23 @@ +

Subscriptions

+
+
+

Choose subcription:

+
+ + + + + + diff --git a/engines/billing/app/views/subscriptions/index.html.haml b/engines/billing/app/views/subscriptions/index.html.haml deleted file mode 100644 index 1e3fb25..0000000 --- a/engines/billing/app/views/subscriptions/index.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -%h2=t :all_subscriptions -- pending_active_pastdue = false -- @subscriptions.each do |s| - - if ['Pending', 'Active','Past Due'].include? s.status - - pending_active_pastdue = true - = render :partial => "subscription_details", :locals => {:subscription => s} -- if !pending_active_pastdue and @user == current_user - = btn 'subscribe to plan', new_subscription_path diff --git a/engines/billing/app/views/subscriptions/index2.html.haml b/engines/billing/app/views/subscriptions/index2.html.haml new file mode 100644 index 0000000..1e3fb25 --- /dev/null +++ b/engines/billing/app/views/subscriptions/index2.html.haml @@ -0,0 +1,8 @@ +%h2=t :all_subscriptions +- pending_active_pastdue = false +- @subscriptions.each do |s| + - if ['Pending', 'Active','Past Due'].include? s.status + - pending_active_pastdue = true + = render :partial => "subscription_details", :locals => {:subscription => s} +- if !pending_active_pastdue and @user == current_user + = btn 'subscribe to plan', new_subscription_path diff --git a/engines/billing/app/views/subscriptions/new.html.erb b/engines/billing/app/views/subscriptions/new.html.erb deleted file mode 100644 index 2336981..0000000 --- a/engines/billing/app/views/subscriptions/new.html.erb +++ /dev/null @@ -1,43 +0,0 @@ - -

Subscriptions

-
-<%= form_tag subscriptions_path, id: "checkout-form" do %> - <% if current_user and !current_user.has_payment_info? %> - <%= render 'customer_form' %> - <% end %> -
-

Choose subcription:

-
- -
-
-<% end %> - - - - diff --git a/engines/billing/app/views/subscriptions/show.html.haml b/engines/billing/app/views/subscriptions/show.html.haml deleted file mode 100644 index 246ebf0..0000000 --- a/engines/billing/app/views/subscriptions/show.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -%h1 - - if @subscription.status == 'Active' - Current - Subscription -= render :partial => "subscription_details", :locals => {:subscription => @subscription} -- if allow_cancel_subscription(@subscription) - = destroy_btn :cancel_subscription, user_subscription_path(@user, @subscription.id), type: 'danger' diff --git a/engines/billing/app/views/subscriptions/show2.html.haml b/engines/billing/app/views/subscriptions/show2.html.haml new file mode 100644 index 0000000..246ebf0 --- /dev/null +++ b/engines/billing/app/views/subscriptions/show2.html.haml @@ -0,0 +1,7 @@ +%h1 + - if @subscription.status == 'Active' + Current + Subscription += render :partial => "subscription_details", :locals => {:subscription => @subscription} +- if allow_cancel_subscription(@subscription) + = destroy_btn :cancel_subscription, user_subscription_path(@user, @subscription.id), type: 'danger' -- cgit v1.2.3