forked from bofh/fetsite
themessticker, cleanup routes
This commit is contained in:
@@ -91,9 +91,14 @@ class FetprofilesController < ApplicationController
|
||||
if @fetprofile.update_attributes(params[:fetprofile])
|
||||
format.html {
|
||||
unless params[:button]=="continue" || params[:commit]=="continue"
|
||||
redirect_to @fetprofile, notice: 'Fetprofile was successfully updated.'
|
||||
|
||||
redirect_to @fetprofile, notice: 'profile was successfully updated.'
|
||||
else
|
||||
redirect_to edit_fetprofile_path(@fetprofile), notice: 'Fetprofile was successfully updated.'
|
||||
@memberships=@fetprofile.memberships.order(:typ)
|
||||
@memberships<< Membership.new
|
||||
@memberships<< Membership.new
|
||||
@memberships<< Membership.new
|
||||
render action: "edit", notice: 'profile was successfully updated.'
|
||||
end
|
||||
}
|
||||
format.json { head :no_content }
|
||||
|
||||
@@ -22,8 +22,11 @@ class ThemengruppenController < ApplicationController
|
||||
# GET /themengruppen/1.json
|
||||
def show
|
||||
@themengruppe = Themengruppe.find(params[:id])
|
||||
if can? :showdraft , Thema
|
||||
@themen = @themengruppe.themen.order(:priority).reverse
|
||||
|
||||
else
|
||||
@themen = @themengruppe.themen.where(:isdraft=>false).order(:priority).reverse
|
||||
end
|
||||
@toolbar_elements = []
|
||||
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t("themengruppe.manage"), :path=>themengruppe_verwalten_path(@themengruppe)} if can? :edit, @themengruppe
|
||||
|
||||
|
||||
Reference in New Issue
Block a user