Sha256: 1ba625014f7df65b25fc668d0e3cc6822d333e8761549a0dfaf87a907a8d52a8

Contents?: true

Size: 959 Bytes

Versions: 1

Compression:

Stored size: 959 Bytes

Contents

<div class="tags">
  <h2>Tags</h2>
  <table>
    <thead>
      <tr>
        <th>Tag</th>
        <% if admin? %>
          <th></th>
          <th></th>
        <% end %>
        <th>Popularity</th>
      </tr>
    </thead>
    <tbody>
      <% top_tag = @tags.order(:count).reverse.first %>
      <% max_count = top_tag ? top_tag.count : 1 %>
      <% @tags.each do |tag| %>
        <tr>
          <td class="title"><%= A(tag.title, :href => tag.url) %></td>
           <% if admin? %>
            <td><a href="/tags/edit/<%= tag.id %>">Edit</a></td>
            <td><%= A 'Delete', :href => "/tags/delete/#{tag.id}", :onclick => "return confirm('Are you sure you want to delete this tag?');" %></td>
          <% end %>
         <td class="count" style="width: <%= admin? ? 60 : 80 %>%"><div class="percent-bar" style="width: <%= tag.count.to_f / max_count * 100 %>%"><%= tag.count %></div></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cortex-reaver-0.0.7 lib/cortex_reaver/view/tags/list.rhtml