From 66b2afc97673eb14a959c29948d5849b77f0e4fc Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 10 May 2020 22:27:39 +0200 Subject: [PATCH] Turn single-word strings into symbols --- app/views/devise/passwords/edit.haml | 4 ++-- app/views/devise/registrations/new.haml | 4 ++-- app/views/devise/sessions/new.haml | 2 +- app/views/discover/_tab_answers.haml | 2 +- app/views/discover/_tab_asked.haml | 2 +- app/views/discover/_tab_discussed.haml | 2 +- app/views/discover/_tab_most.haml | 2 +- app/views/discover/_tab_new.haml | 2 +- app/views/discover/_tab_questions.haml | 2 +- app/views/discover/index.haml | 20 +++++++++---------- app/views/inbox/_sidebar.haml | 2 +- app/views/layouts/_messages.haml | 2 +- app/views/modal/_ask.haml | 2 +- app/views/modal/_ban.haml | 2 +- app/views/modal/_group.haml | 12 +++++------ app/views/modal/_password.haml | 2 +- app/views/modal/group/_item.haml | 2 +- app/views/modal/privileges/_item.haml | 2 +- app/views/moderation/_moderationbox.haml | 4 ++-- app/views/navigation/_guest.haml | 2 +- app/views/navigation/_main.haml | 2 +- app/views/navigation/_moderation.haml | 2 +- app/views/navigation/_notification.haml | 2 +- app/views/question/_question.haml | 2 +- app/views/settings/_account.haml | 4 ++-- app/views/settings/_export.haml | 2 +- app/views/settings/_privacy.haml | 2 +- app/views/settings/_profile.haml | 2 +- app/views/settings/_theme.haml | 2 +- app/views/shared/_announcements.haml | 4 ++-- .../shared/_cursored_pagination_dummy.haml | 2 +- app/views/tabs/_feed.haml | 2 +- 32 files changed, 51 insertions(+), 51 deletions(-) diff --git a/app/views/devise/passwords/edit.haml b/app/views/devise/passwords/edit.haml index 07bf9426..1ad2365f 100644 --- a/app/views/devise/passwords/edit.haml +++ b/app/views/devise/passwords/edit.haml @@ -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' diff --git a/app/views/devise/registrations/new.haml b/app/views/devise/registrations/new.haml index 5fe63ce9..cbbafe39 100644 --- a/app/views/devise/registrations/new.haml +++ b/app/views/devise/registrations/new.haml @@ -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' diff --git a/app/views/devise/sessions/new.haml b/app/views/devise/sessions/new.haml index d4dab089..144a5323 100644 --- a/app/views/devise/sessions/new.haml +++ b/app/views/devise/sessions/new.haml @@ -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 diff --git a/app/views/discover/_tab_answers.haml b/app/views/discover/_tab_answers.haml index c09f4ce5..5037483c 100644 --- a/app/views/discover/_tab_answers.haml +++ b/app/views/discover/_tab_answers.haml @@ -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 diff --git a/app/views/discover/_tab_asked.haml b/app/views/discover/_tab_asked.haml index 1728145a..0927fd85 100644 --- a/app/views/discover/_tab_asked.haml +++ b/app/views/discover/_tab_asked.haml @@ -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 diff --git a/app/views/discover/_tab_discussed.haml b/app/views/discover/_tab_discussed.haml index cc06cc81..7b853232 100644 --- a/app/views/discover/_tab_discussed.haml +++ b/app/views/discover/_tab_discussed.haml @@ -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 diff --git a/app/views/discover/_tab_most.haml b/app/views/discover/_tab_most.haml index 4824abfd..31d4a356 100644 --- a/app/views/discover/_tab_most.haml +++ b/app/views/discover/_tab_most.haml @@ -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 diff --git a/app/views/discover/_tab_new.haml b/app/views/discover/_tab_new.haml index 604fa14f..99ceb4e2 100644 --- a/app/views/discover/_tab_new.haml +++ b/app/views/discover/_tab_new.haml @@ -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' diff --git a/app/views/discover/_tab_questions.haml b/app/views/discover/_tab_questions.haml index f515943e..4841eb45 100644 --- a/app/views/discover/_tab_questions.haml +++ b/app/views/discover/_tab_questions.haml @@ -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' diff --git a/app/views/discover/index.haml b/app/views/discover/index.haml index fd5183c3..52322fc5 100644 --- a/app/views/discover/index.haml +++ b/app/views/discover/index.haml @@ -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 diff --git a/app/views/inbox/_sidebar.haml b/app/views/inbox/_sidebar.haml index 230ac511..c14f2272 100644 --- a/app/views/inbox/_sidebar.haml +++ b/app/views/inbox/_sidebar.haml @@ -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' diff --git a/app/views/layouts/_messages.haml b/app/views/layouts/_messages.haml index e927a95c..759449c1 100644 --- a/app/views/layouts/_messages.haml +++ b/app/views/layouts/_messages.haml @@ -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' diff --git a/app/views/modal/_ask.haml b/app/views/modal/_ask.haml index e94ff193..c99b4a6b 100644 --- a/app/views/modal/_ask.haml +++ b/app/views/modal/_ask.haml @@ -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| diff --git a/app/views/modal/_ban.haml b/app/views/modal/_ban.haml index 8c5f48a1..8720d03b 100644 --- a/app/views/modal/_ban.haml +++ b/app/views/modal/_ban.haml @@ -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? diff --git a/app/views/modal/_group.haml b/app/views/modal/_group.haml index 56cd147d..6ad41b08 100644 --- a/app/views/modal/_group.haml +++ b/app/views/modal/_group.haml @@ -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') diff --git a/app/views/modal/_password.haml b/app/views/modal/_password.haml index 1cb49e76..e6fc37c4 100644 --- a/app/views/modal/_password.haml +++ b/app/views/modal/_password.haml @@ -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 diff --git a/app/views/modal/group/_item.haml b/app/views/modal/group/_item.haml index 2f33d66f..fd525549 100644 --- a/app/views/modal/group/_item.haml +++ b/app/views/modal/group/_item.haml @@ -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 diff --git a/app/views/modal/privileges/_item.haml b/app/views/modal/privileges/_item.haml index 6a3d68d9..dde51929 100644 --- a/app/views/modal/privileges/_item.haml +++ b/app/views/modal/privileges/_item.haml @@ -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? diff --git a/app/views/moderation/_moderationbox.haml b/app/views/moderation/_moderationbox.haml index 21eb0aa5..b7c623af 100644 --- a/app/views/moderation/_moderationbox.haml +++ b/app/views/moderation/_moderationbox.haml @@ -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 } } diff --git a/app/views/navigation/_guest.haml b/app/views/navigation/_guest.haml index a15899c2..2c9cd80d 100644 --- a/app/views/navigation/_guest.haml +++ b/app/views/navigation/_guest.haml @@ -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 } diff --git a/app/views/navigation/_main.haml b/app/views/navigation/_main.haml index 9b71da82..04c93eab 100644 --- a/app/views/navigation/_main.haml +++ b/app/views/navigation/_main.haml @@ -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 } diff --git a/app/views/navigation/_moderation.haml b/app/views/navigation/_moderation.haml index 1dddb1bc..8a70ef05 100644 --- a/app/views/navigation/_moderation.haml +++ b/app/views/navigation/_moderation.haml @@ -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 diff --git a/app/views/navigation/_notification.haml b/app/views/navigation/_notification.haml index a1352411..a7456422 100644 --- a/app/views/navigation/_notification.haml +++ b/app/views/navigation/_notification.haml @@ -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 diff --git a/app/views/question/_question.haml b/app/views/question/_question.haml index 8f9a28c7..c7844a16 100644 --- a/app/views/question/_question.haml +++ b/app/views/question/_question.haml @@ -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 diff --git a/app/views/settings/_account.haml b/app/views/settings/_account.haml index 0b0dd7ae..e1fea70f 100644 --- a/app/views/settings/_account.haml +++ b/app/views/settings/_account.haml @@ -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' diff --git a/app/views/settings/_export.haml b/app/views/settings/_export.haml index 90ee4fd3..85704a9d 100644 --- a/app/views/settings/_export.haml +++ b/app/views/settings/_export.haml @@ -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 diff --git a/app/views/settings/_privacy.haml b/app/views/settings/_privacy.haml index ca7bb9e2..7e660c66 100644 --- a/app/views/settings/_privacy.haml +++ b/app/views/settings/_privacy.haml @@ -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') diff --git a/app/views/settings/_profile.haml b/app/views/settings/_profile.haml index b3c37c28..f62a7f0c 100644 --- a/app/views/settings/_profile.haml +++ b/app/views/settings/_profile.haml @@ -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') diff --git a/app/views/settings/_theme.haml b/app/views/settings/_theme.haml index 7debd0fa..50ea4918 100644 --- a/app/views/settings/_theme.haml +++ b/app/views/settings/_theme.haml @@ -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 diff --git a/app/views/shared/_announcements.haml b/app/views/shared/_announcements.haml index 0088f830..8a3445f5 100644 --- a/app/views/shared/_announcements.haml +++ b/app/views/shared/_announcements.haml @@ -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? diff --git a/app/views/shared/_cursored_pagination_dummy.haml b/app/views/shared/_cursored_pagination_dummy.haml index d9949ea8..5f0571e8 100644 --- a/app/views/shared/_cursored_pagination_dummy.haml +++ b/app/views/shared/_cursored_pagination_dummy.haml @@ -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 diff --git a/app/views/tabs/_feed.haml b/app/views/tabs/_feed.haml index c4fd6afd..cf5a4a7e 100644 --- a/app/views/tabs/_feed.haml +++ b/app/views/tabs/_feed.haml @@ -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