- content_for :title do I18n.t("iugu.account") + " #{@account.id}" end %h2 = I18n.t("iugu.account_settings") %table %tr %td = "##{@account.id}" - if @has_subscription - if @subscription.suspended %div{ :style => "border: 2px solid #F00; padding: 20px;text-align:center;background:#FFCCCC" } %h1.no-bottom-margin Esta conta está suspensa %p.no-bottom-margin Você pode reativar esta conta clicando em ativar ou quitando seus débitos. - elsif @subscription.in_trial %div{ :style => "border: 2px solid #185277; padding: 20px;text-align:center;background:#A6D0E8" } %h1.no-bottom-margin = "Período de testes." %p.no-bottom-margin = "#{@subscription.trial_expires_at.to_date.mjd - Date.today.mjd} dia(s)" %hr - if current_user.is?(:owner, @account) - if flash[:group] == :account_update = flash[:notice] = simple_form_for @account, :url => account_update_path(@account), :method => :put do |f| = f.text_field :name, :placeholder => I18n.t("activerecord.attributes.name") = f.submit I18n.t("iugu.save"), :class => "button default no-bottom-margin" - if IuguSDK::enable_multiple_users_per_account = link_to I18n.t("iugu.users_and_roles"), account_users_index_path(@account), class: "button full-width" %hr - if @has_subscription %table.table %thead %tr %th = I18n.t "iugu.plan" %th %tbody %tr %td{ :style => "width: 60%" } %h3{ :style => "margin:0px;padding-top:10px;padding-left:10px" } = @plan_name %td{ :style => "width: 40%" } .group.horizontal_stacking = link_to I18n.t("iugu.change"), plan_index_url(@account), class: "button" = link_to I18n.t("iugu.payment_history"), account_payment_history_path(@account), class: "button full-width" %hr - unless IuguSDK::enable_custom_domain == false && IuguSDK::enable_account_alias == false - if current_user.is?(:owner, @account) || current_user.is?(:admin, @account) = link_to I18n.t("iugu.custom_domains"), account_domains_index_path(@account), :class => "button full-width" %hr - if IuguSDK::enable_account_api - if current_user.is?(:owner, @account) %h2 = I18n.t("iugu.api_tokens") - if flash[:group] == :api_token %div - if flash[:notice].class == Array %ul - flash[:notice].each do |e| %li = e - else = flash[:notice] %div .container - @account.tokens.each do |token| %table{ :style => "margin-bottom: 5px" } %tr %td = token.api_type %td = token.description %td = l token.created_at, :format => :short %td = link_to I18n.t("iugu.remove"), account_remove_token_path(@account, token), :class => "button no-bottom-margin", :confirm => I18n.t("iugu.are_you_sure?"), :method => :delete %tr %td{ :colspan => 4 } = token.token = form_tag(account_generate_new_token_path(@account), :method => :post) do %h3 = I18n.t('iugu.add') %div = select_tag :api_type, options_for_select(IuguSDK::account_api_tokens), :"data-type" => "iux.form.combobox", :class => "full-width" %div = text_field_tag :description, nil, { :placeholder => I18n.t("iugu.description") } = submit_tag I18n.t("iugu.create"), :class => "button default" - if current_user.is?(:owner, @account) - if @has_subscription - if @subscription.suspended = link_to I18n.t("iugu.activate"), account_activate_path(@account), :method => :post, class: "button full-width" - else = link_to I18n.t("iugu.suspend"), account_suspend_path(@account), :method => :post, class: "button full-width" - unless @account.destroying? - if IuguSDK::enable_account_cancel = link_to I18n.t("iugu.cancel_account"), account_destroy_path(@account), :method => :delete, class: "button full-width no-bottom-margin" - else - if IuguSDK::delay_account_exclusion > 0 = link_to I18n.t("iugu.undo"), account_cancel_destruction_path(@account), :method => :delete, class: "button full-width" - else = I18n.t("iugu.account_destruction_in") + @account.destruction_job.run_at.to_s - if current_user.accounts.count > 1 = link_to I18n.t("iugu.back"), account_settings_path, class: "button"