Sha256: c619305efe842be04de710a69ee20eff481adca4256e70396618a41f049cb675

Contents?: true

Size: 1.95 KB

Versions: 2

Compression:

Stored size: 1.95 KB

Contents

<h1>Listing snippets</h1>
<div class="row">
<div class="span6">
  <h2>Search</h2>
  <%= search_form_for @search do |f| %>
    <div class="field">
      <%= f.label :title_cont, "Title contains" %>
      <%= f.text_field :title_cont %>
    </div>
    <div class="field">
      <%= f.label :translations_content_cont, "Content contains" %>
      <%= f.text_field :translations_content_cont %>
    </div>
    <div class="field">
      <%= f.label :status_cont, "Status contains" %>
      <%= f.select(:status_cont, [['', ''], ['Draft', 'draft'], ['Published', 'published']]) %>
    </div>
    <div class="actions"><%= f.submit "Search" %></div>
  <% end %>
</div>
<div class="span6">
  <h2>Import</h2>
  <%= form_tag import_snippets_path, multipart: true do %>
    <%= file_field_tag :file %>
    <%= submit_tag "Import" %>
  <% end %>
  <h2>Import Translations</h2>
  <%= form_tag import_translations_snippets_path, multipart: true do %>
    <%= file_field_tag :file %>
    <%= submit_tag "Import Translations" %>
  <% end %>
</div>
</div>

<%= paginate @snippets, :theme => 'twitter-bootstrap' %>

<table id="static-block-list" class="table table-striped">
  <tr>
    <th style="min-width: 60px;"><%= sort_link(@search, :title, "Title") %></th>
    <th><%= sort_link(@search, :content, "Content") %></th>
    <th style="min-width: 80px;"><%= sort_link(@search, :status, "Status") %></th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

  <% @snippets.each do |snippet| %>
  <tr>
    <td><%= snippet.title %></td>
    <td><%= snippet.content %></td>
    <td><%= snippet.status %></td>
    <td><%= link_to 'Show', snippet_path(snippet), class: "btn btn-mini btn-success" %></td>
    <td><%= link_to 'Edit', edit_snippet_path(snippet), class: "btn btn-mini btn-warning" %></td>
    <td><%= link_to 'Destroy', snippet, class: "btn btn-mini btn-danger", method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
  <% end %>
</table>

<%= paginate @snippets, :theme => 'twitter-bootstrap' %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
static_blocks-1.0.1 app/views/static_blocks/snippets/index.html.erb
static_blocks-1.0.0 app/views/static_blocks/snippets/index.html.erb