Sha256: 52278e0bf87828a0e0e4bd2e2e3ff56bc83833ac6936e4994caff9503281a827

Contents?: true

Size: 1.27 KB

Versions: 3

Compression:

Stored size: 1.27 KB

Contents

<h3><%= Brewery.count %> Breweries</h3>
<!-- todo: add display/page count e.g. 25 -->

<p>
  Sort By: <%= link_to 'Key A-Z', breweries_path( order: 'key' ) %>
          &bull;
        <%= link_to 'Title A-Z', breweries_path( order: 'title' ) %>
          &bull;
        <%= link_to 'Production/Capacity (in hl)', breweries_path( order: 'hl' ) %>
</p>


<table>
<% @breweries.each do |brewery| %>
<tr>
  <td class='brewery-key'><%= brewery.key %></td>

<% if signed_in? %>
  <td>
     <%= link_to 'Add', add_brewery_to_user_path( brewery.id, current_user_id ), class: 'btn' %>
  </td>
<% end %>

  <td>
    <%= link_to brewery.title, brewery_path( brewery.id ) %>
    <% if brewery.synonyms.present? %>
       | <%= brewery.synonyms %>
    <% end %>

    <%= render_brewery_tags( brewery ) %>

  </td>
  <td>
    <% if brewery.city.present? %>
      <%= brewery.city.title %>
    <% else %>
      -
    <% end %>
     /
    <% if brewery.region.present? %>
      <%= brewery.region.title %>
    <% else %>
      -
    <% end %>
     /
     <%= image_tag_for_country( brewery.country ) %>
     <%= link_to brewery.country.title, short_country_path( brewery.country ) %>
   </td>
</tr>

<tr>
  <td></td>
  <td colspan='2'>
    <%= render_beers( brewery.beers ) %>
  </td>
</tr>

<% end %>
</table>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
beerdb-admin-0.1.1 app/views/beer_db_admin/breweries/index.html.erb
beerdb-admin-0.1.0 app/views/beer_db_admin/breweries/index.html.erb
beerdb-admin-0.0.1 app/views/beer_db_admin/breweries/index.html.erb