FIXED themengruppe verwalten + faqs order
This commit is contained in:
@@ -77,7 +77,7 @@ class ThemenController < ApplicationController
|
||||
end
|
||||
end
|
||||
def fragen
|
||||
@thema = Thema.find(params[:thema_id])
|
||||
@thema = Thema.find(params[:id])
|
||||
@fragen=@thema.fragen
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
||||
@@ -13,7 +13,7 @@ class ThemengruppenController < ApplicationController
|
||||
end
|
||||
end
|
||||
def faqs
|
||||
@themengruppen = Themengruppe.order(:priority).includes(:themen,{themen: :fragen})
|
||||
@themengruppen = Themengruppe.order("themengruppen.priority").includes(:themen,{themen: :fragen}).order("themen.priority").reverse
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<% verw_liste.each do |thema| %>
|
||||
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox handle" ><h2><%= thema.title %></h2> </div> <%= link_to edit_thema_path(thema),:remote=>true do %> Edit <% end %> <%= link_to thema_fragen_path(thema),:remote=>true do %> Fragen <% end %></li>
|
||||
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox handle" ><h2><%= thema.title %></h2> </div> <%= link_to edit_thema_path(thema),:remote=>true do %> Edit <% end %> <%= link_to fragen_thema_path(thema),:remote=>true do %> Fragen <% end %></li>
|
||||
<% end %>
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
<h2><%= tg.title%></h2>
|
||||
<ul>
|
||||
<% tg.themen.each do |t| %>
|
||||
<li> <%= t.title %>
|
||||
<% tg.themen.order(:priority).reverse.each do |t| %>
|
||||
<li><a name="themengruppe_<%=t.id.to_s%>"> <%= t.title %> </a>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
<% t.fragen.each do |f| %>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<div class="content-wrap content-column" >
|
||||
<h2>sdffs2</h2>
|
||||
<%= link_to fa_icon("arrow-circle-left 2x")+" Alle Themengruppen", themengruppen_path, :class=>"linkbox" %>
|
||||
<%= link_to fa_icon("question 2x")+" Häufige Fragen", faqs_themengruppen_path(:anchor=>"themengruppe_"+@themengruppe.id.to_s), :class=>"linkbox" %>
|
||||
<h1><%= @themengruppe.title %></h1>
|
||||
<p>
|
||||
<%= @themengruppe.text %>
|
||||
|
||||
Reference in New Issue
Block a user