From 1b67605e097f56e9952c6474b813b7338c1ecaa4 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 27 Jan 2022 22:15:39 +0100 Subject: [PATCH] Fix HAML codestyle --- app/views/services/index.haml | 2 +- app/views/settings/_services.haml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/services/index.haml b/app/views/services/index.haml index 4bc25a21..0863d21d 100644 --- a/app/views/services/index.haml +++ b/app/views/services/index.haml @@ -1,4 +1,4 @@ -= render "settings/services" += render "settings/services", services: @services - provide(:title, generate_title(t(".title"))) - parent_layout "user/settings" diff --git a/app/views/settings/_services.haml b/app/views/settings/_services.haml index 82b3e0e7..37eaa3fb 100644 --- a/app/views/settings/_services.haml +++ b/app/views/settings/_services.haml @@ -1,14 +1,14 @@ .card .card-body - = t(".services", count: @services.count) + = t(".services", count: services.count) - - APP_CONFIG['sharing'].each do |service, service_options| - - if service_options['enabled'] && @services.none? { |x| x.provider == service.to_s } - %p= button_to t(".connect", service: service.capitalize), "/auth/#{service}", method: :post, class: 'btn btn-info' + - APP_CONFIG["sharing"].each do |service, service_options| + - if service_options["enabled"] && services.none? { |x| x.provider == service.to_s } + %p= button_to t(".connect", service: service.capitalize), "/auth/#{service}", method: :post, class: "btn btn-info" - - if @services.count.positive? + - if services.count.positive? %ul.list-group - - @services.each do |service| + - services.each do |service| %li.list-group-item %i{ class: "fa fa-#{service.provider}" } %strong= service.provider.capitalize @@ -17,10 +17,10 @@ service_path(service), data: { confirm: t(".confirm", service: service.provider.capitalize) }, method: :delete, - class: 'btn btn-link text-danger', - form: { class: 'd-inline' } + class: "btn btn-link text-danger", + form: { class: "d-inline" } .col-md-6.mt-2 = bootstrap_form_for(service, url: update_service_path(service)) do |f| = f.text_field :post_tag, label_as_placeholder: true, - append: f.submit(t("voc.update"), class: 'btn btn-primary'), maxlength: 20, pattern: "^[^@]*$" + append: f.submit(t("voc.update"), class: "btn btn-primary"), maxlength: 20, pattern: "^[^@]*$"