From a84ba934cb02657f6c49f9bc84ad60da659d4837 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 24 May 2024 13:23:30 -0300 Subject: [PATCH] chore: haml-lint --- app/views/posts/_attributes.haml | 8 ++++---- app/views/posts/_attributes_nested.haml | 7 ++++--- app/views/posts/_form.haml | 3 +-- app/views/posts/_htmx_form.haml | 2 +- app/views/posts/attributes/_title.haml | 1 - app/views/posts/show.haml | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/app/views/posts/_attributes.haml b/app/views/posts/_attributes.haml index d3c205dc..03887866 100644 --- a/app/views/posts/_attributes.haml +++ b/app/views/posts/_attributes.haml @@ -11,7 +11,7 @@ - cache [metadata, I18n.locale] do = render("posts/attributes/#{type}", - base: base, post: post, attribute: attribute, - metadata: metadata, site: site, - dir: dir, locale: locale, - autofocus: (post.attributes.first == attribute)) + base: base, post: post, attribute: attribute, + metadata: metadata, site: site, + dir: dir, locale: locale, + autofocus: (post.attributes.first == attribute)) diff --git a/app/views/posts/_attributes_nested.haml b/app/views/posts/_attributes_nested.haml index 83bcc51c..5036b9c7 100644 --- a/app/views/posts/_attributes_nested.haml +++ b/app/views/posts/_attributes_nested.haml @@ -9,10 +9,11 @@ - next if attribute == :date - next if attribute == :draft - next if attribute == inverse + - metadata = post[attribute] - cache [post, metadata, I18n.locale] do = render "posts/attributes/#{metadata.type}", - base: base, post: post, attribute: attribute, - metadata: metadata, site: site, - dir: dir, locale: locale, autofocus: false + base: base, post: post, attribute: attribute, + metadata: metadata, site: site, + dir: dir, locale: locale, autofocus: false diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index c04f062f..8c006274 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -33,8 +33,7 @@ - dir = t("locales.#{@locale}.dir") -# Comienza el formulario -= form_tag url, method: method, class: 'form post ' + extra_class, multipart: true do - += form_tag url, method: method, class: "form post #{extra_class}", multipart: true do -# Botones de guardado = render 'posts/submit', site: site, post: post diff --git a/app/views/posts/_htmx_form.haml b/app/views/posts/_htmx_form.haml index 378278f7..a16e68dd 100644 --- a/app/views/posts/_htmx_form.haml +++ b/app/views/posts/_htmx_form.haml @@ -13,7 +13,7 @@ end options = { - id: base, + id: base, multipart: true, class: 'form post ', 'hx-swap': params.require(:swap), diff --git a/app/views/posts/attributes/_title.haml b/app/views/posts/attributes/_title.haml index d94afdbb..e69de29b 100644 --- a/app/views/posts/attributes/_title.haml +++ b/app/views/posts/attributes/_title.haml @@ -1 +0,0 @@ --# diff --git a/app/views/posts/show.haml b/app/views/posts/show.haml index f44e11ed..12db05a4 100644 --- a/app/views/posts/show.haml +++ b/app/views/posts/show.haml @@ -4,7 +4,7 @@ .col-md-8 %article.content.table-responsive-md = link_to t('posts.edit_post'), - edit_site_post_path(@site, @post.id), - class: 'btn btn-secondary btn-block' + edit_site_post_path(@site, @post.id), + class: 'btn btn-secondary btn-block' = render 'table', dir: dir, site: @site, locale: @locale, post: @post, title: t('.front_matter')