2015-07-08 10:11:25 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<%= feed.title %>
|
|
|
|
<div class="quick-edit">
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<% if can_edit_or_delete?(feed) %>
|
|
|
|
<li><a href="#" class="edit-feed" data-feed-id="<%= feed.id.to_s %>"><%= t(:edit) %></a></li>
|
|
|
|
<li><a href="/admin/announcement/deletefeed?id=<%= feed.id.to_s %>" class="delete-feed text-error" ><%= t(:delete_) %></a></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="tags">
|
|
|
|
<div id="tags-list">
|
|
|
|
<ul class="tags-groups checkbox-card module-tags">
|
2015-09-16 06:03:33 +00:00
|
|
|
<% tags_to_remove = [] %>
|
2015-07-08 10:11:25 +00:00
|
|
|
<% feed.tag_ids.each do |t| %>
|
2015-09-16 06:03:33 +00:00
|
|
|
<% tag = Tag.find(t) rescue nil %>
|
|
|
|
<% if !tag.nil? %>
|
|
|
|
<li class="filter-item module">
|
|
|
|
<a href="#" onclick="return false;">
|
|
|
|
<% @site_in_use_locales.each_with_index do |locale,index| %>
|
|
|
|
<span class="tag"><%= tag.name_translations[locale] %></span>
|
|
|
|
<% if index < (@site_in_use_locales.count - 1) %>
|
|
|
|
/
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% else %>
|
|
|
|
<% tags_to_remove << t %>
|
|
|
|
<% end %>
|
2015-07-08 10:11:25 +00:00
|
|
|
<% end %>
|
2015-09-16 06:03:33 +00:00
|
|
|
<% if !tags_to_remove.blank?
|
|
|
|
tags_to_remove.each do |t|
|
|
|
|
feed.tag_ids.delete(t)
|
|
|
|
end
|
|
|
|
feed.save
|
|
|
|
end %>
|
2015-07-08 10:11:25 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
2021-06-02 10:06:27 +00:00
|
|
|
<td>
|
|
|
|
<div class="categories">
|
|
|
|
<div id="categories-list">
|
|
|
|
<ul class="tags-groups checkbox-card module-categories">
|
|
|
|
<% categories_to_remove = [] %>
|
|
|
|
<% feed.category_ids.each do |c| %>
|
|
|
|
<% category = Category.find(c) rescue nil %>
|
|
|
|
<% if !category.nil? %>
|
|
|
|
<li class="filter-item module">
|
|
|
|
<a href="#" onclick="return false;">
|
|
|
|
<% @site_in_use_locales.each_with_index do |locale,index| %>
|
|
|
|
<span class="tag"><%= category.title_translations[locale] %></span>
|
|
|
|
<% if index < (@site_in_use_locales.count - 1) %>
|
|
|
|
/
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% else %>
|
|
|
|
<% categories_to_remove << c %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if !categories_to_remove.blank?
|
|
|
|
categories_to_remove.each do |c|
|
|
|
|
feed.category_ids.delete(c)
|
|
|
|
end
|
|
|
|
feed.save
|
|
|
|
end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
2015-09-11 12:28:41 +00:00
|
|
|
<td>
|
2017-01-05 06:56:05 +00:00
|
|
|
<a href="/xhr/announcements/rssfeed/<%= feed.uid %>.rss" target="_blank">RSS Feed</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="/xhr/announcements/feed/<%= feed.uid %>.json" target="_blank">JSON Feed</a>
|
2015-09-11 12:28:41 +00:00
|
|
|
</td>
|
2015-07-08 10:11:25 +00:00
|
|
|
</tr>
|