Merge branch 'gs-master' into glitch-theme
This commit is contained in:
15
app/views/admin/action_logs/_action_log.html.haml
Normal file
15
app/views/admin/action_logs/_action_log.html.haml
Normal file
@ -0,0 +1,15 @@
|
||||
%li.log-entry
|
||||
.log-entry__header
|
||||
.log-entry__avatar
|
||||
= image_tag action_log.account.avatar.url(:original), alt: '', width: 40, height: 40, class: 'avatar'
|
||||
.log-entry__content
|
||||
.log-entry__title
|
||||
= t("admin.action_logs.actions.#{action_log.action}_#{action_log.target_type.underscore}", name: content_tag(:span, action_log.account.username, class: 'username'), target: content_tag(:span, log_target(action_log), class: 'target')).html_safe
|
||||
.log-entry__timestamp
|
||||
%time= l action_log.created_at
|
||||
.spacer
|
||||
.log-entry__icon
|
||||
= fa_icon icon_for_log(action_log)
|
||||
.log-entry__icon__overlay{ class: class_for_log_icon(action_log) }
|
||||
.log-entry__extras
|
||||
= log_extra_attributes relevant_log_changes(action_log)
|
7
app/views/admin/action_logs/index.html.haml
Normal file
7
app/views/admin/action_logs/index.html.haml
Normal file
@ -0,0 +1,7 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.action_logs.title')
|
||||
|
||||
%ul
|
||||
= render @action_logs
|
||||
|
||||
= paginate @action_logs
|
21
app/views/admin/invites/_invite.html.haml
Normal file
21
app/views/admin/invites/_invite.html.haml
Normal file
@ -0,0 +1,21 @@
|
||||
%tr
|
||||
%td
|
||||
.name-tag
|
||||
= image_tag invite.user.account.avatar.url(:original), alt: '', width: 16, height: 16, class: 'avatar'
|
||||
%span.username= invite.user.account.username
|
||||
%td
|
||||
= invite.uses
|
||||
= " / #{invite.max_uses}" unless invite.max_uses.nil?
|
||||
%td
|
||||
- if invite.expired?
|
||||
= t('invites.expired')
|
||||
- else
|
||||
- if invite.expires_at.nil?
|
||||
∞
|
||||
- else
|
||||
%time.formatted{ datetime: invite.expires_at.iso8601, title: l(invite.expires_at) }
|
||||
= l invite.expires_at
|
||||
%td= table_link_to 'link', public_invite_url(invite_code: invite.code), public_invite_url(invite_code: invite.code)
|
||||
%td
|
||||
- if !invite.expired? && policy(invite).destroy?
|
||||
= table_link_to 'times', t('invites.delete'), admin_invite_path(invite), method: :delete
|
30
app/views/admin/invites/index.html.haml
Normal file
30
app/views/admin/invites/index.html.haml
Normal file
@ -0,0 +1,30 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.invites.title')
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('admin.invites.filter.title')
|
||||
%ul
|
||||
%li= filter_link_to t('admin.invites.filter.all'), available: nil, expired: nil
|
||||
%li= filter_link_to t('admin.invites.filter.available'), available: 1, expired: nil
|
||||
%li= filter_link_to t('admin.invites.filter.expired'), available: nil, expired: 1
|
||||
|
||||
- if policy(:invite).create?
|
||||
%p= t('invites.prompt')
|
||||
|
||||
= render 'invites/form'
|
||||
|
||||
%hr/
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th
|
||||
%th= t('invites.table.uses')
|
||||
%th= t('invites.table.expires_at')
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
= render @invites
|
||||
|
||||
= paginate @invites
|
@ -18,6 +18,9 @@
|
||||
.fields-group
|
||||
= f.input :timeline_preview, as: :boolean, wrapper: :with_label, label: t('admin.settings.timeline_preview.title'), hint: t('admin.settings.timeline_preview.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :show_staff_badge, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_staff_badge.title'), hint: t('admin.settings.show_staff_badge.desc_html')
|
||||
|
||||
.fields-group
|
||||
= f.input :open_registrations, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.open.title'), hint: t('admin.settings.registrations.open.desc_html')
|
||||
|
||||
@ -29,6 +32,11 @@
|
||||
|
||||
%hr/
|
||||
|
||||
.fields-group
|
||||
= f.input :min_invite_role, wrapper: :with_label, collection: %i(disabled user moderator admin), label: t('admin.settings.registrations.min_invite_role.title'), label_method: lambda { |role| role == :disabled ? t('admin.settings.registrations.min_invite_role.disabled') : t("admin.accounts.roles.#{role}") }, as: :radio_buttons, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
|
||||
%hr/
|
||||
|
||||
.fields-group
|
||||
= f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 }
|
||||
= f.input :site_terms, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_terms.title'), hint: t('admin.settings.site_terms.desc_html'), input_html: { rows: 8 }
|
||||
|
Reference in New Issue
Block a user