mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:29:52 +01:00
Turn single-word strings into symbols
This commit is contained in:
parent
498d31ecd6
commit
66b2afc976
32 changed files with 51 additions and 51 deletions
|
@ -10,8 +10,8 @@
|
|||
|
||||
= f.hidden_field :reset_password_token
|
||||
|
||||
= f.password_field :password, autofocus: true, autocomplete: 'off', label: 'New password'
|
||||
= f.password_field :password_confirmation, autocomplete: 'off', label: 'Confirm new password'
|
||||
= f.password_field :password, autofocus: true, autocomplete: :off, label: 'New password'
|
||||
= f.password_field :password_confirmation, autocomplete: :off, label: 'Confirm new password'
|
||||
|
||||
= f.submit 'Change my password'
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
= f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
|
||||
= f.email_field :email, autofocus: false, label: t('views.settings.account.email')
|
||||
|
||||
= f.password_field :password, autocomplete: 'off', label: t('views.settings.account.password')
|
||||
= 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')
|
||||
= f.password_field :password_confirmation, autocomplete: :off, label: t('views.settings.account.password_confirm')
|
||||
|
||||
%p= raw t('views.sessions.info', terms: link_to(t('views.general.terms'), terms_path))
|
||||
= f.submit 'Sign up', class: 'btn btn-primary mb-3'
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
||||
|
||||
= f.text_field :login, autofocus: true, label: t('views.settings.account.username')
|
||||
= f.password_field :password, autocomplete: 'off', label: t('views.settings.account.password')
|
||||
= f.password_field :password, autocomplete: :off, label: t('views.settings.account.password')
|
||||
|
||||
- if devise_mapping.rememberable?
|
||||
= f.check_box :remember_me
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.tab-pane.active.fade.show{ role: 'tabpanel', id: 'answers' }
|
||||
.tab-pane.active.fade.show{ role: :tabpanel, id: 'answers' }
|
||||
- answers.each do |a|
|
||||
= render 'answerbox', a: a
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.tab-pane.fade{ role: 'tabpanel', id: 'asked' }
|
||||
.tab-pane.fade{ role: :tabpanel, id: 'asked' }
|
||||
- asked.each do |user|
|
||||
= render 'discover/userbox', u: user.user, type: 'asked', q: user.question_count
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.tab-pane.fade{ role: 'tabpanel', id: 'comments' }
|
||||
.tab-pane.fade{ role: :tabpanel, id: 'comments' }
|
||||
- comments.each do |a|
|
||||
= render 'answerbox', a: a
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.tab-pane.fade{ role: 'tabpanel', id: 'answered' }
|
||||
.tab-pane.fade{ role: :tabpanel, id: 'answered' }
|
||||
- answered.each do |user|
|
||||
= render 'discover/userbox', u: user.user, type: 'most', a: user.answer_count
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.tab-pane.active.fade.show{ role: 'tabpanel', id: 'new' }
|
||||
.tab-pane.active.fade.show{ role: :tabpanel, id: 'new' }
|
||||
- new.each do |user|
|
||||
= render 'discover/userbox', u: user, type: 'new'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
.tab-pane.fade{ role: 'tabpanel', id: 'questions' }
|
||||
.tab-pane.fade{ role: :tabpanel, id: 'questions' }
|
||||
- questions.each do |q|
|
||||
= render 'shared/question', q: q, type: 'discover'
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
.col-md-7.col-sm-6
|
||||
%h2= t 'views.discover.content.title'
|
||||
%p= t 'views.discover.content.desc'
|
||||
%div{ role: 'tabpanel' }
|
||||
%ul.nav.nav-tabs{ role: 'tablist' }
|
||||
%div{ role: :tabpanel }
|
||||
%ul.nav.nav-tabs{ role: :tablist }
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link.active{ href: '#answers', role: 'tab', aria: { controls: 'answers' }, data: { toggle: 'tab' } }= t 'views.discover.content.tab.answers'
|
||||
%a.nav-link.active{ href: '#answers', role: :tab, aria: { controls: 'answers' }, data: { toggle: :tab } }= t 'views.discover.content.tab.answers'
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link{ href: '#questions', role: 'tab', aria: { controls: 'questions' }, data: { toggle: 'tab' } }= t 'views.discover.content.tab.questions'
|
||||
%a.nav-link{ href: '#questions', role: :tab, aria: { controls: 'questions' }, data: { toggle: :tab } }= t 'views.discover.content.tab.questions'
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link{ href: '#comments', role: 'tab', aria: { controls: 'comments' }, data: { toggle: 'tab' } }= t 'views.discover.content.tab.comments'
|
||||
%a.nav-link{ href: '#comments', role: :tab, aria: { controls: 'comments' }, data: { toggle: :tab } }= t 'views.discover.content.tab.comments'
|
||||
.tab-content.mt-3
|
||||
= render 'discover/tab_answers', answers: @popular_answers
|
||||
= render 'discover/tab_questions', questions: @popular_questions
|
||||
|
@ -25,14 +25,14 @@
|
|||
.col-md-5.col-sm-6
|
||||
%h2= t 'views.discover.people.title'
|
||||
%p= t 'views.discover.people.desc'
|
||||
%div{ role: 'tabpanel' }
|
||||
%ul.nav.nav-tabs{ role: 'tablist' }
|
||||
%div{ role: :tabpanel }
|
||||
%ul.nav.nav-tabs{ role: :tablist }
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link.active{ href: '#new', role: 'tab', aria: { controls: 'new' }, data: { toggle: 'tab' } }= t 'views.discover.people.tab.new'
|
||||
%a.nav-link.active{ href: '#new', role: :tab, aria: { controls: 'new' }, data: { toggle: :tab } }= t 'views.discover.people.tab.new'
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link{ href: '#asked', role: 'tab', aria: { controls: 'asked' }, data: { toggle: 'tab' } }= t 'views.discover.people.tab.questions'
|
||||
%a.nav-link{ href: '#asked', role: :tab, aria: { controls: 'asked' }, data: { toggle: :tab } }= t 'views.discover.people.tab.questions'
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link{ href: '#answered', role: 'tab', aria: { controls: 'answered' }, data: { toggle: 'tab' } }= t 'views.discover.people.tab.answers'
|
||||
%a.nav-link{ href: '#answered', role: :tab, aria: { controls: 'answered' }, data: { toggle: :tab } }= t 'views.discover.people.tab.answers'
|
||||
.tab-content.mt-3
|
||||
= render 'discover/tab_new', new: @new_users
|
||||
= render 'discover/tab_asked', asked: @users_with_most_questions
|
||||
|
|
|
@ -23,5 +23,5 @@
|
|||
.card
|
||||
.card-header= t 'views.inbox.sidebar.actions.title'
|
||||
.card-body
|
||||
%button.btn.btn-block.btn-danger{ type: :button, id: delete_id, disabled: (disabled ? 'disabled' : nil), data: { ib_count: inbox_count } }
|
||||
%button.btn.btn-block.btn-danger{ type: :button, id: delete_id, disabled: (disabled ? :disabled : nil), data: { ib_count: inbox_count } }
|
||||
= t 'views.inbox.sidebar.actions.button'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
= t 'messages.noscript'
|
||||
|
||||
- flash.each do |key, value|
|
||||
.alert.alert-dismissible{ class: "alert-#{bootstrap_color key}", role: 'alert' }
|
||||
.alert.alert-dismissible{ class: "alert-#{bootstrap_color key}", role: :alert }
|
||||
%button.close{ type: :button, data: { dismiss: :alert } }
|
||||
%span{ aria: { hidden: true } } ×
|
||||
%span.sr-only= t 'views.actions.close'
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- if current_user.groups.count.positive?
|
||||
%label
|
||||
= t 'views.modal.ask.choose'
|
||||
%select.form-control{ name: 'qb-all-rcpt', autocomplete: 'off' }
|
||||
%select.form-control{ name: 'qb-all-rcpt', autocomplete: :off }
|
||||
%option{ value: 'followers', selected: true }= t('views.general.follower').pluralize(2)
|
||||
%optgroup{ label: t('views.group.title').pluralize(2) }
|
||||
- current_user.groups.each do |group|
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
%button.close{ data: { dismiss: :modal }, type: :button }
|
||||
%span{ aria: { hidden: true } } ×
|
||||
%span.sr-only Close
|
||||
= bootstrap_form_tag(url: '/mod/ban', html: { method: :post, novalidate: 'novalidate' }) do |f|
|
||||
= bootstrap_form_tag(url: '/mod/ban', html: { method: :post, novalidate: :novalidate }) do |f|
|
||||
= f.hidden_field :user, value: user.screen_name
|
||||
.modal-body#ban-control-super
|
||||
= f.check_box :ban, label: t('views.modal.bancontrol.ban'), checked: user.banned?
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
%button.close{ data: { dismiss: :modal }, type: :button }
|
||||
%span{ aria: { hidden: true } } ×
|
||||
%span.sr-only= t 'views.actions.close'
|
||||
%div{ role: 'tabpanel' }
|
||||
%ul.nav.nav-tabs.mt-1{ role: 'tablist' }
|
||||
%div{ role: :tabpanel }
|
||||
%ul.nav.nav-tabs.mt-1{ role: :tablist }
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link.active{ href: '#grouplist', aria: { controls: 'grouplist' }, data: { toggle: 'tab' }, role: 'tab' }
|
||||
%a.nav-link.active{ href: '#grouplist', aria: { controls: 'grouplist' }, data: { toggle: :tab }, role: :tab }
|
||||
= t 'views.modal.group.tabs.main'
|
||||
%li.nav-item{ role: 'presentation' }
|
||||
%a.nav-link{ href: '#create', aria: { controls: 'create' }, data: { toggle: 'tab' }, role: 'tab' }
|
||||
%a.nav-link{ href: '#create', aria: { controls: 'create' }, data: { toggle: :tab }, role: :tab }
|
||||
= t 'views.modal.group.tabs.create'
|
||||
|
||||
.tab-content
|
||||
.tab-pane.active{ role: 'tabpanel', id: 'grouplist' }
|
||||
.tab-pane.active{ role: :tabpanel, id: 'grouplist' }
|
||||
%ul.list-group
|
||||
- current_user.groups.each do |group|
|
||||
= render 'modal/group/item', group: group, user: user
|
||||
.tab-pane{ role: 'tabpanel', id: 'create' }
|
||||
.tab-pane{ role: :tabpanel, id: 'create' }
|
||||
.modal-body
|
||||
%input.form-control#new-group-name{ type: :text, placeholder: t('views.modal.group.name') }
|
||||
%button.btn.btn-primary#create-group{ type: :button, data: { user: user.screen_name } }= t('views.modal.group.create')
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
%span.sr-only= t 'views.actions.close'
|
||||
.modal-body
|
||||
= f.password_field :current_password,
|
||||
autocomplete: 'off',
|
||||
autocomplete: :off,
|
||||
label: t('views.settings.account.password_current'),
|
||||
help: t('views.settings.account.password_current_help')
|
||||
.modal-footer
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
%input.custom-control-input{ type: :checkbox,
|
||||
id: "groupCheck#{group.id}",
|
||||
name: 'gm-group-check',
|
||||
data: { group: group.name, user: user.screen_name }, checked: user.member_of?(group), autocomplete: 'off' }
|
||||
data: { group: group.name, user: user.screen_name }, checked: user.member_of?(group), autocomplete: :off }
|
||||
%label.custom-control-label{ for: "groupCheck#{group.id}" }
|
||||
.media-body
|
||||
.list-group-item-heading= group.display_name
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
%li.list-group-item{ id: "privilege-#{privilege}" }
|
||||
.media
|
||||
.pull-left
|
||||
%input{ type: :checkbox, name: 'check-your-privileges', data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: 'off' }
|
||||
%input{ type: :checkbox, name: 'check-your-privileges', data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: :off }
|
||||
.media-body
|
||||
.list-group-item-heading= privilege.capitalize
|
||||
- unless description.blank?
|
||||
|
|
|
@ -38,12 +38,12 @@
|
|||
.btn-group
|
||||
%button.btn.btn-success.btn-sm{ type: :button,
|
||||
name: 'mod-vote',
|
||||
disabled: current_user.report_x_voted?(report, true) ? 'disabled' : nil,
|
||||
disabled: current_user.report_x_voted?(report, true) ? :disabled : nil,
|
||||
data: { id: report.id, action: current_user.report_voted?(report) ? 'unvote' : 'vote', vote_type: 'upvote' } }
|
||||
%i.fa.fa-thumbs-up
|
||||
%button.btn.btn-danger.btn-sm{ type: :button,
|
||||
name: 'mod-vote',
|
||||
disabled: current_user.report_x_voted?(report, false) ? 'disabled' : nil,
|
||||
disabled: current_user.report_x_voted?(report, false) ? :disabled : nil,
|
||||
data: { id: report.id, action: current_user.report_voted?(report) ? 'unvote' : 'vote', vote_type: 'downvote' } }
|
||||
%i.fa.fa-thumbs-down
|
||||
%button.btn.btn-primary.btn-sm{ type: :button, name: 'mod-comments', data: { id: report.id, state: :hidden } }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%nav.navbar.navbar-dark.navbar-expand-lg.bg-primary.fixed-top{ role: 'navigation' }
|
||||
%nav.navbar.navbar-dark.navbar-expand-lg.bg-primary.fixed-top{ role: :navigation }
|
||||
.container{ class: ios_web_app? ? 'ios-web-app' : '' }
|
||||
%a.navbar-brand{ href: '/' }= APP_CONFIG['site_name']
|
||||
%button.navbar-toggler{ data: { target: '#j2-main-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%nav.navbar.navbar-themed.navbar-expand-lg.bg-primary.fixed-top{ role: 'navigation' }
|
||||
%nav.navbar.navbar-themed.navbar-expand-lg.bg-primary.fixed-top{ role: :navigation }
|
||||
.container{ class: ios_web_app? ? 'ios-web-app' : '' }
|
||||
%a.navbar-brand{ href: '/' }= APP_CONFIG['site_name']
|
||||
%button.navbar-toggler{ data: { target: '#j2-main-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%nav.navbar.navbar-light.bg-light.navbar-static-top.j2-navbar.d-flex.d-sm-none{ role: 'navigation' }
|
||||
%nav.navbar.navbar-light.bg-light.navbar-static-top.j2-navbar.d-flex.d-sm-none{ role: :navigation }
|
||||
%a.navbar-brand{ href: moderation_path } Moderation
|
||||
%button.navbar-toggler{ data: { target: '#j2-tl-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
%span.sr-only Toggle navigation
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
%nav.navbar.navbar-light.bg-white.navbar-static-top.d-flex.d-sm-none{ role: 'navigation' }
|
||||
%nav.navbar.navbar-light.bg-white.navbar-static-top.d-flex.d-sm-none{ role: :navigation }
|
||||
%a.navbar-brand{ href: notifications_path } Notifications
|
||||
%button.navbar-toggler{ data: { target: '#j2-tl-navbar-collapse', toggle: :collapse }, type: :button }
|
||||
%span.sr-only Toggle navigation
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.card.question--fixed{ class: if hidden then 'question--hidden' end, tabindex: hidden ? '-1' : '', aria: { hidden: hidden } }
|
||||
.card.question--fixed{ class: hidden ? 'question--hidden' : '', tabindex: hidden ? -1 : '', aria: { hidden: hidden } }
|
||||
.container
|
||||
.card-body
|
||||
.media
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
- 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', toggle: :modal, type: :button } }
|
||||
= t 'views.actions.save'
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
will take a while, so please be patient. You will receive a question once exporting
|
||||
is done.
|
||||
- if current_user.can_export?
|
||||
%form{ action: begin_user_export_path, method: 'POST' }
|
||||
%form{ action: begin_user_export_path, method: :post }
|
||||
%p.text-center
|
||||
%button.btn.btn-lg.btn-primary#export-btn{ type: :submit } Export
|
||||
= hidden_field_tag :authenticity_token, form_authenticity_token
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- 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|
|
||||
= 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
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
- @active_announcements.each do |announcement|
|
||||
.alert.announcement.alert-info.alert-dismissable.d-none{ data: { 'announcement-id': announcement.id } }
|
||||
.container
|
||||
%button.close{ type: 'button', 'data-dismiss' => 'alert' }
|
||||
%span{ 'aria-hidden' => 'true' } ×
|
||||
%button.close{ type: :button, data: { dismiss: :alert } }
|
||||
%span{ aria: { hidden: true} } ×
|
||||
%p
|
||||
= announcement.content
|
||||
- if announcement.link_present?
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
- permitted_params ||= []
|
||||
#pagination
|
||||
%ul.pagination
|
||||
%li.next{ class: more_data_available ? nil : 'disabled' }
|
||||
%li.next{ class: more_data_available ? nil : :disabled }
|
||||
- if more_data_available
|
||||
%a{ rel: :next, href: url_for(params.permit(*permitted_params).merge(last_id: last_id)) }
|
||||
Next page
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- if APP_CONFIG.dig(:features, :public, :enabled)
|
||||
= list_group_item t('views.general.public'), public_timeline_path
|
||||
.list-group-item.list-group-item-action.dropdown{ class: group ? 'active' : '' }
|
||||
%a.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown' }, aria: { haspopup: true, expanded: false } }
|
||||
%a.dropdown-toggle{ type: :button, data: { toggle: :dropdown }, aria: { haspopup: true, expanded: false } }
|
||||
- if group
|
||||
= group.display_name
|
||||
- else
|
||||
|
|
Loading…
Reference in a new issue