This commit is contained in:
Thomas Blazek
2013-08-19 23:20:56 +02:00
7 changed files with 38 additions and 7 deletions

View File

@@ -1,7 +1,9 @@
<%= tinymce_assets %>
<%= semantic_form_for @frage do |f| %>
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :text %>
<%= f.input :thema %>
<%= f.input :text, :as=>:tinymce_text%>
<% end %>
<%= f.actions do %>

View File

@@ -10,4 +10,4 @@
<%= link_to 'Edit', edit_frage_path(@frage) %> |
<%= link_to 'Back', fragen_path %>
<%= link_to 'Back', @frage.thema %>

View File

@@ -1,3 +1,16 @@
<%= raw(small.text) %>
<br/>
<%= link_to 'Edit', edit_thema_path(small) %>
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>
<br/>
<% small.fragen.each do |frage| %>
<p>
<b> <%= frage.title %> </b> <br/>
<%= raw(frage.text) %>
</p>
<br/>
<% end %>
<%= link_to 'Edit', small %>

View File

@@ -8,3 +8,18 @@
<%= link_to 'Edit', edit_thema_path(@thema) %> |
<%= link_to 'Back', themengruppe_path(@thema.themengruppe) %>
<h2>FAQs:</h2>
<% @thema.fragen.each do |frage| %>
<p>
<b> <%= frage.title %> </b> <br/>
<%= raw(frage.text) %>
<br/>
<%= link_to 'Edit', edit_frage_path(frage) %> |
<%= link_to 'Destroy',frage, method: :delete, data: { confirm: 'Are you sure?' } %>
</p>
<% end %>
<br/>
<%= link_to 'Neue Frage', new_frage_path %>

View File

@@ -25,5 +25,6 @@
<br/><br/>
<%= link_to 'Edit', edit_themengruppe_path(@themengruppe) %> |
<%= link_to 'Back', themengruppen_path %>