Fix lints in app/views/settings
This commit is contained in:
parent
fe70717510
commit
c21a3d0f73
|
@ -11,19 +11,19 @@
|
|||
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
||||
%div= raw t('views.settings.account.email_confirm', resource: resource.unconfirmed_email)
|
||||
|
||||
= f.password_field :password, autocomplete: "off", label: t('views.settings.account.password'), help: t('views.settings.account.password_help')
|
||||
= f.password_field :password_confirmation, autocomplete: "off", label: t('views.settings.account.password_confirm')
|
||||
= f.password_field :password, autocomplete: 'off', label: t('views.settings.account.password'), help: t('views.settings.account.password_help')
|
||||
= f.password_field :password_confirmation, autocomplete: 'off', label: t('views.settings.account.password_confirm')
|
||||
|
||||
%button.btn.btn-primary{"data-target" => "#modal-passwd", "data-toggle" => "modal", :type => "button"}
|
||||
%button.btn.btn-primary{ data: { target: '#modal-passwd', toggle: :modal, type: :button } }
|
||||
= t 'views.actions.save'
|
||||
|
||||
%hr/
|
||||
%p
|
||||
= t 'views.settings.account.unsatisfied'
|
||||
=button_to t('views.settings.account.delete'), '/settings/account', data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger btn-xs"
|
||||
= button_to t('views.settings.account.delete'), '/settings/account', data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-danger btn-xs'
|
||||
|
||||
= link_to t('views.settings.account.back'), :back
|
||||
|
||||
.visible-xs= render "shared/links"
|
||||
.visible-xs= render 'shared/links'
|
||||
|
||||
|
||||
|
|
|
@ -132,13 +132,13 @@
|
|||
%h4 Sign In
|
||||
|
||||
%p.font-weight-bold.mb-0 Current Sign In
|
||||
%p.text-muted= current_user.current_sign_in_at ? localize(current_user.current_sign_in_at) : "Not set"
|
||||
%p.text-muted= current_user.current_sign_in_at ? localize(current_user.current_sign_in_at) : 'Not set'
|
||||
|
||||
%p.font-weight-bold.mb-0 Last Sign In
|
||||
%p.text-muted= current_user.last_sign_in_at ? localize(current_user.last_sign_in_at) : "Not set"
|
||||
%p.text-muted= current_user.last_sign_in_at ? localize(current_user.last_sign_in_at) : 'Not set'
|
||||
|
||||
%p.font-weight-bold.mb-0 Remember me set at
|
||||
%p.text-muted= current_user.remember_created_at ? localize(current_user.remember_created_at) : "Not set"
|
||||
%p.text-muted= current_user.remember_created_at ? localize(current_user.remember_created_at) : 'Not set'
|
||||
.col-md-6.col-sm-6.col-xs-12
|
||||
%h4 Create/Update
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%h2 Export your data
|
||||
%p
|
||||
The data is inside a
|
||||
%code= ".tar.gz"
|
||||
%code= '.tar.gz'
|
||||
archive and available in three formats: YAML, JSON, and XML. The archive also contains a copy of your
|
||||
profile picture and header picture in all sizes.
|
||||
%p
|
||||
|
@ -13,7 +13,7 @@
|
|||
- if current_user.can_export?
|
||||
%form{ action: begin_user_export_path, method: 'POST' }
|
||||
%p.text-center
|
||||
%button#export-btn.btn.btn-lg.btn-primary{type: :submit} Export
|
||||
%button.btn.btn-lg.btn-primary#export-btn{ type: :submit } Export
|
||||
= hidden_field_tag :authenticity_token, form_authenticity_token
|
||||
- else
|
||||
%p.text-center
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.card
|
||||
.card-body
|
||||
= bootstrap_form_for(current_user, url: {action: "edit_privacy"}, method: "patch") do |f|
|
||||
= bootstrap_form_for(current_user, url: { action: 'edit_privacy' }, method: 'patch') do |f|
|
||||
|
||||
= f.check_box :privacy_allow_anonymous_questions, label: t('views.settings.privacy.anonymous')
|
||||
= f.check_box :privacy_allow_public_timeline, label: t('views.settings.privacy.public')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.card
|
||||
.card-body
|
||||
= bootstrap_form_for(current_user, url: {action: "edit"}, :html => { :multipart => true }, method: "patch") do |f|
|
||||
= bootstrap_form_for(current_user, url: { action: 'edit' }, html: { multipart: true }, method: 'patch') do |f|
|
||||
|
||||
= f.text_field :display_name, label: t('views.settings.profile.displayname')
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
|||
%img#profile-picture-cropper{ src: current_user.profile_picture.url(:medium) }
|
||||
.col-sm-2.col-md-4
|
||||
.btn-group
|
||||
%button#cropper-zoom-out.btn.btn-inverse{type: :button}
|
||||
%button.btn.btn-inverse#cropper-zoom-out{ type: :button }
|
||||
%i.fa.fa-search-minus
|
||||
%button#cropper-zoom-in.btn.btn-inverse{type: :button}
|
||||
%button.btn.btn-inverse#cropper-zoom-in{ type: :button }
|
||||
%i.fa.fa-search-plus
|
||||
|
||||
.row.mb-2#profile-header-media
|
||||
|
@ -33,9 +33,9 @@
|
|||
%img#profile-header-cropper{ src: current_user.profile_header.url(:web) }
|
||||
.col-sm-2.col-md-4
|
||||
.btn-group
|
||||
%button#cropper-header-zoom-out.btn.btn-inverse{type: :button}
|
||||
%button.btn.btn-inverse#cropper-header-zoom-out{ type: :button }
|
||||
%i.fa.fa-search-minus
|
||||
%button#cropper-header-zoom-in.btn.btn-inverse{type: :button}
|
||||
%button.btn.btn-inverse#cropper-header-zoom-in{ type: :button }
|
||||
%i.fa.fa-search-plus
|
||||
|
||||
= f.text_field :motivation_header, label: t('views.settings.profile.motivation'), placeholder: t('views.settings.profile.placeholder.motivation')
|
||||
|
@ -48,10 +48,10 @@
|
|||
|
||||
= f.check_box :show_foreign_themes, label: 'Render other user themes when visiting their profile'
|
||||
|
||||
- for attrib in %i(crop_x crop_y crop_w crop_h)
|
||||
- %i[crop_x crop_y crop_w crop_h].each do |attrib|
|
||||
= f.hidden_field attrib, id: attrib
|
||||
|
||||
- for attrib in %i(crop_h_x crop_h_y crop_h_w crop_h_h)
|
||||
- %i[crop_h_x crop_h_y crop_h_w crop_h_h].each do |attrib|
|
||||
= f.hidden_field attrib, id: attrib
|
||||
|
||||
= f.submit t('views.actions.save'), class: 'btn btn-primary'
|
|
@ -1,19 +1,22 @@
|
|||
.card
|
||||
.card-body
|
||||
- if @services.count > 0
|
||||
- if @services.count.positive?
|
||||
= t 'views.settings.service.enabled'
|
||||
- else
|
||||
= t 'views.settings.service.none'
|
||||
|
||||
- APP_CONFIG['sharing'].each do |service, service_options|
|
||||
- if service_options['enabled'] and !@services.any? { |x| x.provider == service.to_s }
|
||||
- if service_options['enabled'] && @services.none? { |x| x.provider == service.to_s }
|
||||
%p= link_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}"
|
||||
|
||||
- if @services.count > 0
|
||||
- if @services.count.positive?
|
||||
%ul.list-group
|
||||
- @services.each do |service|
|
||||
%li.list-group-item
|
||||
%i{ class: "fa fa-#{service.provider}" }
|
||||
%strong= service.provider.capitalize
|
||||
(#{service.nickname})
|
||||
= link_to t('views.settings.service.disconnect'), service_path(service), data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) }, method: :delete
|
||||
= link_to t('views.settings.service.disconnect'),
|
||||
service_path(service),
|
||||
data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) },
|
||||
method: :delete
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
- if current_user.theme
|
||||
.pull-right
|
||||
= button_to 'Delete Theme', delete_user_theme_path, data: { confirm: "Are you sure?" }, tabindex: -1, method: :delete, class: "btn btn-danger"
|
||||
= bootstrap_form_for(current_user.theme || Theme.new, url: {action: "update_theme"}, html: {id: 'update_theme'}, method: "patch") do |f|
|
||||
= button_to 'Delete Theme', delete_user_theme_path, data: { confirm: 'Are you sure?' }, tabindex: -1, method: :delete, class: 'btn btn-danger'
|
||||
= bootstrap_form_for(current_user.theme || Theme.new, url: { action: 'update_theme' }, html: { id: 'update_theme' }, method: 'patch') do |f|
|
||||
.card
|
||||
.card-body
|
||||
%h2 General
|
||||
|
|
Loading…
Reference in New Issue