forked from bofh/fetsite
New Feature: Themen/Informationen
This commit is contained in:
9
app/views/attachments/_form.html.erb
Normal file
9
app/views/attachments/_form.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<%= semantic_form_for @attachment do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/attachments/edit.html.erb
Normal file
6
app/views/attachments/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing attachment</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @attachment %> |
|
||||
<%= link_to 'Back', attachments_path %>
|
||||
23
app/views/attachments/index.html.erb
Normal file
23
app/views/attachments/index.html.erb
Normal file
@@ -0,0 +1,23 @@
|
||||
<h1>Listing attachments</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @attachments.each do |attachment| %>
|
||||
<tr>
|
||||
<td><%= attachment.name %></td>
|
||||
<td><%= link_to 'Show', attachment %></td>
|
||||
<td><%= link_to 'Edit', edit_attachment_path(attachment) %></td>
|
||||
<td><%= link_to 'Destroy', attachment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Attachment', new_attachment_path %>
|
||||
5
app/views/attachments/new.html.erb
Normal file
5
app/views/attachments/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New attachment</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', attachments_path %>
|
||||
10
app/views/attachments/show.html.erb
Normal file
10
app/views/attachments/show.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @attachment.name %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_attachment_path(@attachment) %> |
|
||||
<%= link_to 'Back', attachments_path %>
|
||||
Reference in New Issue
Block a user