forked from bofh/fetsite
#114 closed
This commit is contained in:
@@ -12,6 +12,10 @@ class ThemengruppenController < ApplicationController
|
|||||||
format.json { render json: @themengruppen }
|
format.json { render json: @themengruppen }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
def faqs
|
||||||
|
@themengruppen = Themengruppe.order(:priority).includes(:themen,{themen: :fragen})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
# GET /themengruppen/1
|
# GET /themengruppen/1
|
||||||
# GET /themengruppen/1.json
|
# GET /themengruppen/1.json
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<img class="media-object img" src="<%= lec_lva.picture.thumb.url unless lec_lva.picture.nil? %>"/>
|
<img class="media-object img" src="<%= lec_lva.picture.thumb.url unless lec_lva.picture.nil? %>"/>
|
||||||
</a>
|
</a>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h4><%= link_to lec_lva.name, lec_lva %></h4>
|
<h4><%= lec_lva.name %></h4>
|
||||||
Email: <%= mail_to lec_lva.email %><br>
|
Email: <%= mail_to lec_lva.email %><br>
|
||||||
TISS: <%= link_to lec_lva.name, lec_lva.link, target: "_blank" %>
|
TISS: <%= link_to lec_lva.name, lec_lva.link, target: "_blank" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
17
app/views/themengruppen/faqs.html.erb
Normal file
17
app/views/themengruppen/faqs.html.erb
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<% @themengruppen.each do |tg| %>
|
||||||
|
|
||||||
|
<h2><%= tg.title%></h2>
|
||||||
|
<ul>
|
||||||
|
<% tg.themen.each do |t| %>
|
||||||
|
<li> <%= t.title %>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<% t.fragen.each do |f| %>
|
||||||
|
<li><b> <%= f.title %></b><p> <%= f.text %></p></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<div class="content-wrap content-column">
|
<div class="content-wrap content-column">
|
||||||
|
<p> <%= link_to "FAQS", faqs_themengruppen_path %></p>
|
||||||
<ul class="unstyled linkbox-list">
|
<ul class="unstyled linkbox-list">
|
||||||
<li>
|
<li>
|
||||||
<% @themengruppen.each do |themengruppe| %>
|
<% @themengruppen.each do |themengruppe| %>
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ end
|
|||||||
resources :themengruppen do
|
resources :themengruppen do
|
||||||
get :verwalten
|
get :verwalten
|
||||||
get :verwalten_all,:on=>:collection
|
get :verwalten_all,:on=>:collection
|
||||||
|
get :faqs, :on=>:collection
|
||||||
post :sort_themen
|
post :sort_themen
|
||||||
post :sort_themengruppen, :on=>:collection
|
post :sort_themengruppen, :on=>:collection
|
||||||
resources :themen, :only=>[:new, :show]
|
resources :themen, :only=>[:new, :show]
|
||||||
|
|||||||
Reference in New Issue
Block a user