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