Some fixes for tags: authorization, translation…
can_use now takes all the open_for into account
This commit is contained in:
1 parent
d2602a3a84
commit
68a379f8a4
9 files changed
+30
-43
No files matched your search
@@ -16,14 +16,14 @@
|
||||
<div id="tags-list">
|
||||
<p class="tag-lead lead muted"><i class="icons-tag"></i> <%= t(:default) %> <span class="badge pull-right"><%= @tags.count %></span></p>
|
||||
<ul class="tags-groups checkbox-card default-tags">
|
||||
<%= render partial: "module_tag", collection: @tags %>
|
||||
<%= render partial: "tag", collection: @tags %>
|
||||
</ul>
|
||||
<% @module_apps.each do |module_app| %>
|
||||
<% tags = module_app.module_tags %>
|
||||
<% icon_name = get_module_app_icon(module_app) %>
|
||||
<p class="tag-lead lead muted"><i class="<%= icon_name %>"></i> <%= module_app.title %> <span class="badge pull-right"><%= tags.count %></span></p>
|
||||
<ul class="tags-groups checkbox-card module-tags">
|
||||
<%= render partial: "module_tag", collection: tags, locals: {in_module: true} %>
|
||||
<%= render partial: "tag", collection: tags, locals: {in_module: true} %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<li class="filter-item <%= module_tag.is_default ? 'default' : '' %>">
|
||||
<% unless defined?(in_module) && module_tag.is_default %>
|
||||
<p class="card pull-left">
|
||||
<input type="checkbox">
|
||||
</p>
|
||||
<%= hidden_field_tag "ids[]", module_tag.id, class: "tag_id" %>
|
||||
<% end %>
|
||||
<% if defined?(in_module) && module_tag.is_default %>
|
||||
<a>
|
||||
<span class="amount"><%= get_tagging_count(module_tag) %></span>
|
||||
<%= show_names_slash(module_tag) %>
|
||||
</a>
|
||||
<% else %>
|
||||
<%= link_to edit_admin_tag_path(module_tag), class: "open-slide" do %>
|
||||
<span class="amount"><%= get_tagging_count(module_tag) %></span>
|
||||
<%= show_names_slash(module_tag) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -0,0 +1,19 @@
|
||||
<li class="filter-item <%= tag.is_default ? 'default' : '' %>">
|
||||
<% unless defined?(in_module) && tag.is_default %>
|
||||
<p class="card pull-left">
|
||||
<input type="checkbox">
|
||||
</p>
|
||||
<%= hidden_field_tag "ids[]", tag.id, class: "tag_id" %>
|
||||
<% end %>
|
||||
<% if defined?(in_module) && tag.is_default %>
|
||||
<a>
|
||||
<span class="amount"><%= get_tagging_count(tag) %></span>
|
||||
<%= show_names_slash(tag) %>
|
||||
</a>
|
||||
<% else %>
|
||||
<%= link_to edit_admin_tag_path(tag), class: "open-slide", data: {title: t('editing.tag')} do %>
|
||||
<span class="amount"><%= get_tagging_count(tag) %></span>
|
||||
<%= show_names_slash(tag) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
Reference in new issue
Block a user