aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery/blog/admin/categories/_category.html.erb
blob: 3f813f5333e319dc19554729e234314d7132bcc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(category) -%>">
  <span class='title'>
    <%= category.title.presence || category.translations.detect {|t| t.title.present?}.title %>
    <span class="preview">
      <% category.translations.each do |translation| %>
        <% if translation.title.present? %>
          <%= link_to refinery.edit_blog_admin_category_path(category, :switch_locale => translation.locale),
              :class => 'locale' do %>
            <div class="locale_icon <%= translation.locale %>">
              <%= refinery_icon_tag('locale-blue.svg', :size => '24x24') %>
              <span class="code"><%= translation.locale.upcase %></span>
            </div>
          <% end %>
        <% end %>
      <% end %>
    </span>
  </span>
  <span class='actions'>
    <%= link_to refinery_icon_tag("application_edit.png"),
                refinery.edit_blog_admin_category_path(category),
                :title => t('.edit') %>
    <%= link_to refinery_icon_tag("delete.png"), refinery.blog_admin_category_path(category),
                :class => "cancel confirm-delete",
                :title => t('.delete'),
                :method => :delete,
                :data => {
                  :confirm => t('message', :scope => 'refinery.admin.delete', :title => category.title)
                } %>
  </span>
</li>