diff --git a/Gemfile b/Gemfile index 19612ae..2cbf68f 100755 --- a/Gemfile +++ b/Gemfile @@ -69,3 +69,4 @@ gem 'haml' #gem 'RedCloth' #gem 'gollum' gem 'awesome_nested_set' +gem 'annotate', ">=2.5.0" diff --git a/Gemfile.lock b/Gemfile.lock index 41200a8..7381438 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,6 +28,8 @@ GEM activesupport (3.2.9) i18n (~> 0.6) multi_json (~> 1.0) + annotate (2.5.0) + rake arel (3.0.2) awesome_nested_set (2.1.6) activerecord (>= 3.0.0) @@ -151,6 +153,7 @@ PLATFORMS x86-mingw32 DEPENDENCIES + annotate (>= 2.5.0) awesome_nested_set bootstrap-sass (~> 2.2.0) cancan diff --git a/app/doc/Ability.html b/app/doc/Ability.html new file mode 100644 index 0000000..af4e501 --- /dev/null +++ b/app/doc/Ability.html @@ -0,0 +1,283 @@ + + + +
+ + +# File models/ability.rb, line 3 + def initialize(user) + # Define abilities for the passed in user here. For example: + # + # if user.admin? + # can :manage, :all + # else + # can :read, :all + # end + # The first argument to `can` is the action you are giving the user permission to do. + # If you pass :manage it will apply to every action. Other common actions here are + # :read, :create, :update and :destroy. + # + # The second argument is the resource the user can perform the action on. If you pass + # :all it will apply to every resource. Otherwise pass a Ruby class of the resource. + # + # The third argument is an optional hash of conditions to further filter the objects. + # For example, here the user can only update published articles. + # + # can :update, Article, :published => true + # + # See the wiki for details: https://github.com/ryanb/cancan/wiki/Defining-Abilitiescan :manage, :all + + user ||= User.new # guest user (not logged in) + + + # For Debug allow everything + # Remove this line in production environment and for testing user management + can :manage, :all + + # Rechteverwaltung f�r Studien Modul + can :read, Modulgruppe + can :manage, Modulgruppe + + + + # Rechteverwaltung fuer Neuigkeiten + +# can :write, Neuigkeit if user.has_role?("newsmoderator", Neuigkeit.rubrik) + + if user.has_role? "newsadmin" + can :addmoderator, Rubrik + end + + + + end+
ActionController::Base + +
# File controllers/application_controller.rb, line 15 +def default_url_options + {locale: I18n.locale} +end+
# File controllers/application_controller.rb, line 5 +def set_i18n_locale_from_params + if params[:locale] + if I18n.available_locales.include?(params[:locale].to_sym) + I18n.locale=params[:locale].to_sym + else + flash.now[:notice]= "#{params[:locale]} translation not available" + logger.error flash.now[:notice] + end + end +end+
# File helpers/application_helper.rb, line 2 +def current_url(overwrite={}) + url_for :params => params.merge(overwrite).except(:controller,:action) +end+
# File helpers/application_helper.rb, line 5 +def switch_locale_url(target_locale) + current_url({:locale=>target_locale}) .sub "/"+I18n.locale.to_s+"/", "/"+target_locale.to_s+"/" + +end+
# File helpers/application_helper.rb, line 9 + def toolbar_html(elemente) + html = "" + limiter = " | " + elemente.each do |e| + if !e[:icon].nil? + case e[:icon] + when :pencil + text = '<i class="icon-pencil"></i>'.html_safe + e[:text] + when :plus + text ='<i class="icon-plus"></i>'.html_safe+e[:text] + else + text = e[:text] + end + else + text =e[:text] + end + if e[:link].nil? + if !e[:method].nil? + if !e[:confirm].nil? + html = html + link_to(text,e[:path],:confirm=>e[:confirm],:method=>e[:method]) + else + html = html + link_to(text,e[:path],:method => e[:method]) + end + else + if !e[:confirm].nil? + html=html + link_to(text,e[:path],:confirm=>e[:confirm]) + else + html= html + link_to(text,e[:path]) + end + + end + else + html = html + e[:link] + end + + html=html+limiter + end + raw(html) +end+
ActiveRecord::Base + +
Table name: beispiele
+ +id :integer not null, primary key +name :string(255) +desc :text +lva_id :integer +created_at :datetime not null +updated_at :datetime not null +file_file_name :string(255) +file_content_type :string(255) +file_file_size :integer +file_updated_at :datetime+ +
POST /beispiele POST /beispiele.json
+ + + +# File controllers/beispiele_controller.rb, line 42 +def create + @beispiel = Beispiel.new(params[:beispiel]) + + respond_to do |format| + if @beispiel.save + format.html { redirect_to @beispiel, notice: 'Beispiel was successfully created.' } + format.json { render json: @beispiel, status: :created, location: @beispiel } + else + format.html { render action: "new" } + format.json { render json: @beispiel.errors, status: :unprocessable_entity } + end + end +end+
DELETE /beispiele/1 DELETE /beispiele/1.json
+ + + +# File controllers/beispiele_controller.rb, line 74 +def destroy + @beispiel = Beispiel.find(params[:id]) + @beispiel.destroy + + respond_to do |format| + format.html { redirect_to beispiele_url } + format.json { head :no_content } + end +end+
GET /beispiele/1/edit
+ + + +# File controllers/beispiele_controller.rb, line 36 +def edit + @beispiel = Beispiel.find(params[:id]) +end+
GET /beispiele GET /beispiele.json
+ + + +# File controllers/beispiele_controller.rb, line 4 +def index + @beispiele = Beispiel.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @beispiele } + end +end+
GET /beispiele/new GET /beispiele/new.json
+ + + +# File controllers/beispiele_controller.rb, line 26 +def new + @beispiel = Beispiel.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @beispiel } + end +end+
GET /beispiele/1 GET /beispiele/1.json
+ + + +# File controllers/beispiele_controller.rb, line 15 +def show + @beispiel = Beispiel.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @beispiel } + end +end+
PUT /beispiele/1 PUT /beispiele/1.json
+ + + +# File controllers/beispiele_controller.rb, line 58 +def update + @beispiel = Beispiel.find(params[:id]) + + respond_to do |format| + if @beispiel.update_attributes(params[:beispiel]) + format.html { redirect_to @beispiel, notice: 'Beispiel was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @beispiel.errors, status: :unprocessable_entity } + end + end +end+
# File controllers/config_controller.rb, line 5 + def get_git_update + g = Git.open(".") + + flash[:notice] ="Test" +# flash[:notice] =g.remote("github").fetch + redirect_to config_url + + end+
# File controllers/config_controller.rb, line 2 +def index + +end+
ActionMailer::Base + +
# File controllers/home_controller.rb, line 4 +def dev + +end+
# File controllers/home_controller.rb, line 2 +def index +end+
ActiveRecord::Base + +
Table name: lvas
+ +id :integer not null, primary key +name :string(255) +desc :text +ects :decimal(, ) +lvanr :string(255) +stunden :decimal(, ) +created_at :datetime not null +updated_at :datetime not null +modul_id :integer +semester_id :integer+ +
Andreas Stephanides
+GPL
+Dieses Model repräsentiert eine LVA. Die notwendigen Informationen können +mit TISS (dem Online System der TU Wien) synchronisiert werden
+ +POST /lvas POST /lvas.json
+ + + +# File controllers/lvas_controller.rb, line 32 +def create + @lva = Lva.new(params[:lva]) + + respond_to do |format| + if @lva.save + format.html { redirect_to @lva, notice: 'Lva was successfully created.' } + + else + format.html { render action: "new" } + + end + end +end+
DELETE /lvas/1 DELETE /lvas/1.json
+ + + +# File controllers/lvas_controller.rb, line 64 +def destroy + @lva = Lva.find(params[:id]) + @lva.destroy + + respond_to do |format| + format.html { redirect_to lvas_url } + + end +end+
GET /lvas/1/edit
+ + + +# File controllers/lvas_controller.rb, line 26 +def edit + @lva = Lva.find(params[:id]) +end+
# File controllers/lvas_controller.rb, line 4 +def index + @lvas = Lva.all + +end+
GET /lvas/new GET /lvas/new.json
+ + + +# File controllers/lvas_controller.rb, line 18 +def new + @lva = Lva.new + modul=Modul.find(params[:modul_id]) + @lva.modul<<modul + +end+
GET /lvas/1
+ + + +# File controllers/lvas_controller.rb, line 11 +def show + @lva = Lva.find(params[:id]) + @toolbar_elements<<{:icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_lva_path(@lva)} +end+
PUT /lvas/1 PUT /lvas/1.json
+ + + +# File controllers/lvas_controller.rb, line 48 +def update + @lva = Lva.find(params[:id]) + + respond_to do |format| + if @lva.update_attributes(params[:lva]) + format.html { redirect_to @lva, notice: 'Lva was successfully updated.' } + + else + format.html { render action: "edit" } + + end + end +end+
ActiveRecord::Base + +
Table name: moduls
+ +id :integer not null, primary key +name :string(255) +desc :text +depend :text +created_at :datetime not null +updated_at :datetime not null+ +
ActiveRecord::Base + +
Table name: modulgruppen
+ +id :integer not null, primary key +typ :string(255) +phase :integer +name :string(255) +desc :text +studium_id :integer +created_at :datetime not null +updated_at :datetime not null+ +
POST /modulgruppen
+ + + +# File controllers/modulgruppen_controller.rb, line 44 +def create + @modulgruppe = Modulgruppe.new(params[:modulgruppe]) + if !params[:studium_id].nil? + @studium=Studium.find(params[:studium_id]) + else + @studium=Studium.find(params[:modulgruppe][:studium_id]) + end + respond_to do |format| + if @modulgruppe.save + format.html { redirect_to @modulgruppe, notice: 'Modulgruppe was successfully created.' } + + else + format.html { render action: "new" } + + end + end +end+
DELETE /modulgruppen/1
+ + + +# File controllers/modulgruppen_controller.rb, line 79 +def destroy + @modulgruppe = Modulgruppe.find(params[:id]) + @modulgruppe.destroy + + respond_to do |format| + format.html { redirect_to modulgruppen_url } + + end +end+
GET /modulgruppen/1/edit
+ + + +# File controllers/modulgruppen_controller.rb, line 35 +def edit + @modulgruppe = Modulgruppe.find(params[:id]) + if !params[:studium_id].nil? +@studium=Studium.find(params[:studium_id]) +end +end+
# File controllers/modulgruppen_controller.rb, line 6 + def index + @modulgruppen = Modulgruppe.all +if !params[:studium_id].nil? + @studium=Studium.find(params[:studium_id]) + end + + end+
GET /modulgruppen/new
+ + + +# File controllers/modulgruppen_controller.rb, line 26 + def new + @modulgruppe = Modulgruppe.new +if !params[:studium_id].nil? + @studium=Studium.find(params[:studium_id]) + end + + end+
GET /modulgruppen/1
+ + + +# File controllers/modulgruppen_controller.rb, line 16 + def show + @modulgruppe = Modulgruppe.find(params[:id]) +if !params[:studium_id].nil? + @studium=Studium.find(params[:studium_id]) + end + + end+
# File controllers/modulgruppen_controller.rb, line 63 +def update + @modulgruppe = Modulgruppe.find(params[:id]) + + respond_to do |format| + if @modulgruppe.update_attributes(params[:modulgruppe]) + format.html { redirect_to @modulgruppe, notice: 'Modulgruppe was successfully updated.' } + + else + format.html { render action: "edit" } + + end + end +end+
POST /moduls POST /moduls.json
+ + + +# File controllers/moduls_controller.rb, line 48 +def create + @modul = Modul.new(params[:modul]) + + + respond_to do |format| + if @modul.save + format.html { redirect_to modulgruppe_path(@modul.modulgruppen.first), notice: 'Modul was successfully created.' } + format.json { render json: @modul, status: :created, location: @modul } + else + format.html { render action: "new" } + format.json { render json: @modul.errors, status: :unprocessable_entity } + end + end + +end+
DELETE /moduls/1 DELETE /moduls/1.json
+ + + +# File controllers/moduls_controller.rb, line 82 +def destroy + + @modul = Modul.find(params[:id]) + modulgruppe=@modul.modulgruppen.first + @modul.destroy + + + redirect_to modulgruppe_path(modulgruppe) + +end+
GET /moduls/1/edit
+ + + +# File controllers/moduls_controller.rb, line 39 +def edit + @modul = Modul.find(params[:id]) + if !params[:studium_id].nil? +@studium=Studium.find(params[:studium_id]) +end +end+
GET /moduls GET /moduls.json
+ + + +# File controllers/moduls_controller.rb, line 4 +def index + @moduls = Modul.all + if !params[:studium_id].nil? +@studium=Studium.find(params[:studium_id]) +end + respond_to do |format| + format.html # index.html.erb + format.json { render json: @moduls } + end +end+
GET /moduls/new GET /moduls/new.json
+ + + +# File controllers/moduls_controller.rb, line 28 +def new + @modul = Modul.new + modulgruppe=Modulgruppe.find(params[:modulgruppen_id]) + @modul.modulgruppen<<modulgruppe + respond_to do |format| + format.html # new.html.erb + format.json { render json: @modul } + end +end+
GET /moduls/1 GET /moduls/1.json
+ + + +# File controllers/moduls_controller.rb, line 17 +def show + @modul = Modul.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @modul } + end +end+
PUT /moduls/1 PUT /moduls/1.json
+ + + +# File controllers/moduls_controller.rb, line 66 +def update + @modul = Modul.find(params[:id]) + + respond_to do |format| + if @modul.update_attributes(params[:modul]) + format.html { redirect_to url_for(@modul), notice: 'Modul was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @modul.errors, status: :unprocessable_entity } + end + end +end+
ActiveRecord::Base + +
Table name: neuigkeiten
+ +id :integer not null, primary key +title :string(255) +text :text +datum :datetime +rubrik_id :integer +created_at :datetime not null +updated_at :datetime not null+ +
# File controllers/neuigkeiten_controller.rb, line 26 +def create + @neuigkeit = Neuigkeit.new(params[:neuigkeit]) + + respond_to do |format| + if @neuigkeit.save + format.html { redirect_to @neuigkeit, notice: 'Neuigkeit was successfully created.' } + + else + format.html { render action: "new" } + + end + end +end+
DELETE /neuigkeiten/1 DELETE /neuigkeiten/1.json
+ + + +# File controllers/neuigkeiten_controller.rb, line 57 +def destroy + @neuigkeit = Neuigkeit.find(params[:id]) + @neuigkeit.destroy + + respond_to do |format| + format.html { redirect_to neuigkeiten_url } + + end +end+
# File controllers/neuigkeiten_controller.rb, line 22 +def edit + @neuigkeit = Neuigkeit.find(params[:id]) +end+
# File controllers/neuigkeiten_controller.rb, line 3 +def index + @neuigkeiten = Neuigkeit.all +end+
# File controllers/neuigkeiten_controller.rb, line 15 + def new + @neuigkeit = Neuigkeit.new + @rubrik=Rubrik.find(params[:rubrik_id]) + @neuigkeit.rubrik=@rubrik +end+
# File controllers/neuigkeiten_controller.rb, line 8 +def show + @neuigkeit = Neuigkeit.find(params[:id]) + if can? :edit, @neuigkeit + @toolbar_elements << {:text=>I18n.t('common.edit'),:path=>edit_neuigkeit_path(@neuigkeit),:icon=>:pencil} + end +end+
# File controllers/neuigkeiten_controller.rb, line 41 +def update + @neuigkeit = Neuigkeit.find(params[:id]) + + respond_to do |format| + if @neuigkeit.update_attributes(params[:neuigkeit]) + format.html { redirect_to @neuigkeit, notice: 'Neuigkeit was successfully updated.' } + + else + format.html { render action: "edit" } + + end + end +end+
ActiveRecord::Base + +
Table name: roles
+ +id :integer not null, primary key +name :string(255) +resource_id :integer +resource_type :string(255) +created_at :datetime not null +updated_at :datetime not null+ +
ActiveRecord::Base + +
Table name: rubriken
+ +id :integer not null, primary key +name :string(255) +desc :text +prio :integer +created_at :datetime not null +updated_at :datetime not null+ +
# File models/rubrik.rb, line 17 +def moderator + u=User.with_role(:newsmoderator).first + if !u.nil? + u.id + end +end+
# File controllers/rubriken_controller.rb, line 36 +def addmoderator + @rubrik = Rubrik.find(params[:id]) + if can? :addmoderator, @rubrik + if params[:moderator].nil? + current_user.add_role(:newsmoderator,@rubrik) + else + User.find(params[:moderator]).add_role(:newsmoderator, @rubrik) + end + + response_notice= I18n.t("rubrik/moderatoradded") + else + response_notice= I18n.t("rubrik/moderatoraddnorights") + end + respond_to do |format| + format.html { redirect_to @rubrik,:notice => response_notice } + end +end+
# File controllers/rubriken_controller.rb, line 70 +def alle_verwalten +@rubriken =Rubrik.all +end+
# File controllers/rubriken_controller.rb, line 24 +def create + @rubrik = Rubrik.new(params[:rubrik]) + + respond_to do |format| + if @rubrik.save + format.html { redirect_to @rubrik, notice: 'Rubrik was successfully created.' } + else + format.html { render action: "new" } + end + end +end+
DELETE /rubriken/1 DELETE /rubriken/1.json
+ + + +# File controllers/rubriken_controller.rb, line 75 +def destroy + @rubrik = Rubrik.find(params[:id]) + @rubrik.destroy + redirect_to rubriken_url +end+
# File controllers/rubriken_controller.rb, line 19 +def edit + @rubrik = Rubrik.find(params[:id]) +end+
# File controllers/rubriken_controller.rb, line 3 +def index + @rubriken = Rubrik.all + +end+
# File controllers/rubriken_controller.rb, line 14 +def new + @rubrik = Rubrik.new + +end+
# File controllers/rubriken_controller.rb, line 9 +def show + @rubrik = Rubrik.find(params[:id]) + @moderatoren=User.with_role(:newsmoderator,@rubrik) +end+
# File controllers/rubriken_controller.rb, line 53 +def update + @rubrik = Rubrik.find(params[:id]) + + respond_to do |format| + if @rubrik.update_attributes(params[:rubrik]) + format.html { redirect_to @rubrik, notice: 'Rubrik was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @rubrik.errors, status: :unprocessable_entity } + end + end +end+
# File controllers/rubriken_controller.rb, line 66 +def verwalten +@rubrik = Rubrik.find(params[:id]) +@moderatoren=User.with_role(:newsmoderator,@rubrik) +end+
ActiveRecord::Base + +
Table name: semesters
+ +id :integer not null, primary key +name :string(255) +nummer :integer +studium_id :integer +ssws :string(255) +created_at :datetime not null +updated_at :datetime not null+ +
# File controllers/semesters_controller.rb, line 21 +def create + @semester = Semester.new(params[:semester]) + + respond_to do |format| + if @semester.save + format.html { redirect_to @semester, notice: 'Semester was successfully created.' } + else + format.html { render action: "new" } + end + end +end+
# File controllers/semesters_controller.rb, line 45 + def destroy + @semester = Semester.find(params[:id]) + @semester.destroy +redirect_to semester_url + + end+
# File controllers/semesters_controller.rb, line 17 +def edit + @semester = Semester.find(params[:id]) +end+
# File controllers/semesters_controller.rb, line 3 +def index + @semesters = Semester.all +end+
# File controllers/semesters_controller.rb, line 13 +def new + @semester = Semester.new +end+
# File controllers/semesters_controller.rb, line 8 +def show + @semester = Semester.find(params[:id]) + +end+
# File controllers/semesters_controller.rb, line 33 +def update + @semester = Semester.find(params[:id]) + + respond_to do |format| + if @semester.update_attributes(params[:semester]) + format.html { redirect_to @semester, notice: 'Semester was successfully updated.' } + else + format.html { render action: "edit" } + end + end +end+
# File controllers/studien_controller.rb, line 44 +def create + @studium = Studium.new(params[:studium]) + respond_to do |format| + if @studium.save + format.html { redirect_to url_for(@studium), notice: 'Studium was successfully created.' } + else + format.html { render action: "new" } + end + end +end+
# File controllers/studien_controller.rb, line 68 +def destroy + @studium = Studium.find(params[:id]) + @studium.destroy + redirect_to studien_url +end+
# File controllers/studien_controller.rb, line 38 +def edit + @studium = Studium.find(params[:id]) + @toolbar_elements=[{:text => I18n.t('studien.anzeigen') , :path => url_for(@studium) }] + @toolbar_elements<<{:text =>I18n.t('studien.allestudien'),:path=>studien_path(@studium)} +end+
# File controllers/studien_controller.rb, line 5 + def index + @studien = Studium.all + @toolbar_elements<<{:icon =>:plus, :text=> I18n.t('studien.new') ,:path=>new_studium_path } +end+
# File controllers/studien_controller.rb, line 34 +def new + @studium = Studium.new +end+
# File controllers/studien_controller.rb, line 10 + def show + @studium= Studium.find(params[:id]) + @studienphasen=[] + [1, 2 ,3].each do |ph| + modulgruppen_phase=@studium.modulgruppen.where(:phase=>ph) + if modulgruppen_phase.count==1 + opts={:width=>12, :slice=>1} + elsif modulgruppen_phase.count <= 4 + opts={:width=>6, :slice=>2} + else + opts={:width=>4, :slice=>3} + end + modulgruppen =[] + modulgruppen_phase.each_slice(opts[:slice]) do |s| + modulgruppen<<s + end + @studienphasen << {:modulgruppen=>modulgruppen, :phase => ph}.merge(opts) + end + @toolbar_elements=[{:icon =>:plus ,:text=> I18n.t('studien.new') , :path => new_studium_modulgruppe_path(@studium) }] + @toolbar_elements<<{:icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_studium_path(@studium)} + @toolbar_elements<<{:text=> I18n.t('common.delete'),:path => studium_path(@studium), :method=> :delete,:confirm=>"Sure?" } +end+
# File controllers/studien_controller.rb, line 56 +def update + @studium = Studium.find(params[:id]) + + if @studium.update_attributes(params[:studium]) + redirect_to url_for(@studium), notice: 'Studium was successfully updated.' + else + render action: "edit" + + end + +end+
ActiveRecord::Base + +
Table name: studien
+ +id :integer not null, primary key +zahl :string(255) +name :string(255) +shortdesc :text +desc :text +typ :string(255) +created_at :datetime not null +updated_at :datetime not null+ +
FormtasticBootstrap::Inputs::TextInput + +
# File inputs/tinymce_text_input.rb, line 2 +def input_html_options + super.merge(:class => "tinymce") +end+
ActiveRecord::Base + +
Table name: users
+ +id :integer not null, primary key
+email :string(255) default(""), not null
+encrypted_password :string(255) default(""), not null
+reset_password_token :string(255)
+reset_password_sent_at :datetime
+remember_created_at :datetime
+sign_in_count :integer default(0)
+current_sign_in_at :datetime
+last_sign_in_at :datetime
+current_sign_in_ip :string(255)
+last_sign_in_ip :string(255)
+confirmation_token :string(255)
+confirmed_at :datetime
+confirmation_sent_at :datetime
+unconfirmed_email :string(255)
+failed_attempts :integer default(0)
+unlock_token :string(255)
+locked_at :datetime
+created_at :datetime not null
+updated_at :datetime not null
+
+ # File controllers/users_controller.rb, line 2 +def index +@users = User.all +end+
This is the API documentation for RDoc Documentation.
+
+
+
+
diff --git a/app/doc/js/darkfish.js b/app/doc/js/darkfish.js
new file mode 100644
index 0000000..f26fd45
--- /dev/null
+++ b/app/doc/js/darkfish.js
@@ -0,0 +1,155 @@
+/**
+ *
+ * Darkfish Page Functions
+ * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
+ *
+ * Author: Michael Granger Table of Contents - RDoc Documentation
+
+
+Classes/Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
diff --git a/app/models/beispiel.rb b/app/models/beispiel.rb
index 584d0ba..13f0764 100755
--- a/app/models/beispiel.rb
+++ b/app/models/beispiel.rb
@@ -1,3 +1,19 @@
+# == Schema Information
+#
+# Table name: beispiele
+#
+# id :integer not null, primary key
+# name :string(255)
+# desc :text
+# lva_id :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+# file_file_name :string(255)
+# file_content_type :string(255)
+# file_file_size :integer
+# file_updated_at :datetime
+#
+
class Beispiel < ActiveRecord::Base
has_paper_trail
attr_accessible :desc, :name, :file, :lva_id
diff --git a/app/models/lva.rb b/app/models/lva.rb
index 7a452d4..83839b9 100755
--- a/app/models/lva.rb
+++ b/app/models/lva.rb
@@ -1,4 +1,19 @@
-##
+# == Schema Information
+#
+# Table name: lvas
+#
+# id :integer not null, primary key
+# name :string(255)
+# desc :text
+# ects :decimal(, )
+# lvanr :string(255)
+# stunden :decimal(, )
+# created_at :datetime not null
+# updated_at :datetime not null
+# modul_id :integer
+# semester_id :integer
+#
+# == Information
# Author:: Andreas Stephanides
# License:: GPL
# Dieses Model repräsentiert eine LVA. Die notwendigen Informationen können mit TISS (dem Online System der TU Wien) synchronisiert werden
diff --git a/app/models/modul.rb b/app/models/modul.rb
index 40b0b95..84fcfca 100755
--- a/app/models/modul.rb
+++ b/app/models/modul.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: moduls
+#
+# id :integer not null, primary key
+# name :string(255)
+# desc :text
+# depend :text
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Modul < ActiveRecord::Base
attr_accessible :desc,:name, :depend, :studium_id, :modulgruppe_ids
diff --git a/app/models/modulgruppe.rb b/app/models/modulgruppe.rb
index 30451e9..f7a3fe6 100755
--- a/app/models/modulgruppe.rb
+++ b/app/models/modulgruppe.rb
@@ -1,3 +1,17 @@
+# == Schema Information
+#
+# Table name: modulgruppen
+#
+# id :integer not null, primary key
+# typ :string(255)
+# phase :integer
+# name :string(255)
+# desc :text
+# studium_id :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Modulgruppe < ActiveRecord::Base
attr_accessible :name, :phase, :typ,:desc, :studium_id
belongs_to :studium, :foreign_key => "studium_id"
diff --git a/app/models/neuigkeit.rb b/app/models/neuigkeit.rb
index c03e526..5f41df6 100755
--- a/app/models/neuigkeit.rb
+++ b/app/models/neuigkeit.rb
@@ -1,3 +1,16 @@
+# == Schema Information
+#
+# Table name: neuigkeiten
+#
+# id :integer not null, primary key
+# title :string(255)
+# text :text
+# datum :datetime
+# rubrik_id :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Neuigkeit < ActiveRecord::Base
attr_accessible :datum, :text, :title, :rubrik_id
belongs_to :author, :class_name =>'User'
diff --git a/app/models/role.rb b/app/models/role.rb
index 145baa7..8da866d 100755
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: roles
+#
+# id :integer not null, primary key
+# name :string(255)
+# resource_id :integer
+# resource_type :string(255)
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Role < ActiveRecord::Base
has_and_belongs_to_many :users, :join_table => :users_roles
belongs_to :resource, :polymorphic => true
diff --git a/app/models/rubrik.rb b/app/models/rubrik.rb
index b0122bd..99b150c 100755
--- a/app/models/rubrik.rb
+++ b/app/models/rubrik.rb
@@ -1,3 +1,15 @@
+# == Schema Information
+#
+# Table name: rubriken
+#
+# id :integer not null, primary key
+# name :string(255)
+# desc :text
+# prio :integer
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Rubrik < ActiveRecord::Base
attr_accessible :desc, :name, :prio
has_many :neuigkeiten, :class_name => "Neuigkeit"
diff --git a/app/models/semester.rb b/app/models/semester.rb
index 13cb02d..ca866b6 100755
--- a/app/models/semester.rb
+++ b/app/models/semester.rb
@@ -1,3 +1,16 @@
+# == Schema Information
+#
+# Table name: semesters
+#
+# id :integer not null, primary key
+# name :string(255)
+# nummer :integer
+# studium_id :integer
+# ssws :string(255)
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Semester < ActiveRecord::Base
has_and_belongs_to_many :lvas
attr_accessible :name, :nummer, :ss, :ws
diff --git a/app/models/studium.rb b/app/models/studium.rb
index d67e8a6..dea3dae 100755
--- a/app/models/studium.rb
+++ b/app/models/studium.rb
@@ -1,3 +1,17 @@
+# == Schema Information
+#
+# Table name: studien
+#
+# id :integer not null, primary key
+# zahl :string(255)
+# name :string(255)
+# shortdesc :text
+# desc :text
+# typ :string(255)
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Studium < ActiveRecord::Base
attr_accessible :desc, :name, :typ, :zahl
has_many :modulgruppen, inverse_of: :studium, :class_name => "Modulgruppe"
diff --git a/app/models/user.rb b/app/models/user.rb
index 673b7d6..3995a3d 100755
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,3 +1,29 @@
+# == Schema Information
+#
+# Table name: users
+#
+# id :integer not null, primary key
+# email :string(255) default(""), not null
+# encrypted_password :string(255) default(""), not null
+# reset_password_token :string(255)
+# reset_password_sent_at :datetime
+# remember_created_at :datetime
+# sign_in_count :integer default(0)
+# current_sign_in_at :datetime
+# last_sign_in_at :datetime
+# current_sign_in_ip :string(255)
+# last_sign_in_ip :string(255)
+# confirmation_token :string(255)
+# confirmed_at :datetime
+# confirmation_sent_at :datetime
+# unconfirmed_email :string(255)
+# failed_attempts :integer default(0)
+# unlock_token :string(255)
+# locked_at :datetime
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class User < ActiveRecord::Base
rolify
# Include default devise modules. Others available are: