Skip to content

Commit

Permalink
Show element hint in element body
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Dec 11, 2023
1 parent f90cb58 commit 5bfa90f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/assets/stylesheets/alchemy/elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ alchemy-tinymce {
.element-body,
.element-footer,
.nestable-elements,
.message,
.nested-elements {
display: none;
}
Expand Down
4 changes: 4 additions & 0 deletions app/views/alchemy/admin/elements/_element.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

<%= render 'alchemy/admin/elements/toolbar', element: element %>

<% if element.has_hint? %>
<%= render_message(:hint, sanitize(element.hint)) %>
<% end %>

<% element.definition[:message].tap do |message| %>
<%= render_message(:info, sanitize(message)) if message %>
<% end %>
Expand Down
1 change: 0 additions & 1 deletion app/views/alchemy/admin/elements/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<%= sanitize(element.preview_text.presence || '&nbsp;') %>
</span>
</span>
<%= render_hint_for(element) %>
<%= button_tag({
title: Alchemy.t(element.folded? ? :show_element_content : :hide_element_content),
class: "element-toggle"
Expand Down

0 comments on commit 5bfa90f

Please sign in to comment.