ADD: Informationsseite:

Models für Themengruppen/Themen/FAQs/Attachments
Views für Themengruppen/Themen
This commit is contained in:
HausdorffHimself
2013-08-13 18:31:22 +02:00
parent a2b35d3d60
commit e055b60a53
16 changed files with 101 additions and 62 deletions

View File

@@ -1,8 +1,11 @@
<%= tinymce_assets %>
<%= semantic_form_for @thema do |f| %>
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :text %>
<%= f.input :themengruppe %>
<%= f.input :text, :as=>:tinymce_text%>
<% end %>
<%= tinymce %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>

View File

@@ -0,0 +1,3 @@
<%= raw(small.text) %>
<br/>
<%= link_to 'Edit', edit_thema_path(small) %>

View File

@@ -0,0 +1,2 @@
<%= link_to thema.title,themengruppe_thema_path(thema.themengruppe,thema)%>

View File

@@ -1,15 +1,10 @@
<p id="notice"><%= notice %></p>
<h1><%= @thema.title %></h1>
<p>
<b>Title:</b>
<%= @thema.title %>
</p>
<p>
<b>Text:</b>
<%= @thema.text %>
<%= raw(@thema.text) %>
</p>
<%= link_to 'Edit', edit_thema_path(@thema) %> |
<%= link_to 'Back', themen_path %>
<%= link_to 'Back', themengruppe_path(@thema.themengruppe) %>

View File

@@ -0,0 +1,12 @@
<h3> <%= link_to themengruppe.title, themengruppe %> </h3>
<p>
<%=themengruppe.text %>
</p>
<ul>
<% themengruppe.themen.each do |t| %>
<li>
<%= render t %>
</li>
<% end %>
</ul>

View File

@@ -1,6 +1,6 @@
<h1>Editing themagruppen</h1>
<h1>Editing themengruppen</h1>
<%= render 'form' %>
<%= link_to 'Show', @themagruppen %> |
<%= link_to 'Show', @themengruppe %> |
<%= link_to 'Back', themengruppen_path %>

View File

@@ -1,25 +1,24 @@
<h1>Listing themengruppen</h1>
<div class="container-fluid">
<table>
<tr>
<th>Title</th>
<th>Text</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @themengruppen.each do |themengruppe| %>
<tr>
<td><%= themengruppe.title %></td>
<td><%= themengruppe.text %></td>
<td><%= link_to 'Show', themengruppe %></td>
<td><%= link_to 'Edit', edit_themengruppe_path(themengruppe) %></td>
<td><%= link_to 'Destroy', themengruppe, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% @themengruppen.each_slice(2) do |row| %>
<div class="row-fluid">
<% row.each do |themengruppe| %>
<div class="span6 equalheight">
<div class="themengruppe">
<%= render themengruppe %>
<p>
<%= link_to 'Edit', edit_themengruppe_path(themengruppe) %>
</p>
</div>
</div>
<% end %>
</div>
<% end %>
</table>
</div>
<br />
<script>
make_equal_height();
</script>
<%= link_to 'New Themengruppe', new_themengruppe_path %>

View File

@@ -1,15 +1,29 @@
<p id="notice"><%= notice %></p>
<h1><%= @themengruppe.title %></h1>
<p>
<b>Title:</b>
<%= @themagruppen.title %>
<%= @themengruppe.text %>
</p>
<p>
<b>Text:</b>
<%= @themagruppen.text %>
</p>
<div class="accordion" id="accordion1">
<% @themengruppe.themen.each do |thema| %>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapse<%=thema.id%>">
<%= thema.title %>
</a>
</div>
<div id="collapse<%=thema.id%>" class="accordion-body collapse">
<div class="accordion-inner">
<%= render partial: "themen/small", object: thema %>
</div>
</div>
</div>
<% end %>
</div>
<%= link_to 'Add Thema', new_themengruppe_thema_path(@themengruppe) %>
<%= link_to 'Edit', edit_themagruppen_path(@themagruppen) %> |
<br/><br/>
<%= link_to 'Edit', edit_themengruppe_path(@themengruppe) %> |
<%= link_to 'Back', themengruppen_path %>