<%- model_class = Cinnosti.new.class -%>
<div class="page-header">
  <h1>Zoznam činností</h1>
</div>
<table class="table table-striped">
  <thead>
    <tr>
<!--      <th><#%= model_class.human_attribute_name(:id) %></th> -->
<!--      <th><#%= model_class.human_attribute_name(:ID_Cinnost) %></th> -->
      <th><%= model_class.human_attribute_name(:Popis) %></th>
      <th><%= model_class.human_attribute_name(:Datum_Od) %></th>
      <th><%= model_class.human_attribute_name(:Datum_Do) %></th>
      <th><%= model_class.human_attribute_name(:Zhodnotenie) %></th>
      <th>Typ činnosti</th>
      <th>Stav činnosti</th>
      <th>Podujatie</th>
<!--      <th><#%= model_class.human_attribute_name(:created_at) %></th> -->
<!--      <th><#%=t '.actions', :default => t("helpers.actions") %></th> -->
    </tr>
  </thead>
  <tbody>
    <% @cinnostis.each do |cinnosti| %>
      <tr>
<!--        <td><#%= link_to cinnosti.id, cinnosti_path(cinnosti) %></td> -->
<!--        <td><#%= cinnosti.ID_Cinnost %></td> -->
        <td><%= cinnosti.Popis %></td>
        <td><%= cinnosti.Datum_Od %></td>
        <td><%= cinnosti.Datum_Do %></td>
        <td><%= cinnosti.Zhodnotenie %></td>
        <td><%= cinnosti.c_typ_cinnosti.Nazov %></td>
        <td><%= cinnosti.c_stav_cinnosti.Nazov  %></td>
        <td><%= cinnosti.podujatia.Nazov %></td>
<!--        <td><#%=l cinnosti.created_at %></td> -->
        <td>
          <%= link_to 'Upraviť',
                      edit_cinnosti_path(cinnosti), :class => 'btn btn-mini' %>
          <%= link_to 'Vymazať',
                      cinnosti_path(cinnosti),
                      :method => :delete,
                      :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Ste si istý?')),
                      :class => 'btn btn-mini btn-danger' %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<%= link_to 'Nový',
            new_cinnosti_path,
            :class => 'btn btn-primary' %>
