forked from bofh/fetsite
Beispiel Listing design
This commit is contained in:
19
app/views/beispiele/_beispiel_list.html.erb
Normal file
19
app/views/beispiele/_beispiel_list.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="beispiel">
|
||||
<p>
|
||||
<b>
|
||||
<%=link_to beispiel.name, beispiel.beispieldatei.url%>
|
||||
</b>
|
||||
<p>
|
||||
Beschreibung:
|
||||
<p>
|
||||
<%= beispiel.desc %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
LVA: <%=link_to beispiel.lva.name, lva_path(beispiel.lva.id)%>
|
||||
</p>
|
||||
|
||||
<%= link_to 'Show', beispiel %>
|
||||
<%= link_to 'Edit', edit_beispiel_path(beispiel) %>
|
||||
<%= link_to 'Destroy', beispiel, method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||
</div class="beispiel">
|
||||
@@ -1,25 +1,10 @@
|
||||
<h1>Listing beispiele</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<ul>
|
||||
<% @beispiele.each do |beispiel| %>
|
||||
<tr>
|
||||
<td><%= beispiel.name %></td>
|
||||
<td><%= beispiel.desc %></td>
|
||||
<td><%= link_to 'Show', beispiel %></td>
|
||||
<td><%= link_to 'Edit', edit_beispiel_path(beispiel) %></td>
|
||||
<td><%= link_to 'Destroy', beispiel, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<li>
|
||||
<%= render :partial=> "beispiele/beispiel_list", :object => beispiel, :as=>:beispiel%>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<%= link_to 'New Beispiel', new_beispiel_path %>
|
||||
|
||||
Reference in New Issue
Block a user