Kosmetik
This commit is contained in:
@@ -2,11 +2,11 @@ class ModulsController < ApplicationController
|
|||||||
# GET /moduls
|
# GET /moduls
|
||||||
# GET /moduls.json
|
# GET /moduls.json
|
||||||
def index
|
def index
|
||||||
@moduls = Modul.all
|
@moduls = Modul.all
|
||||||
if @moduls
|
if @moduls
|
||||||
if !params[:studium_id].nil?
|
if !params[:studium_id].nil?
|
||||||
@studium=Studium.find_by_id(params[:studium_id])
|
@studium=Studium.find_by_id(params[:studium_id])
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # index.html.erb
|
format.html # index.html.erb
|
||||||
format.json { render json: @moduls }
|
format.json { render json: @moduls }
|
||||||
@@ -19,7 +19,7 @@ class ModulsController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
@modul = Modul.find(params[:id])
|
@modul = Modul.find(params[:id])
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # show.html.erb
|
format.html # show.html.erb
|
||||||
format.json { render json: @modul }
|
format.json { render json: @modul }
|
||||||
end
|
end
|
||||||
@@ -31,7 +31,7 @@ class ModulsController < ApplicationController
|
|||||||
@modul = Modul.new
|
@modul = Modul.new
|
||||||
modulgruppe=Modulgruppe.find_by_id(params[:modulgruppen_id])
|
modulgruppe=Modulgruppe.find_by_id(params[:modulgruppen_id])
|
||||||
if !modulgruppe.nil?
|
if !modulgruppe.nil?
|
||||||
@modul.modulgruppen<<modulgruppe
|
@modul.modulgruppen<<modulgruppe
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
@@ -42,27 +42,27 @@ class ModulsController < ApplicationController
|
|||||||
# GET /moduls/1/edit
|
# GET /moduls/1/edit
|
||||||
def edit
|
def edit
|
||||||
@modul = Modul.find(params[:id])
|
@modul = Modul.find(params[:id])
|
||||||
if !params[:studium_id].nil?
|
if !params[:studium_id].nil?
|
||||||
@studium=Studium.find(params[:studium_id])
|
@studium=Studium.find(params[:studium_id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# POST /moduls
|
# POST /moduls
|
||||||
# POST /moduls.json
|
# POST /moduls.json
|
||||||
def create
|
def create
|
||||||
@modul = Modul.new(params[:modul])
|
@modul = Modul.new(params[:modul])
|
||||||
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
if @modul.save
|
respond_to do |format|
|
||||||
|
if @modul.save
|
||||||
format.html { redirect_to modulgruppe_path(@modul.modulgruppen.first), notice: 'Modul was successfully created.' }
|
format.html { redirect_to modulgruppe_path(@modul.modulgruppen.first), notice: 'Modul was successfully created.' }
|
||||||
format.json { render json: @modul, status: :created, location: @modul }
|
format.json { render json: @modul, status: :created, location: @modul }
|
||||||
else
|
else
|
||||||
format.html { render action: "new" }
|
format.html { render action: "new" }
|
||||||
format.json { render json: @modul.errors, status: :unprocessable_entity }
|
format.json { render json: @modul.errors, status: :unprocessable_entity }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# PUT /moduls/1
|
# PUT /moduls/1
|
||||||
|
|||||||
@@ -1,25 +1,20 @@
|
|||||||
<p id="notice"><%= notice %></p>
|
<p id="notice"><%= notice %></p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Name:</b>
|
<b>Name:</b> <%= @semester.name %>
|
||||||
<%= @semester.name %>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Nummer:</b>
|
<b>Nummer:</b> <%= @semester.nummer %>
|
||||||
<%= @semester.nummer %>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Ws:</b>
|
<b>WS/SS?:</b> <%= @semester.ssws %>
|
||||||
<%= @semester.ws %>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Ss:</b>
|
<%= render :partial =>'lvas/lva_semester', :collection=>@semester.lvas, :as=>:lva%>
|
||||||
<%= @semester.ss %>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<%= link_to 'Edit', edit_semester_path(@semester) %> |
|
<%= link_to 'Edit', edit_semester_path(@semester) %> |
|
||||||
<%= link_to 'Back', semesters_path %>
|
<%= link_to 'Back', semesters_path %>
|
||||||
|
|||||||
@@ -1,29 +1,24 @@
|
|||||||
Fetsite::Application.routes.draw do
|
Fetsite::Application.routes.draw do
|
||||||
|
|
||||||
|
devise_for :users
|
||||||
|
resources :home, :only=>[:index]
|
||||||
|
#get 'home',:controller=>home,:action=>:index,:as=>"home_index"
|
||||||
|
scope '(:locale)/admin' do
|
||||||
|
resources :users
|
||||||
|
get 'config',:controller=>:config,:action=>:index , :as => 'config'
|
||||||
|
get 'config/get_git_update',:controller=>:config,:action=>:get_git_update, :as=>'config_getgitupdate'
|
||||||
|
get 'config/get_git_update',:controller=>:config,:action=>:get_git_update
|
||||||
|
end
|
||||||
|
|
||||||
|
devise_for :users
|
||||||
|
|
||||||
|
resources :pages, :except => [:index] do
|
||||||
|
member do
|
||||||
devise_for :users
|
post 'preview'
|
||||||
resources :home, :only=>[:index]
|
end
|
||||||
#get 'home',:controller=>home,:action=>:index,:as=>"home_index"
|
end
|
||||||
scope '(:locale)/admin' do
|
get 'pages', :to =>'pages#show'
|
||||||
resources :users
|
scope '(:locale)' do
|
||||||
get 'config',:controller=>:config,:action=>:index , :as => 'config'
|
|
||||||
get 'config/get_git_update',:controller=>:config,:action=>:get_git_update, :as=>'config_getgitupdate'
|
|
||||||
get 'config/get_git_update',:controller=>:config,:action=>:get_git_update
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
devise_for :users
|
|
||||||
|
|
||||||
resources :pages, :except => [:index] do
|
|
||||||
member do
|
|
||||||
post 'preview'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
get 'pages', :to =>'pages#show'
|
|
||||||
scope '(:locale)' do
|
|
||||||
resources :studien, :only=>[:show,:new,:edit,:update,:destroy]
|
resources :studien, :only=>[:show,:new,:edit,:update,:destroy]
|
||||||
resources :modulgruppen,:only =>[:create,:index]
|
resources :modulgruppen,:only =>[:create,:index]
|
||||||
resources :studien,:except=>[:show,:new,:edit,:update,:destroy], :shallow=>true do
|
resources :studien,:except=>[:show,:new,:edit,:update,:destroy], :shallow=>true do
|
||||||
@@ -36,7 +31,7 @@ scope '(:locale)' do
|
|||||||
get 'rubriken/verwalten', :controller=>:rubriken, :action=>:alle_verwalten, :as=>'alle_verwalten_rubrik'
|
get 'rubriken/verwalten', :controller=>:rubriken, :action=>:alle_verwalten, :as=>'alle_verwalten_rubrik'
|
||||||
|
|
||||||
resources :rubriken do
|
resources :rubriken do
|
||||||
resources :neuigkeiten, :only=>[:new, :show]
|
resources :neuigkeiten, :only=>[:new, :show]
|
||||||
end
|
end
|
||||||
put 'rubriken/(:id)/addmoderator',:controller=>:rubriken,:action=>:addmoderator
|
put 'rubriken/(:id)/addmoderator',:controller=>:rubriken,:action=>:addmoderator
|
||||||
get 'rubriken/:id/verwalten',:controller=>:rubriken,:action=>:verwalten, :as=>'verwalten_rubrik'
|
get 'rubriken/:id/verwalten',:controller=>:rubriken,:action=>:verwalten, :as=>'verwalten_rubrik'
|
||||||
@@ -44,7 +39,7 @@ scope '(:locale)' do
|
|||||||
get 'home/dev', :controller=>:home, :action=>:dev, :as=>'home_dev'
|
get 'home/dev', :controller=>:home, :action=>:dev, :as=>'home_dev'
|
||||||
resources :beispiele
|
resources :beispiele
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# The priority is based upon order of creation:
|
# The priority is based upon order of creation:
|
||||||
# first created -> highest priority.
|
# first created -> highest priority.
|
||||||
@@ -96,7 +91,7 @@ scope '(:locale)' do
|
|||||||
# You can have the root of your site routed with "root"
|
# You can have the root of your site routed with "root"
|
||||||
# just remember to delete public/index.html.
|
# just remember to delete public/index.html.
|
||||||
|
|
||||||
root :to => 'home#index'
|
root :to => 'home#index'
|
||||||
|
|
||||||
# See how all your routes lay out with "rake routes"
|
# See how all your routes lay out with "rake routes"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user