Scrollable tables in settings pages (#4857)
* Scrollable tables in settings pages * Add space before curly bracemaster
parent
baa8b82179
commit
3c45d3963a
@ -1,16 +1,17 @@ |
||||
%table.table |
||||
%tbody |
||||
%tr |
||||
%td= t('admin.accounts.show.created_reports') |
||||
%td= link_to pluralize(account.reports.count, t('admin.accounts.show.report')), admin_reports_path(account_id: account.id) |
||||
%tr |
||||
%td= t('admin.accounts.show.targeted_reports') |
||||
%td= link_to pluralize(account.targeted_reports.count, t('admin.accounts.show.report')), admin_reports_path(target_account_id: account.id) |
||||
- if account.silenced? || account.suspended? |
||||
.table-wrapper |
||||
%table.table |
||||
%tbody |
||||
%tr |
||||
%td= t('admin.accounts.moderation.title') |
||||
%td |
||||
- if account.silenced? |
||||
%p= t('admin.accounts.moderation.silenced') |
||||
- if account.suspended? |
||||
%p= t('admin.accounts.moderation.suspended') |
||||
%td= t('admin.accounts.show.created_reports') |
||||
%td= link_to pluralize(account.reports.count, t('admin.accounts.show.report')), admin_reports_path(account_id: account.id) |
||||
%tr |
||||
%td= t('admin.accounts.show.targeted_reports') |
||||
%td= link_to pluralize(account.targeted_reports.count, t('admin.accounts.show.report')), admin_reports_path(target_account_id: account.id) |
||||
- if account.silenced? || account.suspended? |
||||
%tr |
||||
%td= t('admin.accounts.moderation.title') |
||||
%td |
||||
- if account.silenced? |
||||
%p= t('admin.accounts.moderation.silenced') |
||||
- if account.suspended? |
||||
%p= t('admin.accounts.moderation.suspended') |
||||
|
@ -1,15 +1,16 @@ |
||||
- content_for :page_title do |
||||
= t('admin.domain_blocks.title') |
||||
|
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('admin.domain_blocks.domain') |
||||
%th= t('admin.domain_blocks.severity') |
||||
%th= t('admin.domain_blocks.reject_media') |
||||
%th |
||||
%tbody |
||||
= render @domain_blocks |
||||
.table-wrapper |
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('admin.domain_blocks.domain') |
||||
%th= t('admin.domain_blocks.severity') |
||||
%th= t('admin.domain_blocks.reject_media') |
||||
%th |
||||
%tbody |
||||
= render @domain_blocks |
||||
|
||||
= paginate @domain_blocks |
||||
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' |
||||
|
@ -1,12 +1,13 @@ |
||||
- content_for :page_title do |
||||
= t('admin.instances.title') |
||||
|
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('admin.instances.domain_name') |
||||
%th= t('admin.instances.account_count') |
||||
%tbody |
||||
= render @instances |
||||
.table-wrapper |
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('admin.instances.domain_name') |
||||
%th= t('admin.instances.account_count') |
||||
%tbody |
||||
= render @instances |
||||
|
||||
= paginate paginated_instances |
||||
|
@ -1,15 +1,16 @@ |
||||
- content_for :page_title do |
||||
= t('admin.subscriptions.title') |
||||
|
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('admin.subscriptions.topic') |
||||
%th= t('admin.subscriptions.callback_url') |
||||
%th= t('admin.subscriptions.confirmed') |
||||
%th= t('admin.subscriptions.expires_in') |
||||
%th= t('admin.subscriptions.last_delivery') |
||||
%tbody |
||||
= render @subscriptions |
||||
.table-wrapper |
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('admin.subscriptions.topic') |
||||
%th= t('admin.subscriptions.callback_url') |
||||
%th= t('admin.subscriptions.confirmed') |
||||
%th= t('admin.subscriptions.expires_in') |
||||
%th= t('admin.subscriptions.last_delivery') |
||||
%tbody |
||||
= render @subscriptions |
||||
|
||||
= paginate @subscriptions |
||||
|
@ -1,28 +1,29 @@ |
||||
%h6= t 'sessions.title' |
||||
%p.muted-hint= t 'sessions.explanation' |
||||
|
||||
%table.table.inline-table |
||||
%thead |
||||
%tr |
||||
%th= t 'sessions.browser' |
||||
%th= t 'sessions.ip' |
||||
%th= t 'sessions.activity' |
||||
%td |
||||
%tbody |
||||
- @sessions.each do |session| |
||||
.table-wrapper |
||||
%table.table.inline-table |
||||
%thead |
||||
%tr |
||||
%th= t 'sessions.browser' |
||||
%th= t 'sessions.ip' |
||||
%th= t 'sessions.activity' |
||||
%td |
||||
%span{ title: session.user_agent }< |
||||
= fa_icon "#{session_device_icon(session)} fw", 'aria-label' => session_device_icon(session) |
||||
= ' ' |
||||
= t 'sessions.description', browser: t("sessions.browsers.#{session.browser}"), platform: t("sessions.platforms.#{session.platform}") |
||||
%td |
||||
%samp= session.ip |
||||
%td |
||||
- if current_session.session_id == session.session_id |
||||
= t 'sessions.current_session' |
||||
- else |
||||
%time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at) |
||||
%td |
||||
- if current_session.session_id != session.session_id |
||||
= table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete |
||||
%tbody |
||||
- @sessions.each do |session| |
||||
%tr |
||||
%td |
||||
%span{ title: session.user_agent }< |
||||
= fa_icon "#{session_device_icon(session)} fw", 'aria-label' => session_device_icon(session) |
||||
= ' ' |
||||
= t 'sessions.description', browser: t("sessions.browsers.#{session.browser}"), platform: t("sessions.platforms.#{session.platform}") |
||||
%td |
||||
%samp= session.ip |
||||
%td |
||||
- if current_session.session_id == session.session_id |
||||
= t 'sessions.current_session' |
||||
- else |
||||
%time.time-ago{ datetime: session.updated_at.iso8601, title: l(session.updated_at) }= l(session.updated_at) |
||||
%td |
||||
- if current_session.session_id != session.session_id |
||||
= table_link_to 'times', t('sessions.revoke'), settings_session_path(session), method: :delete |
||||
|
@ -1,23 +1,24 @@ |
||||
- content_for :page_title do |
||||
= t('doorkeeper.authorized_applications.index.title') |
||||
|
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('doorkeeper.authorized_applications.index.application') |
||||
%th= t('doorkeeper.authorized_applications.index.scopes') |
||||
%th= t('doorkeeper.authorized_applications.index.created_at') |
||||
%th |
||||
%tbody |
||||
- @applications.each do |application| |
||||
.table-wrapper |
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%td |
||||
- if application.website.blank? |
||||
= application.name |
||||
- else |
||||
= link_to application.name, application.website, target: '_blank', rel: 'noopener' |
||||
%th!= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('<br />') |
||||
%td= l application.created_at |
||||
%td |
||||
- unless application.superapp? |
||||
= table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') } |
||||
%th= t('doorkeeper.authorized_applications.index.application') |
||||
%th= t('doorkeeper.authorized_applications.index.scopes') |
||||
%th= t('doorkeeper.authorized_applications.index.created_at') |
||||
%th |
||||
%tbody |
||||
- @applications.each do |application| |
||||
%tr |
||||
%td |
||||
- if application.website.blank? |
||||
= application.name |
||||
- else |
||||
= link_to application.name, application.website, target: '_blank', rel: 'noopener' |
||||
%th!= application.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.join('<br />') |
||||
%td= l application.created_at |
||||
%td |
||||
- unless application.superapp? |
||||
= table_link_to 'times', t('doorkeeper.authorized_applications.buttons.revoke'), oauth_authorized_application_path(application), method: :delete, data: { confirm: t('doorkeeper.authorized_applications.confirmations.revoke') } |
||||
|
@ -1,19 +1,20 @@ |
||||
- content_for :page_title do |
||||
= t('doorkeeper.applications.index.title') |
||||
|
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%th= t('doorkeeper.applications.index.application') |
||||
%th= t('doorkeeper.applications.index.scopes') |
||||
%th |
||||
%tbody |
||||
- @applications.each do |application| |
||||
.table-wrapper |
||||
%table.table |
||||
%thead |
||||
%tr |
||||
%td= link_to application.name, settings_application_path(application) |
||||
%th= application.scopes |
||||
%td |
||||
= table_link_to 'times', t('doorkeeper.applications.index.delete'), settings_application_path(application), method: :delete, data: { confirm: t('doorkeeper.applications.confirmations.destroy') } |
||||
%th= t('doorkeeper.applications.index.application') |
||||
%th= t('doorkeeper.applications.index.scopes') |
||||
%th |
||||
%tbody |
||||
- @applications.each do |application| |
||||
%tr |
||||
%td= link_to application.name, settings_application_path(application) |
||||
%th= application.scopes |
||||
%td |
||||
= table_link_to 'times', t('doorkeeper.applications.index.delete'), settings_application_path(application), method: :delete, data: { confirm: t('doorkeeper.applications.confirmations.destroy') } |
||||
|
||||
= paginate @applications |
||||
= link_to t('doorkeeper.applications.index.new'), new_settings_application_path, class: 'button' |
||||
|
@ -1,21 +1,22 @@ |
||||
- content_for :page_title do |
||||
= t('settings.export') |
||||
|
||||
%table.table |
||||
%tbody |
||||
%tr |
||||
%th= t('exports.storage') |
||||
%td= number_to_human_size @export.total_storage |
||||
%td |
||||
%tr |
||||
%th= t('exports.follows') |
||||
%td= @export.total_follows |
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_follows_path(format: :csv) |
||||
%tr |
||||
%th= t('exports.blocks') |
||||
%td= @export.total_blocks |
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_blocks_path(format: :csv) |
||||
%tr |
||||
%th= t('exports.mutes') |
||||
%td= @export.total_mutes |
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_mutes_path(format: :csv) |
||||
.table-wrapper |
||||
%table.table |
||||
%tbody |
||||
%tr |
||||
%th= t('exports.storage') |
||||
%td= number_to_human_size @export.total_storage |
||||
%td |
||||
%tr |
||||
%th= t('exports.follows') |
||||
%td= @export.total_follows |
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_follows_path(format: :csv) |
||||
%tr |
||||
%th= t('exports.blocks') |
||||
%td= @export.total_blocks |
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_blocks_path(format: :csv) |
||||
%tr |
||||
%th= t('exports.mutes') |
||||
%td= @export.total_mutes |
||||
%td= table_link_to 'download', t('exports.csv'), settings_exports_mutes_path(format: :csv) |
||||
|
Loading…
Reference in new issue