Update settings to re-use admin layout, one big navigation tree, improve settings forms
This commit is contained in:
@ -54,8 +54,8 @@
|
||||
- else
|
||||
%i.fa.fa-times
|
||||
%td
|
||||
= table_link_to 'circle', 'Open in web', web_path("accounts/#{account.id}")
|
||||
= table_link_to 'globe', 'Open public', TagManager.instance.url_for(account)
|
||||
= table_link_to 'circle', 'Web', web_path("accounts/#{account.id}")
|
||||
= table_link_to 'globe', 'Public', TagManager.instance.url_for(account)
|
||||
= table_link_to 'pencil', 'Edit', admin_account_path(account.id)
|
||||
|
||||
= will_paginate @accounts, pagination_options
|
||||
|
@ -1,3 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= @account.acct
|
||||
|
||||
%table.table
|
||||
%tbody
|
||||
%tr
|
||||
|
@ -11,5 +11,3 @@
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
.form-footer= render "settings/shared/links"
|
||||
|
@ -1,14 +1,17 @@
|
||||
- content_for :header_tags do
|
||||
= javascript_include_tag 'application_public'
|
||||
|
||||
|
||||
- content_for :content do
|
||||
.admin-wrapper
|
||||
.sidebar
|
||||
= link_to root_path do
|
||||
= image_tag 'logo.png', class: 'logo'
|
||||
.sidebar-wrapper
|
||||
.sidebar
|
||||
= link_to root_path do
|
||||
= image_tag 'logo.png', class: 'logo'
|
||||
|
||||
= render_navigation
|
||||
.content
|
||||
= yield
|
||||
= render_navigation
|
||||
.content-wrapper
|
||||
.content
|
||||
%h2= yield :page_title
|
||||
= yield
|
||||
|
||||
= render template: "layouts/application"
|
||||
= render template: "layouts/application", locals: { body_classes: 'admin' }
|
||||
|
@ -20,5 +20,7 @@
|
||||
|
||||
= yield :header_tags
|
||||
|
||||
%body{ class: @body_classes }
|
||||
- body_classes ||= @body_classes
|
||||
|
||||
%body{ class: body_classes }
|
||||
= content_for?(:content) ? yield(:content) : yield
|
||||
|
@ -4,14 +4,16 @@
|
||||
= simple_form_for current_user, url: settings_preferences_path, html: { method: :put } do |f|
|
||||
= render 'shared/error_messages', object: current_user
|
||||
|
||||
= f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }
|
||||
.fields-group
|
||||
= f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }
|
||||
|
||||
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
|
||||
= ff.input :follow, as: :boolean, wrapper: :with_label
|
||||
= ff.input :follow_request, as: :boolean, wrapper: :with_label
|
||||
= ff.input :reblog, as: :boolean, wrapper: :with_label
|
||||
= ff.input :favourite, as: :boolean, wrapper: :with_label
|
||||
= ff.input :mention, as: :boolean, wrapper: :with_label
|
||||
.fields-group
|
||||
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|
|
||||
= ff.input :follow, as: :boolean, wrapper: :with_label
|
||||
= ff.input :follow_request, as: :boolean, wrapper: :with_label
|
||||
= ff.input :reblog, as: :boolean, wrapper: :with_label
|
||||
= ff.input :favourite, as: :boolean, wrapper: :with_label
|
||||
= ff.input :mention, as: :boolean, wrapper: :with_label
|
||||
|
||||
= f.simple_fields_for :interactions, hash_to_object(current_user.settings.interactions) do |ff|
|
||||
= ff.input :must_be_follower, as: :boolean, wrapper: :with_label
|
||||
@ -19,5 +21,3 @@
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
.form-footer= render "settings/shared/links"
|
||||
|
@ -7,12 +7,10 @@
|
||||
.fields-group
|
||||
= f.input :display_name, placeholder: t('simple_form.labels.defaults.display_name')
|
||||
= f.input :note, placeholder: t('simple_form.labels.defaults.note')
|
||||
= f.input :avatar, wrapper: :with_label
|
||||
= f.input :header, wrapper: :with_label
|
||||
= f.input :avatar, wrapper: :with_label, hint: t('simple_form.hints.defaults.avatar')
|
||||
= f.input :header, wrapper: :with_label, hint: t('simple_form.hints.defaults.header')
|
||||
|
||||
= f.input :locked, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.locked')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
.form-footer= render "settings/shared/links"
|
||||
|
@ -1,17 +1,13 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.two_factor_auth')
|
||||
|
||||
- if current_user.otp_required_for_login
|
||||
%p= t('two_factor_auth.instructions_html')
|
||||
.simple_form
|
||||
- if current_user.otp_required_for_login
|
||||
%p= t('two_factor_auth.instructions_html')
|
||||
|
||||
.qr-code= raw @qrcode.as_svg(padding: 0, module_size: 5)
|
||||
.qr-code= raw @qrcode.as_svg(padding: 0, module_size: 5)
|
||||
|
||||
.simple_form
|
||||
= link_to t('two_factor_auth.disable'), disable_settings_two_factor_auth_path, data: { method: 'POST' }, class: 'block-button'
|
||||
- else
|
||||
%p= t('two_factor_auth.description_html')
|
||||
|
||||
.simple_form
|
||||
- else
|
||||
%p= t('two_factor_auth.description_html')
|
||||
= link_to t('two_factor_auth.enable'), enable_settings_two_factor_auth_path, data: { method: 'POST' }, class: 'block-button'
|
||||
|
||||
.form-footer= render "settings/shared/links"
|
||||
|
Reference in New Issue
Block a user