forked from bofh/fetsite
GitHub Account angelegt
This commit is contained in:
11
app/views/neuigkeiten/_form.html.erb
Normal file
11
app/views/neuigkeiten/_form.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<%= semantic_form_for @neuigkeit do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title, :placeholder=>"Titel" %>
|
||||
<%= f.input :text %>
|
||||
<%= f.input :datum %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/neuigkeiten/edit.html.erb
Normal file
6
app/views/neuigkeiten/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing neuigkeit</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @neuigkeit %> |
|
||||
<%= link_to 'Back', neuigkeiten_path %>
|
||||
27
app/views/neuigkeiten/index.html.erb
Normal file
27
app/views/neuigkeiten/index.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<h1>Listing neuigkeiten</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Text</th>
|
||||
<th>Datum</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @neuigkeiten.each do |neuigkeit| %>
|
||||
<tr>
|
||||
<td><%= neuigkeit.title %></td>
|
||||
<td><%= neuigkeit.text %></td>
|
||||
<td><%= neuigkeit.datum %></td>
|
||||
<td><%= link_to 'Show', neuigkeit %></td>
|
||||
<td><%= link_to 'Edit', edit_neuigkeit_path(neuigkeit) %></td>
|
||||
<td><%= link_to 'Destroy', neuigkeit, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Neuigkeit', new_neuigkeit_path %>
|
||||
5
app/views/neuigkeiten/new.html.erb
Normal file
5
app/views/neuigkeiten/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New neuigkeit</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', neuigkeiten_path %>
|
||||
20
app/views/neuigkeiten/show.html.erb
Normal file
20
app/views/neuigkeiten/show.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Title:</b>
|
||||
<%= @neuigkeit.title %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Text:</b>
|
||||
<%= @neuigkeit.text %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Datum:</b>
|
||||
<%= @neuigkeit.datum %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_neuigkeit_path(@neuigkeit) %> |
|
||||
<%= link_to 'Back', neuigkeiten_path %>
|
||||
Reference in New Issue
Block a user