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>
|
<h1>Listing beispiele</h1>
|
||||||
|
<ul>
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Desc</th>
|
|
||||||
<th></th>
|
|
||||||
<th></th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<% @beispiele.each do |beispiel| %>
|
<% @beispiele.each do |beispiel| %>
|
||||||
<tr>
|
<li>
|
||||||
<td><%= beispiel.name %></td>
|
<%= render :partial=> "beispiele/beispiel_list", :object => beispiel, :as=>:beispiel%>
|
||||||
<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>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</li>
|
||||||
|
</ul>
|
||||||
<br />
|
|
||||||
|
|
||||||
<%= link_to 'New Beispiel', new_beispiel_path %>
|
<%= link_to 'New Beispiel', new_beispiel_path %>
|
||||||
|
|||||||
Reference in New Issue
Block a user