Skip to content

Commit

Permalink
Move the feedback link to the bottom of the page
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Nov 29, 2023
1 parent 9609689 commit ed2bcb5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<span class="max-w-xs text-xs text-right text-gray-600 hidden lg:block">
<%= t(".feedback_description") %>
</span>
<%= render component("ui/button").new(
tag: :a,
text: t(".give_feedback"),
href: "https://solidus.io/feedback?category=solidus-admin",
icon: "feedback-line",
scheme: :secondary,
target: :_blank,
) %>
<%= link_to(
"https://solidus.io/feedback?category=solidus-admin",
class: 'whitespace-nowrap flex flex-col items-center gap-2 text-gray-500 text-small hover:text-black',
target: '_blank',
) do %>

<span>
<%= render component("ui/badge").new(name: "beta", size: :s, color: :blue) %>
<span class="underline"><%= t(".give_feedback") %></span>
</span>

<span class="body-small text-center">
<%= t(".feedback_description_html") %>
</span>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Use the translation in the example in your template with `t(".hello")`.
en:
give_feedback: 'Give feedback'
feedback_description: 'We are constantly trying to improve. Please let us know what you think about this admin page.'
feedback_description_html: 'We are constantly trying to improve. <br>Please let us know what you think about this admin page.'
4 changes: 2 additions & 2 deletions admin/app/components/solidus_admin/layout/page_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

module SolidusAdmin::Layout::PageHelpers
def page(**attrs, &block)
tag.div(capture(&block), class: "px-4 relative", "data-controller": stimulus_id, **attrs)
tag.div(capture(&block), class: "px-4 relative", "data-controller": stimulus_id, **attrs) +
tag.div(render(component("layout/feedback").new), class: "flex justify-center py-10")
end

def page_header_actions(&block)
tag.div(safe_join([
render(component("layout/feedback").new),
capture(&block),
]), class: "flex gap-2 items-center")
end
Expand Down

0 comments on commit ed2bcb5

Please sign in to comment.