group admin methods for essential management

This commit is contained in:
2458773093
2019-07-29 22:45:29 +03:00
parent 06bda6e9e6
commit 43210360e9
7 changed files with 138 additions and 4 deletions

View File

@@ -0,0 +1,14 @@
%tr
%td= group.id
%td= group.title
%td= group.member_count
%td
- if group.is_featured?
= t('admin.groups.featured')
%td
- if not group.is_featured?
= table_link_to 'power-off', t('admin.groups.enable_featured'), enable_featured_admin_group_path(group, page: params[:page], **@filter_params), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
- else
= table_link_to 'power-off', t('admin.groups.disable_featured'), disable_featured_admin_group_path(group, page: params[:page], **@filter_params), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
%td
= table_link_to 'times', t('admin.groups.delete'), admin_group_path(group, page: params[:page], **@filter_params), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }

View File

@@ -0,0 +1,26 @@
- content_for :page_title do
= t('admin.groups.title')
= form_tag admin_groups_url, method: 'GET', class: 'simple_form' do
.fields-group
.input.string.optional
= text_field_tag :title, params[:title], class: 'string optional', placeholder: I18n.t("admin.groups.name")
.actions
%button= t('admin.accounts.search')
= link_to t('admin.accounts.reset'), admin_groups_path, class: 'button negative'
.table-wrapper
%table.table
%thead
%tr
%th= t('admin.groups.id')
%th= t('admin.groups.title')
%th= t('admin.groups.member_count')
%th
%th
%th
%tbody
= render @groups
= paginate @groups