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/about/_registration.html.haml29
-rw-r--r--app/views/admin/dashboard/index.html.haml94
-rw-r--r--app/views/admin/instances/index.html.haml2
-rw-r--r--app/views/admin/settings/edit.html.haml1
4 files changed, 44 insertions, 82 deletions
diff --git a/app/views/about/_registration.html.haml b/app/views/about/_registration.html.haml
index 9cb4eb2bc..09cbe2e28 100644
--- a/app/views/about/_registration.html.haml
+++ b/app/views/about/_registration.html.haml
@@ -1,16 +1,23 @@
 = simple_form_for(new_user, url: user_registration_path) do |f|
-  %p.lead= t('about.federation_hint_html', instance: content_tag(:strong, site_hostname))
+  .simple_form__overlay-area
+    %p.lead= t('about.federation_hint_html', instance: content_tag(:strong, site_hostname))
 
-  .fields-group
-    = f.simple_fields_for :account do |account_fields|
-      = account_fields.input :username, wrapper: :with_label, autofocus: true, label: false, required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off', placeholder: t('simple_form.labels.defaults.username') }, append: "@#{site_hostname}", hint: false, disabled: closed_registrations?
+    .fields-group
+      = f.simple_fields_for :account do |account_fields|
+        = account_fields.input :username, wrapper: :with_label, label: false, required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off', placeholder: t('simple_form.labels.defaults.username') }, append: "@#{site_hostname}", hint: false, disabled: closed_registrations?
 
-    = f.input :email, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
-    = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
-    = f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
+      = f.input :email, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
+      = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
+      = f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
 
-  .fields-group
-    = f.input :agreement, as: :boolean, wrapper: :with_label, label: t('auth.checkbox_agreement_html', rules_path: about_more_path, terms_path: terms_path), disabled: closed_registrations?
+    .fields-group
+      = f.input :agreement, as: :boolean, wrapper: :with_label, label: t('auth.checkbox_agreement_html', rules_path: about_more_path, terms_path: terms_path), disabled: closed_registrations?
 
-  .actions
-    = f.button :button, sign_up_message, type: :submit, class: 'button button-primary', disabled: closed_registrations?
+    .actions
+      = f.button :button, sign_up_message, type: :submit, class: 'button button-primary', disabled: closed_registrations?
+
+    - if closed_registrations? && @instance_presenter.closed_registrations_message.present?
+      .simple_form__overlay-area__overlay
+        .simple_form__overlay-area__overlay__content.rich-formatting
+          .block-icon= fa_icon 'warning'
+          = @instance_presenter.closed_registrations_message.html_safe
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index fa3d70e9e..d448e3862 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -40,35 +40,17 @@
       %h4= t 'admin.dashboard.features'
       %ul
         %li
-          = link_to t('admin.dashboard.feature_registrations'), edit_admin_settings_path
-          - if @registrations_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          = link_to t('admin.dashboard.feature_invites'), edit_admin_settings_path
-          - if @invites_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          = link_to t('admin.dashboard.feature_deletions'), edit_admin_settings_path
-          - if @deletions_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          = link_to t('admin.dashboard.feature_profile_directory'), edit_admin_settings_path
-          - if @profile_directory
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          = link_to t('admin.dashboard.feature_relay'), admin_relays_path
-          - if @relay_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
+          = feature_hint(link_to(t('admin.dashboard.feature_registrations'), edit_admin_settings_path), @registrations_enabled)
+        %li
+          = feature_hint(link_to(t('admin.dashboard.feature_invites'), edit_admin_settings_path), @invites_enabled)
+        %li
+          = feature_hint(link_to(t('admin.dashboard.feature_deletions'), edit_admin_settings_path), @deletions_enabled)
+        %li
+          = feature_hint(link_to(t('admin.dashboard.feature_profile_directory'), edit_admin_settings_path), @profile_directory)
+        %li
+          = feature_hint(link_to(t('admin.dashboard.feature_timeline_preview'), edit_admin_settings_path), @timeline_preview)
+        %li
+          = feature_hint(link_to(t('admin.dashboard.feature_relay'), admin_relays_path), @relay_enabled)
 
   .dashboard__widgets__versions
     %div
@@ -103,47 +85,19 @@
       %h4= t 'admin.dashboard.config'
       %ul
         %li
-          = t('admin.dashboard.search')
-          - if @search_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          = t('admin.dashboard.single_user_mode')
-          - if @single_user_mode
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          LDAP
-          - if @ldap_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          CAS
-          - if @cas_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          SAML
-          - if @saml_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          PAM
-          - if @pam_enabled
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
-        %li
-          = t 'admin.dashboard.hidden_service'
-          - if @hidden_service
-            %span.pull-right.positive-hint= fa_icon 'check fw'
-          - else
-            %span.pull-right.negative-hint= fa_icon 'times fw'
+          = feature_hint(t('admin.dashboard.search'), @search_enabled)
+        %li
+          = feature_hint(t('admin.dashboard.single_user_mode'), @single_user_mode)
+        %li
+          = feature_hint('LDAP', @ldap_enabled)
+        %li
+          = feature_hint('CAS', @cas_enabled)
+        %li
+          = feature_hint('SAML', @saml_enabled)
+        %li
+          = feature_hint('PAM', @pam_enabled)
+        %li
+          = feature_hint(t('admin.dashboard.hidden_service'), @hidden_service)
 
   .dashboard__widgets__trends
     %div
diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml
index 235927140..9574c3147 100644
--- a/app/views/admin/instances/index.html.haml
+++ b/app/views/admin/instances/index.html.haml
@@ -33,7 +33,7 @@
       %h4
         = instance.domain
         %small
-          = t('admin.instances.known_accounts', count: instance.accounts_count)
+          = t('admin.instances.known_accounts', count: instance.cached_accounts_count)
 
           - if instance.domain_block
             - if !instance.domain_block.noop?
diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml
index 9995e0b2a..475fb3a2f 100644
--- a/app/views/admin/settings/edit.html.haml
+++ b/app/views/admin/settings/edit.html.haml
@@ -2,6 +2,7 @@
   = t('admin.settings.title')
 
 = simple_form_for @admin_settings, url: admin_settings_path, html: { method: :patch } do |f|
+  = render 'shared/error_messages', object: @admin_settings
 
   .fields-group
     = f.input :site_title, wrapper: :with_label, label: t('admin.settings.site_title')