forked from bofh/fetsite
a lot of new models ...
Fotogallary, gremien, fetprofil,
This commit is contained in:
11
app/views/galleries/_form.html.erb
Normal file
11
app/views/galleries/_form.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<%= semantic_form_for @gallery do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :desc %>
|
||||
<%= f.input :datum %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/galleries/edit.html.erb
Normal file
6
app/views/galleries/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing gallery</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @gallery %> |
|
||||
<%= link_to 'Back', galleries_path %>
|
||||
27
app/views/galleries/index.html.erb
Normal file
27
app/views/galleries/index.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<h1>Listing galleries</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th>Datum</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @galleries.each do |gallery| %>
|
||||
<tr>
|
||||
<td><%= gallery.name %></td>
|
||||
<td><%= gallery.desc %></td>
|
||||
<td><%= gallery.datum %></td>
|
||||
<td><%= link_to 'Show', gallery %></td>
|
||||
<td><%= link_to 'Edit', edit_gallery_path(gallery) %></td>
|
||||
<td><%= link_to 'Destroy', gallery, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Gallery', new_gallery_path %>
|
||||
5
app/views/galleries/new.html.erb
Normal file
5
app/views/galleries/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New gallery</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', galleries_path %>
|
||||
20
app/views/galleries/show.html.erb
Normal file
20
app/views/galleries/show.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @gallery.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Desc:</b>
|
||||
<%= @gallery.desc %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Datum:</b>
|
||||
<%= @gallery.datum %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_gallery_path(@gallery) %> |
|
||||
<%= link_to 'Back', galleries_path %>
|
||||
Reference in New Issue
Block a user