Neuigkeiten Link

Querverweise für Neuigkeiten
This commit is contained in:
Andreas Stephanides
2014-03-29 11:30:46 +01:00
parent 1d2d3e791b
commit a8401391a6
22 changed files with 199 additions and 55 deletions

View File

@@ -21,14 +21,13 @@ class ThemengruppenController < ApplicationController
# GET /themengruppen/1.json
def show
@themengruppe = Themengruppe.find(params[:id])
@themen = @themengruppe.themen.order(:priority).reverse
@themen = @themengruppe.themen.order(:priority).reverse
@toolbar_elements = []
@toolbar_elements << {:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('thema.add'), :path=>new_themengruppe_thema_path(@themengruppe)} if can? :new, Themengruppe
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('themengruppe.edit'), :path=>edit_themengruppe_path(@themengruppe)} if can? :edit, @themengruppe
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t("themengruppe.manage"), :path=>themengruppe_verwalten_path(@themengruppe)} if can? :edit, @themengruppe
@toolbar_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('themengruppe.remove'), :path=>themengruppe_path(@themengruppe), :method=>:delete,:confirm=>I18n.t('themengruppe.sure')} if can? :delete, @themengruppe
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t("themengruppe.manage"), :path=>themengruppe_verwalten_path(@themengruppe)} if can? :edit, @themengruppe
@toolbar_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('themengruppe.remove'), :path=>themengruppe_path(@themengruppe), :method=>:delete,:confirm=>I18n.t('themengruppe.sure')} if can? :delete, @themengruppe
respond_to do |format|
format.html # show.html.erb