about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/accounts/show.html.haml2
-rw-r--r--app/views/admin/follow_recommendations/show.html.haml2
-rw-r--r--app/views/admin/instances/show.html.haml2
-rw-r--r--app/views/admin/reports/_actions.html.haml27
-rw-r--r--app/views/admin/reports/show.html.haml57
-rw-r--r--app/views/admin/trends/links/_preview_card.html.haml2
-rw-r--r--app/views/settings/preferences/appearance/show.html.haml2
-rw-r--r--app/views/settings/preferences/other/show.html.haml4
8 files changed, 57 insertions, 41 deletions
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index 3867d1b19..f3853d629 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -147,7 +147,7 @@
 
           %tr
             %th= t('simple_form.labels.defaults.locale')
-            %td= @account.user_locale
+            %td= standard_locale_name(@account.user_locale)
             %td
 
           %tr
diff --git a/app/views/admin/follow_recommendations/show.html.haml b/app/views/admin/follow_recommendations/show.html.haml
index 2878f07d7..85dee210a 100644
--- a/app/views/admin/follow_recommendations/show.html.haml
+++ b/app/views/admin/follow_recommendations/show.html.haml
@@ -10,7 +10,7 @@
     .filter-subset.filter-subset--with-select
       %strong= t('admin.follow_recommendations.language')
       .input.select.optional
-        = select_tag :language, options_for_select(I18n.available_locales.map { |key| [human_locale(key), key]}, @language)
+        = select_tag :language, options_for_select(I18n.available_locales.map { |key| key.to_s.split(/[_-]/).first.to_sym }.uniq.map { |key| [standard_locale_name(key), key]}, @language)
 
     .filter-subset
       %strong= t('admin.follow_recommendations.status')
diff --git a/app/views/admin/instances/show.html.haml b/app/views/admin/instances/show.html.haml
index e520bca0c..4db8fd15c 100644
--- a/app/views/admin/instances/show.html.haml
+++ b/app/views/admin/instances/show.html.haml
@@ -84,5 +84,5 @@
       = link_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }, class: 'button'
     - else
       = link_to t('admin.instances.delivery.restart'), restart_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }, class: 'button'
-    - unless @instance.delivery_failure_tracker.available? && @instance.accounts_count > 0
+    - if !@instance.delivery_failure_tracker.available? || @instance.accounts_count.zero? || @instance.domain_block&.suspend?
       = link_to t('admin.instances.purge'), admin_instance_path(@instance), data: { confirm: t('admin.instances.confirm_purge'), method: :delete }, class: 'button'
diff --git a/app/views/admin/reports/_actions.html.haml b/app/views/admin/reports/_actions.html.haml
new file mode 100644
index 000000000..f3162b325
--- /dev/null
+++ b/app/views/admin/reports/_actions.html.haml
@@ -0,0 +1,27 @@
+= form_tag admin_report_actions_path(@report), method: :post do
+  .report-actions
+    .report-actions__item
+      .report-actions__item__button
+        = link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
+      .report-actions__item__description
+        = t('admin.reports.actions.resolve_description_html')
+    .report-actions__item
+      .report-actions__item__button
+        = button_tag t('admin.reports.delete_and_resolve'), name: :delete, class: 'button button--destructive'
+      .report-actions__item__description
+        = t('admin.reports.actions.delete_description_html')
+    .report-actions__item
+      .report-actions__item__button
+        = button_tag t('admin.accounts.silence'), name: :silence, class: 'button button--destructive'
+      .report-actions__item__description
+        = t('admin.reports.actions.silence_description_html')
+    .report-actions__item
+      .report-actions__item__button
+        = button_tag t('admin.accounts.suspend'), name: :suspend, class: 'button button--destructive'
+      .report-actions__item__description
+        = t('admin.reports.actions.suspend_description_html')
+    .report-actions__item
+      .report-actions__item__button
+        = link_to t('admin.accounts.custom'), new_admin_account_action_path(@report.target_account_id, report_id: @report.id), class: 'button'
+      .report-actions__item__description
+        = t('admin.reports.actions.other_description_html')
diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml
index e03c1220c..018a0c54a 100644
--- a/app/views/admin/reports/show.html.haml
+++ b/app/views/admin/reports/show.html.haml
@@ -120,24 +120,30 @@
 - if @report.comment.present?
   %p= t('admin.reports.comment_description_html', name: content_tag(:strong, @report.account.username, class: 'username'))
 
-  .report-notes__item
-    = image_tag @report.account.avatar.url, class: 'report-notes__item__avatar'
-
-    .report-notes__item__header
-      %span.username
-        = link_to display_name(@report.account), admin_account_path(@report.account_id)
-      %time{ datetime: @report.created_at.iso8601, title: l(@report.created_at) }
-        - if @report.created_at.today?
-          = t('admin.report_notes.today_at', time: l(@report.created_at, format: :time))
-        - else
-          = l @report.created_at.to_date
+  .report-notes
+    .report-notes__item
+      = image_tag @report.account.avatar.url, class: 'report-notes__item__avatar'
+
+      .report-notes__item__header
+        %span.username
+          = link_to display_name(@report.account), admin_account_path(@report.account_id)
+        %time{ datetime: @report.created_at.iso8601, title: l(@report.created_at) }
+          - if @report.created_at.today?
+            = t('admin.report_notes.today_at', time: l(@report.created_at, format: :time))
+          - else
+            = l @report.created_at.to_date
 
-    .report-notes__item__content
-      = simple_format(h(@report.comment))
+      .report-notes__item__content
+        = simple_format(h(@report.comment))
 
 %hr.spacer/
 
-%h3= t 'admin.reports.statuses'
+%h3
+  = t 'admin.reports.statuses'
+  %small.section-skip-link
+    = link_to '#actions' do
+      = fa_icon 'angle-double-down'
+      = t('admin.reports.skip_to_actions')
 
 %p
   = t 'admin.reports.statuses_description_html'
@@ -152,8 +158,6 @@
       .batch-table__toolbar__actions
         - if !@statuses.empty? && @report.unresolved?
           = f.button safe_join([fa_icon('times'), t('admin.statuses.batch.remove_from_report')]), name: :remove_from_report, class: 'table-action-link', type: :submit
-          = f.button safe_join([fa_icon('trash'), t('admin.reports.delete_and_resolve')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
-        - else
     .batch-table__body
       - if @statuses.empty?
         = nothing_here 'nothing-here--under-tabs'
@@ -163,24 +167,9 @@
 - if @report.unresolved?
   %hr.spacer/
 
-  %p= t 'admin.reports.actions_description_html'
-
-  .report-actions
-    .report-actions__item
-      .report-actions__item__button
-        = link_to t('admin.accounts.silence'), new_admin_account_action_path(@report.target_account_id, type: 'silence', report_id: @report.id), class: 'button button--destructive'
-      .report-actions__item__description
-        = t('admin.reports.actions.silence_description_html')
-    .report-actions__item
-      .report-actions__item__button
-        = link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@report.target_account_id, report_id: @report.id, type: 'suspend'), class: 'button button--destructive'
-      .report-actions__item__description
-        = t('admin.reports.actions.suspend_description_html')
-    .report-actions__item
-      .report-actions__item__button
-        = link_to t('admin.accounts.custom'), new_admin_account_action_path(@report.target_account_id, report_id: @report.id), class: 'button'
-      .report-actions__item__description
-        = t('admin.reports.actions.other_description_html')
+  %p#actions= t 'admin.reports.actions_description_html'
+
+  = render partial: 'admin/reports/actions'
 
 - unless @action_logs.empty?
   %hr.spacer/
diff --git a/app/views/admin/trends/links/_preview_card.html.haml b/app/views/admin/trends/links/_preview_card.html.haml
index b88c1be2f..d88e06bfd 100644
--- a/app/views/admin/trends/links/_preview_card.html.haml
+++ b/app/views/admin/trends/links/_preview_card.html.haml
@@ -13,7 +13,7 @@

 
       - if preview_card.language.present?
-        = human_locale(preview_card.language)
+        = standard_locale_name(preview_card.language)

 
       = t('admin.trends.links.shared_by_over_week', count: preview_card.history.reduce(0) { |sum, day| sum + day.accounts })
diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml
index 4170c9e44..c3342ddf0 100644
--- a/app/views/settings/preferences/appearance/show.html.haml
+++ b/app/views/settings/preferences/appearance/show.html.haml
@@ -6,7 +6,7 @@
 
 = simple_form_for current_user, url: settings_preferences_appearance_path, html: { method: :put, id: 'edit_user' } do |f|
   .fields-group
-    = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, selected: I18n.locale, hint: false
+    = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| native_locale_name(locale) }, selected: I18n.locale, hint: false
 
   - unless I18n.locale == :en
     .flash-message.translation-prompt
diff --git a/app/views/settings/preferences/other/show.html.haml b/app/views/settings/preferences/other/show.html.haml
index 372d934fb..1f922a5c6 100644
--- a/app/views/settings/preferences/other/show.html.haml
+++ b/app/views/settings/preferences/other/show.html.haml
@@ -27,7 +27,7 @@
       = f.input :setting_default_privacy, collection: Status.selectable_visibilities, wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') }, required: false, hint: false
 
     .fields-group.fields-row__column.fields-row__column-6
-      = f.input :setting_default_language, collection: [nil] + filterable_languages.sort, wrapper: :with_label, label_method: lambda { |locale| locale.nil? ? I18n.t('statuses.language_detection') : human_locale(locale) }, required: false, include_blank: false, hint: false
+      = f.input :setting_default_language, collection: [nil] + filterable_languages, wrapper: :with_label, label_method: lambda { |locale| locale.nil? ? I18n.t('statuses.default_language') : native_locale_name(locale) }, required: false, include_blank: false, hint: false
 
   .fields-group
     = f.input :setting_default_sensitive, as: :boolean, wrapper: :with_label
@@ -41,7 +41,7 @@
   %h4= t 'preferences.public_timelines'
 
   .fields-group
-    = f.input :chosen_languages, collection: filterable_languages.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
+    = f.input :chosen_languages, collection: filterable_languages, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| native_locale_name(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
 
   .actions
     = f.button :button, t('generic.save_changes'), type: :submit