forked from bofh/fetsite
a lot of new models ...
Fotogallary, gremien, fetprofil,
This commit is contained in:
12
app/views/fotos/_form.html.erb
Normal file
12
app/views/fotos/_form.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<%= semantic_form_for @foto do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :desc %>
|
||||
<%= f.input :gallery_id %>
|
||||
<%= f.input :datei %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/fotos/edit.html.erb
Normal file
6
app/views/fotos/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing foto</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @foto %> |
|
||||
<%= link_to 'Back', fotos_path %>
|
||||
29
app/views/fotos/index.html.erb
Normal file
29
app/views/fotos/index.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Listing fotos</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Desc</th>
|
||||
<th>Gallery</th>
|
||||
<th>Datei</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @fotos.each do |foto| %>
|
||||
<tr>
|
||||
<td><%= foto.title %></td>
|
||||
<td><%= foto.desc %></td>
|
||||
<td><%= foto.gallery_id %></td>
|
||||
<td><%= foto.datei %></td>
|
||||
<td><%= link_to 'Show', foto %></td>
|
||||
<td><%= link_to 'Edit', edit_foto_path(foto) %></td>
|
||||
<td><%= link_to 'Destroy', foto, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Foto', new_foto_path %>
|
||||
5
app/views/fotos/new.html.erb
Normal file
5
app/views/fotos/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New foto</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', fotos_path %>
|
||||
25
app/views/fotos/show.html.erb
Normal file
25
app/views/fotos/show.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Title:</b>
|
||||
<%= @foto.title %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Desc:</b>
|
||||
<%= @foto.desc %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Gallery:</b>
|
||||
<%= @foto.gallery_id %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Datei:</b>
|
||||
<%= @foto.datei %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_foto_path(@foto) %> |
|
||||
<%= link_to 'Back', fotos_path %>
|
||||
Reference in New Issue
Block a user