admin tool for editing pro status of accounts
This commit is contained in:
7
app/views/admin/accounts/_edit_pro_fields.html.haml
Normal file
7
app/views/admin/accounts/_edit_pro_fields.html.haml
Normal file
@@ -0,0 +1,7 @@
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
%label{for: "is_pro"}
|
||||
PRO
|
||||
= f.check_box :is_pro, wrapper: :with_label, hint: false, id: "is_pro"
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :pro_expires_at, as: :string, wrapper: :with_label, hint: false
|
||||
8
app/views/admin/accounts/edit_pro.html.haml
Normal file
8
app/views/admin/accounts/edit_pro.html.haml
Normal file
@@ -0,0 +1,8 @@
|
||||
- content_for :page_title do
|
||||
= 'Edit PRO status of @' + @account.acct
|
||||
|
||||
= simple_form_for @account, url: save_pro_admin_account_path(@account.id), method: :put do |f|
|
||||
= render 'edit_pro_fields', f: f
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
@@ -134,6 +134,9 @@
|
||||
- if @account.is_pro?
|
||||
=fa_icon 'check'
|
||||
%time.formatted{ datetime: @account.pro_expires_at.iso8601, title: l(@account.pro_expires_at) }= l @account.pro_expires_at
|
||||
%td
|
||||
- if @account.local?
|
||||
= table_link_to '', t('admin.accounts.edit_pro'), edit_pro_admin_account_path(@account.id), class: 'button' if can?(:verify, @account)
|
||||
|
||||
%tr
|
||||
%th= t('admin.accounts.is_verified')
|
||||
|
||||
Reference in New Issue
Block a user