- content_for :title do I18n.t("iugu.account") + " #{@account.id}" end %br %h2 = I18n.t("iugu.account_settings") + " (##{@account.id})" - if current_user.is?(:owner, @account) - if flash[:group] == :account_update = flash[:notice] = simple_form_for @account, :url => account_update_path(:id => @account.id), :method => :put do |f| = f.label :name, I18n.t("activerecord.attributes.name") = f.text_field :name %br = f.submit I18n.t("iugu.save") - if IuguSDK::enable_subscription_features %br = I18n.t("iugu.plan_name") = link_to I18n.t("iugu.change") - unless IuguSDK::enable_custom_domain == false && IuguSDK::enable_account_alias == false %br %br = I18n.t("iugu.custom_domains") - if current_user.is?(:owner, @account) || current_user.is?(:admin, @account) = link_to I18n.t("iugu.manage"), account_domains_index_path(@account.id) %br - if @primary_domain = I18n.t("iugu.primary") + ":" = @primary_domain.url - if IuguSDK::enable_multiple_users_per_account %br %br = link_to I18n.t("iugu.users_and_roles"), account_users_index_path(@account.id) - if IuguSDK::enable_subscription_features %br %br %div = link_to I18n.t("iugu.payment_history") %br - 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 - @account.tokens.each do |token| = "#{token.description} - #{token.api_type} - #{token.token} - #{token.created_at}" %br %br = form_tag(account_generate_new_token_path(@account.id), :method => :post) do = I18n.t('iugu.api_type') = select_tag :api_type, options_for_select(IuguSDK::account_api_tokens) = I18n.t('iugu.description') = text_field_tag :description = submit_tag I18n.t('iugu.create') - if current_user.is?(:owner, @account) %br %br - unless @account.destroying? - if IuguSDK::enable_account_cancel = link_to I18n.t("iugu.cancel_account"), account_destroy_path(@account.id), :method => :delete - else - if IuguSDK::delay_account_exclusion > 0 = link_to I18n.t("iugu.undo"), account_cancel_destruction_path(@account.id), :method => :delete - else = I18n.t("iugu.account_destruction_in") + @account.destruction_job.run_at.to_s