diff --git a/app/views/payments/_form.html.erb b/app/views/payments/_form.html.erb index def2b42..036e7a6 100644 --- a/app/views/payments/_form.html.erb +++ b/app/views/payments/_form.html.erb @@ -33,7 +33,7 @@ <%= f.text_area :paypalcode, :class=>"input-xxlarge", :placeholder=>"PayPal-supplied code" %>
- <%= f.label :promoactive %> + <%= f.label :promoactive %> <%= f.check_box :promoactive %>

diff --git a/app/views/payments/index.html.erb b/app/views/payments/index.html.erb index 399cca4..32d1c92 100644 --- a/app/views/payments/index.html.erb +++ b/app/views/payments/index.html.erb @@ -15,34 +15,40 @@

+ +<% if @payments %> -<% @payments.each do |payment| %> - -<% if payment.promoactive or (@current_user && @current_user.admin) %> -

-
-

- <%= payment.title %> - <% if !payment.promoactive %> - NOT ACTIVE - <% end %> -

-

<%= payment.description %>

-

- <% if @current_user && @current_user.admin %> - <%= link_to 'Show', payment %> - <%= link_to 'Edit', edit_payment_path(payment) %> - <%= link_to 'Destroy', payment, method: :delete, data: { confirm: 'Are you sure?' } %> - <% end %> -

+ <% @payments.each do |payment| %> + + <% if payment.promoactive or (@current_user && @current_user.admin) %> +
+
+

+ <%= payment.title %> + <% if !payment.promoactive %> + NOT ACTIVE + <% end %> +

+

<%= payment.description %>

+

+ <% if @current_user && @current_user.admin %> + <%= link_to 'Show', payment %> + <%= link_to 'Edit', edit_payment_path(payment) %> + <%= link_to 'Destroy', payment, method: :delete, data: { confirm: 'Are you sure?' } %> + <% end %> +

+
+ +
+

<%= raw(payment.paypalcode) %>

+
+ <% end %> -
-

<%= raw(payment.paypalcode) %>

-
-
-<% end %> + <% end %> +<% else %> + No active promotions available...

<% end %>