From c4959ae548ca0f0134da6c89a82c1f8c4c406c57 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 21 Oct 2023 00:27:58 +0200 Subject: [PATCH] Remove obsolete question-related partials --- app/views/answerbox/_header.html.haml | 26 ------------------------- app/views/question/_question.html.haml | 27 -------------------------- 2 files changed, 53 deletions(-) delete mode 100644 app/views/answerbox/_header.html.haml delete mode 100644 app/views/question/_question.html.haml diff --git a/app/views/answerbox/_header.html.haml b/app/views/answerbox/_header.html.haml deleted file mode 100644 index 37f5b406..00000000 --- a/app/views/answerbox/_header.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -.card-header - .d-flex - - unless a.question.author_is_anonymous - .flex-shrink-0 - %a{ href: user_path(a.question.user) } - = render AvatarComponent.new(user: a.question.user, size: "md", classes: ["answerbox__question-user-avatar"]) - .flex-grow-1 - %h6.text-muted.answerbox__question-user - - if a.question.author_is_anonymous - %i.fas.fa-user-secret{ title: t(".anon_hint") } - = t(".asked_html", user: user_screen_name(a.question.user, context_user: a.user, author_identifier: a.question.author_is_anonymous ? a.question.author_identifier: nil), time: time_tooltip(a.question)) - - if !a.question.author_is_anonymous && !a.question.direct - ยท - %a{ href: question_path(a.question.user.screen_name, a.question.id), data: { selection_hotkey: "a" } } - = t(".answers", count: a.question.answer_count) - .answerbox__question-body{ data: { controller: a.question.long? ? "collapse" : nil } } - .answerbox__question-text{ class: a.question.long? && !display_all ? "collapsed" : "", data: { collapse_target: "content" } } - = question_markdown a.question.content - - if a.question.long? && !display_all - = render "shared/collapse", type: "question" - - if user_signed_in? - .flex-shrink-0.ms-auto - .btn-group - %button.btn.btn-link.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } } - %span.caret - = render "actions/question", question: a.question diff --git a/app/views/question/_question.html.haml b/app/views/question/_question.html.haml deleted file mode 100644 index c25594f0..00000000 --- a/app/views/question/_question.html.haml +++ /dev/null @@ -1,27 +0,0 @@ -.card.question--fixed{ class: hidden ? 'question--hidden' : '', tabindex: hidden ? -1 : '', aria: { hidden: hidden } } - .container - .card-body - .d-flex - - unless question.author_is_anonymous - .flex-shrink-0 - %a{ href: unless hidden then user_path(question.user) end } - = render AvatarComponent.new(user: question.user, size: "md", classes: ["answerbox__question-user-avatar"]) - .flex-grow-1 - %h6.text-muted.answerbox__question-user - - identifier = question.author_is_anonymous ? question.author_identifier : nil - - if hidden - = user_screen_name question.user, author_identifier: identifier, url: false - - else - = t("answerbox.header.asked_html", user: user_screen_name(question.user, author_identifier: identifier), time: time_tooltip(question)) - .answerbox__question-body{ data: { controller: question.long? ? "collapse" : nil } } - .answerbox__question-text{ class: question.long? ? "collapsed" : "", data: { collapse_target: "content" } } - = question_markdown question.content - - if question.long? - = render "shared/collapse", type: "question" - - if user_signed_in? - .flex-shrink-0.ms-auto - .btn-group - %button.btn.btn-link.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } } - %span.caret - - unless hidden - = render "actions/question", question: question