Sha256: c7ad929b04d55bc52bf6225a61b02bcd6381fc19717a3a40ad055364c270664f

Contents?: true

Size: 1.93 KB

Versions: 3

Compression:

Stored size: 1.93 KB

Contents

<% blazer_title "Uploads" %>

<div id="header">
  <div class="pull-right" style="line-height: 34px;">
    <div class="btn-group">
      <%= link_to "New Upload", new_upload_path, class: "btn btn-info" %>
      <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        <span class="caret"></span>
        <span class="sr-only">Toggle Dropdown</span>
      </button>
      <ul class="dropdown-menu">
        <li><%= link_to "Home", root_path %></li>
        <li><%= link_to "Checks", checks_path %></li>
        <li role="separator" class="divider"></li>
        <li><%= link_to "New Query", new_query_path %></li>
        <li><%= link_to "New Dashboard", new_dashboard_path %></li>
        <li><%= link_to "New Check", new_check_path %></li>
      </ul>
    </div>
  </div>

  <input id="search" type="text" placeholder="Start typing a table or person" style="width: 300px; display: inline-block;" class="search form-control" />
</div>

<table id="uploads" class="table">
  <thead>
    <tr>
      <th>Table</th>
      <th style="width: 60%;"></th>
      <% if Blazer.user_class %>
        <th style="width: 20%; text-align: right;">Mastermind</th>
      <% end%>
    </tr>
  </thead>
  <tbody>
    <% @uploads.each do |upload| %>
      <tr>
        <td><%= link_to upload.table, edit_upload_path(upload) %></td>
        <td><%= truncate(upload.description, length: 100, separator: " ") %></td>
        <% if Blazer.user_class %>
          <td class="creator"><%= blazer_user && upload.creator == blazer_user ? "You" : upload.creator.try(Blazer.user_name) %></td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>

<%= javascript_tag nonce: true do %>
  $("#search").on("keyup", function() {
    var value = $(this).val().toLowerCase()
    $("#uploads tbody tr").filter( function() {
      $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
    })
  }).focus()
<% end %>

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
blazer-3.1.0 app/views/blazer/uploads/index.html.erb
blazer-3.0.4 app/views/blazer/uploads/index.html.erb
blazer_xlsx-3.0.8 app/views/blazer/uploads/index.html.erb