Sha256: 2e4ce5a8455e36f9a0b005d49d7c3e63497f75fdef9ec9a38150db5e08bee3bd
Contents?: true
Size: 1.45 KB
Versions: 7
Compression:
Stored size: 1.45 KB
Contents
- if @account.errors.any? .alert.alert-danger{ :style => "margin-bottom: 15px" } %ul - @account.errors.full_messages.each do |msg| %li = msg %h1 = I18n.t "iugu.available_plans" %table.table %tr %th = I18n.t "iugu.plan" %th = "#{I18n.t("iugu.price")} (#{@currency})" %th = I18n.t "iugu.duration" %th - @plans.reverse.each do |plan| %tr{ :class => "#{ (plan.identifier == @subscription.plan_identifier) ? 'plan active_plan' : 'plan' }" } %td = plan.name %td - price = plan.price_by_currency @currency = Money.new(price.value_cents, @currency).format %td = "#{plan.interval} #{I18n.t("iugu.interval_type." + (plan.interval == 1 ? plan.interval_type.singularize : plan.interval_type))}" %td{ :style => "text-align:center" } - if plan.identifier == @subscription.plan_identifier %strong = I18n.t "iugu.your_plan" - else - text = "iugu.change_plan" - text = "iugu.upgrade" if price.value_cents > @subscription.price_cents - text = "iugu.downgrade" if price.value_cents < @subscription.price_cents = link_to(I18n.t(text), plan_change_url(id: @account.id.to_param, plan: plan.identifier), method: :post, :class => "btn btn-primary btn-block") = link_to I18n.t("iugu.back"), account_view_path(id: params[:id]), class: "btn btn-primary btn-block"
Version data entries
7 entries across 7 versions & 1 rubygems