Sha256: 50ffd2994f834295767feb690d2056e2854eb407819611b3a7578afc91eba047

Contents?: true

Size: 1.71 KB

Versions: 10

Compression:

Stored size: 1.71 KB

Contents

<% content_for :toolbar do %>
  <div class="toolbar_buttons">
    <%= render Alchemy::Admin::ToolbarButton.new(
      icon: :plus,
      label: Alchemy.t('New Tag'),
      url: alchemy.new_admin_tag_path,
      title: Alchemy.t('New Tag'),
      hotkey: 'alt+n',
      tooltip_placement: "top-start",
      dialog_options: {
        title: Alchemy.t('New Tag'),
        size: '310x180'
      },
      if_permitted_to: [:create, Alchemy::Tag]
    ) %>
  </div>
  <%= render 'alchemy/admin/partials/search_form' %>
<% end %>

<div id="archive_all" class="resources-table-wrapper">
  <%= render 'alchemy/admin/resources/table_header' %>
  <% if @tags.any? %>

    <%= render Alchemy::Admin::Resource::Table.new(@tags, query: @query, search_filter_params: search_filter_params) do |table| %>
      <% table.icon_column "tag" %>
      <% table.column :name, sortable: true %>
      <% table.column :taggings_types do |tag| %>
        <% tag.taggings.collect(&:taggable).compact.uniq(&:class).each do |taggable| %>
          <span class="label">
            <%= taggable.class.model_name.human %>
          </span>
        <% end %>
      <% end %>
      <% table.column :taggings_count, sortable: true, class_name: "count" %>

      <% table.delete_button tooltip: Alchemy.t(:delete_tag), confirm_message: Alchemy.t(:do_you_really_want_to_delete_this_tag?) %>
      <% table.edit_button tooltip: Alchemy.t(:edit_tag), dialog_size: "360x410" %>
    <% end %>

  <%= paginate @tags, theme: 'alchemy' %>

  <% else %>

  <%= render_message do %>
    <h2><%= Alchemy.t('No Tags found') %></h2>
    <% if search_filter_params[:q].blank? %>
      <p><%= Alchemy.t(:tags_get_created_if_used_the_first_time) %></p>
    <% end %>
  <% end %>

  <% end %>
</div>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-7.4.2 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.3.6 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.4.1 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.4.0 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.3.5 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.3.4 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.3.3 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.3.2 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.3.1 app/views/alchemy/admin/tags/index.html.erb
alchemy_cms-7.3.0 app/views/alchemy/admin/tags/index.html.erb