diff options
author | claucece <soficeli0@gmail.com> | 2015-09-22 23:50:04 -0500 |
---|---|---|
committer | claucece <soficeli0@gmail.com> | 2015-10-05 22:39:31 -0500 |
commit | 5a4f0fa64d36df1d60bdd693580e10ce55949b6a (patch) | |
tree | da89540518cb5224e9b273d834156fff3ffcfc4e /engines/billing/app/views | |
parent | c10bbfa44442c86fda82c16524341d5f21b63664 (diff) |
changed routes and links
Diffstat (limited to 'engines/billing/app/views')
-rw-r--r-- | engines/billing/app/views/subscriptions/index.html.erb | 23 | ||||
-rw-r--r-- | engines/billing/app/views/subscriptions/index2.html.haml (renamed from engines/billing/app/views/subscriptions/index.html.haml) | 0 | ||||
-rw-r--r-- | engines/billing/app/views/subscriptions/new.html.erb | 43 | ||||
-rw-r--r-- | engines/billing/app/views/subscriptions/show2.html.haml (renamed from engines/billing/app/views/subscriptions/show.html.haml) | 0 |
4 files changed, 23 insertions, 43 deletions
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 @@ +<h2 class="mbs">Subscriptions</h2> +<br> +<br> +<p>Choose subcription:</p> +<br> +<ul class="nav nav-tabs nav-stacked"> + <% @subscriptions.each do |subscription| %> + <li> + <div class="btn-group"> + <button class="btn"> <%= subscription.name %> + <%= subscription.price %> </button> + </div> + <div> + <%=link_to "Checkout", :show_subscription, class: "button" %> + </div> + </li> + <% end %> +</ul> + + + + + diff --git a/engines/billing/app/views/subscriptions/index.html.haml b/engines/billing/app/views/subscriptions/index2.html.haml index 1e3fb25..1e3fb25 100644 --- a/engines/billing/app/views/subscriptions/index.html.haml +++ b/engines/billing/app/views/subscriptions/index2.html.haml 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 @@ -<script src="https://js.braintreegateway.com/v2/braintree.js"></script> -<h2 class="mbs">Subscriptions</h2> -<br> -<%= form_tag subscriptions_path, id: "checkout-form" do %> - <% if current_user and !current_user.has_payment_info? %> - <%= render 'customer_form' %> - <% end %> -<br> -<p>Choose subcription:</p> -<br> -<ul class="nav nav-tabs nav-stacked"> - <% @subscriptions.each do |subscription| %> - <li> - <div class="btn-group"> - <button class="btn"> <%= subscription.name %> - <%= subscription.price %> </button> - </div> - <br> - <br> - <%= simple_form_for :subscription, :url => :subscriptions, :id => "checkout-form-#{subscription.id}" do |f| %> - <input type="hidden" name="plan_id" id="" value="<%= subscription.id%>" /> - <div id="payment-form-<%= subscription.id%>"></div> - <div class="form-actions"> - <%= f.submit t(:subscribe), :class => 'btn btn-primary' %> - </div> - <script type="text/javascript" charset="utf-8"> - var clientToken = "<%= @client_token %>"; - braintree.setup(clientToken, "dropin", { - container: "payment-form-<%= subscription.id%>", - coinbase: { container: "coinbase-container-id" } - }); - </script> - <% end %> - </li> - <% end %> -</ul> -<div id="payment-form"></div> -<div id='coinbase-container-id'></div> -<% end %> - - - - diff --git a/engines/billing/app/views/subscriptions/show.html.haml b/engines/billing/app/views/subscriptions/show2.html.haml index 246ebf0..246ebf0 100644 --- a/engines/billing/app/views/subscriptions/show.html.haml +++ b/engines/billing/app/views/subscriptions/show2.html.haml |