Sha256: db31c4e8a6354cb0217e53c48c619877f9f71bd65fdd7b86410daf9781600801

Contents?: true

Size: 1.59 KB

Versions: 1

Compression:

Stored size: 1.59 KB

Contents

<div class="relative posts__post_reactions_submenu">
  <% user_reaction = post.reactions.find_by(author: current_user) %>
  <% data_icon = user_reaction ? "data-reaction=\"#{user_reaction.reaction_type.name}\"" : 'data-reaction=""' %>
  <button type="button" aria-expanded="false" aria-haspopup="true" aria-controls="<%= dom_id(post) %>_posts__post_reactions_submenu" id="<%= dom_id(post) %>_posts__post_reactions_submenuButton" class="openButton flex gap-1 items-center text-xl" <%=data_icon%> aria-live="polite">
    <span class="text-sm"><%= t("decidim.endorsement_buttons_cell.already_endorsed") %></span>
    <span class="reaction_icon text-black"><%= icon('heart-add-line', class: 'text-black') %></span>
  </button>
  <ul id="<%= dom_id(post) %>_posts__post_reactions_submenu" role="menu" aria-orientation="vertical" aria-labelledby="<%= dom_id(post) %>_posts__post_reactions_submenuButton" class="absolute left-[60px] -top-[40px] p-2 flex gap-2 bg-white rounded-md shadow-feedMenu overflow-hidden hidden" aria-label="<%= t("decidim.components.posts.reactions.title") %>">
    <% reaction_types.each do |reaction_type| %>
      <li role="menuitem">
        <a href="#" class="reaction_btn block text-xl w-[24px] h-[24px]" data-reaction="<%= reaction_type.name %>" data-reaction-id="<%= reaction_type.id %>" data-reaction-url="<%= reactions_path %>" data-reactionable-id="<%= post.to_global_id.to_s %>">
          <%= reaction_icon(reaction_type.icon_name) %>
          <span class="sr-only"><%= t("decidim.components.posts.reactions.#{reaction_type.name}") %></span>
        </a>
      </li>
    <% end %>
  </ul>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
decidim-posts-1.0.0 app/cells/decidim/posts/reaction_menu/show.erb