forked from bofh/fetsite
Beispiele hinzugefügt
This commit is contained in:
12
app/views/beispiele/_form.html.erb
Normal file
12
app/views/beispiele/_form.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<%= semantic_form_for @beispiel, :html => { :multipart => true } do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :desc %>
|
||||
<%= f.input :file , :as=>:file %>
|
||||
<%= f.input :lva, :as=>:radio, :collection => Lva.all%>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/beispiele/edit.html.erb
Normal file
6
app/views/beispiele/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing beispiel</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @beispiel %> |
|
||||
<%= link_to 'Back', beispiele_path %>
|
||||
25
app/views/beispiele/index.html.erb
Normal file
25
app/views/beispiele/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<h1>Listing beispiele</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @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>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Beispiel', new_beispiel_path %>
|
||||
5
app/views/beispiele/new.html.erb
Normal file
5
app/views/beispiele/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New beispiel</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', beispiele_path %>
|
||||
16
app/views/beispiele/show.html.erb
Normal file
16
app/views/beispiele/show.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @beispiel.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Desc:</b>
|
||||
<%= @beispiel.desc %>
|
||||
<%= @beispiel.file.url %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_beispiel_path(@beispiel) %> |
|
||||
<%= link_to 'Back', beispiele_path %>
|
||||
Reference in New Issue
Block a user