Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table_dash">
- <!-- questo é comune a tutti e lo metti fuori dal ciclo-->
- <thead>
- <tr>
- <th scope="col"> Sommario Schede </th>
- </tr>
- <tr>
- <th scope="col">Titolo</th>
- <th scope="col">Sottotitolo</th>
- <th scope="col">Autore</th>
- <th scope="col">Data</th>
- </tr>
- </thead>
- <tbody>
- <!-- questo lo devi mettere qui e far correre il ciclo sui tr del tbody-->
- <% @lezione.selezioni.each do |selezione| %>
- <tr>
- <td>
- <%= link_to selezione.scheda.titolo, [@lezione,selezione] %>
- <%- if can? :manage, @lezione -%>
- <span style="float: right;">
- <%= link_to "Su", up_lezione_selezione_path(@lezione,selezione), :method => :post %>
- <%= link_to "Giu", down_lezione_selezione_path(@lezione,selezione), :method => :post %>
- <%= link_to "Rimuovi", [@lezione,selezione], :method => :delete %>
- </span>
- <% end %> <!-- questo chiude l'if DENTRO il td e il tr-->
- </td>
- </tr>
- <%- end -%> <!--chiude il ciclo sulle lezioni-->
- </tbody>
- </table>
Add Comment
Please, Sign In to add comment