Merge remote-tracking branch 'hausdorff/master'

This commit is contained in:
Andreas Stephanides
2013-08-13 19:25:26 +02:00
111 changed files with 2391 additions and 30 deletions

View File

@@ -0,0 +1,83 @@
class AttachmentsController < ApplicationController
# GET /attachments
# GET /attachments.json
def index
@attachments = Attachment.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @attachments }
end
end
# GET /attachments/1
# GET /attachments/1.json
def show
@attachment = Attachment.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @attachment }
end
end
# GET /attachments/new
# GET /attachments/new.json
def new
@attachment = Attachment.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @attachment }
end
end
# GET /attachments/1/edit
def edit
@attachment = Attachment.find(params[:id])
end
# POST /attachments
# POST /attachments.json
def create
@attachment = Attachment.new(params[:attachment])
respond_to do |format|
if @attachment.save
format.html { redirect_to @attachment, notice: 'Attachment was successfully created.' }
format.json { render json: @attachment, status: :created, location: @attachment }
else
format.html { render action: "new" }
format.json { render json: @attachment.errors, status: :unprocessable_entity }
end
end
end
# PUT /attachments/1
# PUT /attachments/1.json
def update
@attachment = Attachment.find(params[:id])
respond_to do |format|
if @attachment.update_attributes(params[:attachment])
format.html { redirect_to @attachment, notice: 'Attachment was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @attachment.errors, status: :unprocessable_entity }
end
end
end
# DELETE /attachments/1
# DELETE /attachments/1.json
def destroy
@attachment = Attachment.find(params[:id])
@attachment.destroy
respond_to do |format|
format.html { redirect_to attachments_url }
format.json { head :no_content }
end
end
end

View File

@@ -0,0 +1,83 @@
class FragenController < ApplicationController
# GET /fragen
# GET /fragen.json
def index
@fragen = Frage.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @fragen }
end
end
# GET /fragen/1
# GET /fragen/1.json
def show
@frage = Frage.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @frage }
end
end
# GET /fragen/new
# GET /fragen/new.json
def new
@frage = Frage.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @frage }
end
end
# GET /fragen/1/edit
def edit
@frage = Frage.find(params[:id])
end
# POST /fragen
# POST /fragen.json
def create
@frage = Frage.new(params[:frage])
respond_to do |format|
if @frage.save
format.html { redirect_to @frage, notice: 'Frage was successfully created.' }
format.json { render json: @frage, status: :created, location: @frage }
else
format.html { render action: "new" }
format.json { render json: @frage.errors, status: :unprocessable_entity }
end
end
end
# PUT /fragen/1
# PUT /fragen/1.json
def update
@frage = Frage.find(params[:id])
respond_to do |format|
if @frage.update_attributes(params[:frage])
format.html { redirect_to @frage, notice: 'Frage was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @frage.errors, status: :unprocessable_entity }
end
end
end
# DELETE /fragen/1
# DELETE /fragen/1.json
def destroy
@frage = Frage.find(params[:id])
@frage.destroy
respond_to do |format|
format.html { redirect_to fragen_url }
format.json { head :no_content }
end
end
end

View File

@@ -0,0 +1,83 @@
class ThemenController < ApplicationController
# GET /themen
# GET /themen.json
def index
@themen = Thema.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @themen }
end
end
# GET /themen/1
# GET /themen/1.json
def show
@thema = Thema.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @thema }
end
end
# GET /themen/new
# GET /themen/new.json
def new
@thema = Thema.new
@thema.themengruppe = Themengruppe.find(params[:themengruppe_id]) unless params[:themengruppe_id].nil?
respond_to do |format|
format.html # new.html.erb
format.json { render json: @thema }
end
end
# GET /themen/1/edit
def edit
@thema = Thema.find(params[:id])
end
# POST /themen
# POST /themen.json
def create
@thema = Thema.new(params[:thema])
respond_to do |format|
if @thema.save
format.html { redirect_to @thema, notice: 'Thema was successfully created.' }
format.json { render json: @thema, status: :created, location: @thema }
else
format.html { render action: "new" }
format.json { render json: @thema.errors, status: :unprocessable_entity }
end
end
end
# PUT /themen/1
# PUT /themen/1.json
def update
@thema = Thema.find(params[:id])
respond_to do |format|
if @thema.update_attributes(params[:thema])
format.html { redirect_to @thema, notice: 'Thema was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @thema.errors, status: :unprocessable_entity }
end
end
end
# DELETE /themen/1
# DELETE /themen/1.json
def destroy
@thema = Thema.find(params[:id])
@thema.destroy
respond_to do |format|
format.html { redirect_to themen_url }
format.json { head :no_content }
end
end
end

View File

@@ -0,0 +1,83 @@
class ThemengruppenController < ApplicationController
# GET /themengruppen
# GET /themengruppen.json
def index
@themengruppen = Themengruppe.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @themengruppen }
end
end
# GET /themengruppen/1
# GET /themengruppen/1.json
def show
@themengruppe = Themengruppe.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @themengruppe }
end
end
# GET /themengruppen/new
# GET /themengruppen/new.json
def new
@themengruppe = Themengruppe.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @themengruppe }
end
end
# GET /themengruppen/1/edit
def edit
@themengruppe = Themengruppe.find(params[:id])
end
# POST /themengruppen
# POST /themengruppen.json
def create
@themengruppe = Themengruppe.new(params[:themengruppe])
respond_to do |format|
if @themengruppe.save
format.html { redirect_to @themengruppe, notice: 'Themengruppe was successfully created.' }
format.json { render json: @themengruppe, status: :created, location: @themengruppe }
else
format.html { render action: "new" }
format.json { render json: @themengruppe.errors, status: :unprocessable_entity }
end
end
end
# PUT /themengruppen/1
# PUT /themengruppen/1.json
def update
@themengruppe = Themengruppe.find(params[:id])
respond_to do |format|
if @themengruppe.update_attributes(params[:themengruppe])
format.html { redirect_to @themengruppe, notice: 'Themengruppe was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @themengruppe.errors, status: :unprocessable_entity }
end
end
end
# DELETE /themengruppen/1
# DELETE /themengruppen/1.json
def destroy
@themengruppe = Themengruppe.find(params[:id])
@themengruppe.destroy
respond_to do |format|
format.html { redirect_to themengruppen_url }
format.json { head :no_content }
end
end
end