diff --git a/.geanyprojekt b/.geanyprojekt index abc039c..cd9ac3d 100644 --- a/.geanyprojekt +++ b/.geanyprojekt @@ -23,38 +23,46 @@ long_line_behaviour=1 long_line_column=72 [files] -current_page=1 +current_page=31 FILE_NAME_0=29;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.html.erb;0;4 -FILE_NAME_1=58;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2F_tabs.html.erb;0;4 +FILE_NAME_1=573;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2F_tabs.html.erb;0;4 FILE_NAME_2=1179;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fability.rb;0;4 FILE_NAME_3=115;None;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.ics.erb;0;4 FILE_NAME_4=454;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fusers_controller.rb;0;4 FILE_NAME_5=571;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Fdevise.rb;0;4 -FILE_NAME_6=627;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fneuigkeit.rb;0;4 -FILE_NAME_7=421;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fmodulgruppe.rb;0;4 -FILE_NAME_8=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Flva.rb;0;4 -FILE_NAME_9=363;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fthema.rb;0;4 -FILE_NAME_10=255;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130124000300_translate_lvas.rb;0;4 -FILE_NAME_11=222;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818161841_translate_neuigkeiten.rb;0;4 -FILE_NAME_12=1383;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Finflections.rb;0;4 -FILE_NAME_13=1010;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4 -FILE_NAME_14=615;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4 -FILE_NAME_15=844;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4 -FILE_NAME_16=114;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4 -FILE_NAME_17=191;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805143719_create_themen.rb;0;4 -FILE_NAME_18=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130112110800_create_semesters.rb;0;4 -FILE_NAME_19=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130113160023_create_versions.rb;0;4 -FILE_NAME_20=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2Fshow.html.erb;0;4 -FILE_NAME_21=161;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2F_tabs.html.erb;0;4 -FILE_NAME_22=439;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fapplication.html.erb;0;4 -FILE_NAME_23=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fusers%2Findex.html.erb;0;4 -FILE_NAME_24=3143;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmoduls_controller.rb;0;4 -FILE_NAME_25=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fconfig_controller.rb;0;4 -FILE_NAME_26=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmodulgruppen_controller.rb;0;4 -FILE_NAME_27=783;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fmenu.html.erb;0;4 +FILE_NAME_6=883;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fmodulgruppe.rb;0;4 +FILE_NAME_7=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Flva.rb;0;4 +FILE_NAME_8=363;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fthema.rb;0;4 +FILE_NAME_9=255;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130124000300_translate_lvas.rb;0;4 +FILE_NAME_10=222;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818161841_translate_neuigkeiten.rb;0;4 +FILE_NAME_11=1383;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Finflections.rb;0;4 +FILE_NAME_12=1010;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4 +FILE_NAME_13=615;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4 +FILE_NAME_14=844;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4 +FILE_NAME_15=114;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4 +FILE_NAME_16=169;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805143719_create_themen.rb;0;4 +FILE_NAME_17=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130112110800_create_semesters.rb;0;4 +FILE_NAME_18=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130113160023_create_versions.rb;0;4 +FILE_NAME_19=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2Fshow.html.erb;0;4 +FILE_NAME_20=161;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2F_tabs.html.erb;0;4 +FILE_NAME_21=439;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fapplication.html.erb;0;4 +FILE_NAME_22=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fusers%2Findex.html.erb;0;4 +FILE_NAME_23=3143;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmoduls_controller.rb;0;4 +FILE_NAME_24=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fconfig_controller.rb;0;4 +FILE_NAME_25=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmodulgruppen_controller.rb;0;4 +FILE_NAME_26=783;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fmenu.html.erb;0;4 +FILE_NAME_27=375;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fneuigkeiten%2Fshow.html.erb;0;4 +FILE_NAME_28=1;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fneuigkeiten%2F_neuigkeit.html.erb;0;4 +FILE_NAME_29=1;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fstudien%2Fshow.html.erb;0;4 +FILE_NAME_30=658;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fcalentry.rb;0;4 +FILE_NAME_31=218;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130823084252_add_object_to_calentries.rb;0;4 +FILE_NAME_32=1069;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Ffetprofiles%2F_form.html.erb;0;4 +FILE_NAME_33=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fbeispiel.rb;0;4 +FILE_NAME_34=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fcalendar.rb;0;4 +FILE_NAME_35=477;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Frubrik.rb;0;4 [gproject] -source_patterns=*.rb;*.erb +source_patterns=*.rb;*.erb; header_patterns=*.h;*.H;*.hpp;*.hxx;*.h++;*.hh;*.m; ignored_dirs_patterns=.*;CVS; generate_tags=false diff --git a/app/models/attachment.rb b/app/models/attachment.rb index fe3d597..f375f87 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: attachments +# +# id :integer not null, primary key +# name :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# thema_id :integer +# + class Attachment < ActiveRecord::Base has_paper_trail attr_accessible :name diff --git a/app/models/beispiel.rb b/app/models/beispiel.rb index 2ad10de..d779617 100755 --- a/app/models/beispiel.rb +++ b/app/models/beispiel.rb @@ -2,16 +2,13 @@ # # 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 +# id :integer not null, primary key +# name :string(255) +# desc :text +# lva_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# beispieldatei :string(255) # class Beispiel < ActiveRecord::Base diff --git a/app/models/calendar.rb b/app/models/calendar.rb index 5f317b1..92e6c15 100644 --- a/app/models/calendar.rb +++ b/app/models/calendar.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: calendars +# +# id :integer not null, primary key +# name :string(255) +# public :boolean +# created_at :datetime not null +# updated_at :datetime not null +# picture :string(255) +# + class Calendar < ActiveRecord::Base attr_accessible :name, :public, :picture has_and_belongs_to_many :calentries diff --git a/app/models/calentry.rb b/app/models/calentry.rb index a69f5de..9dbc178 100644 --- a/app/models/calentry.rb +++ b/app/models/calentry.rb @@ -1,3 +1,16 @@ +# == Schema Information +# +# Table name: calentries +# +# id :integer not null, primary key +# start :datetime +# ende :datetime +# summary :string(255) +# typ :integer +# created_at :datetime not null +# updated_at :datetime not null +# + class Calentry < ActiveRecord::Base attr_accessible :ende, :start, :summary, :typ,:calendar_ids has_and_belongs_to_many :calendars @@ -8,6 +21,8 @@ class Calentry < ActiveRecord::Base errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein") end end + belongs_to :object, polymorphic: true + resourcify def start_time start diff --git a/app/models/fetprofile.rb b/app/models/fetprofile.rb index 87a402d..fba5c01 100644 --- a/app/models/fetprofile.rb +++ b/app/models/fetprofile.rb @@ -1,3 +1,19 @@ +# == Schema Information +# +# Table name: fetprofiles +# +# id :integer not null, primary key +# vorname :string(255) +# nachname :string(255) +# short :string(255) +# fetmailalias :string(255) +# desc :text +# picture :string(255) +# active :boolean +# created_at :datetime not null +# updated_at :datetime not null +# + class Fetprofile < ActiveRecord::Base attr_accessible :active, :desc, :fetmailalias, :nachname, :picture, :short, :vorname has_many :memberships diff --git a/app/models/fetznedition.rb b/app/models/fetznedition.rb index ff3046d..54fda42 100644 --- a/app/models/fetznedition.rb +++ b/app/models/fetznedition.rb @@ -1,3 +1,16 @@ +# == Schema Information +# +# Table name: fetzneditions +# +# id :integer not null, primary key +# title :string(255) +# desc :text +# datum :date +# datei :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + class Fetznedition < ActiveRecord::Base attr_accessible :datei, :datum, :desc, :title end diff --git a/app/models/foto.rb b/app/models/foto.rb index bcd6a2b..cbe9761 100644 --- a/app/models/foto.rb +++ b/app/models/foto.rb @@ -1,3 +1,16 @@ +# == Schema Information +# +# Table name: fotos +# +# id :integer not null, primary key +# title :string(255) +# desc :text +# gallery_id :integer +# datei :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + class Foto < ActiveRecord::Base attr_accessible :datei, :desc, :gallery_id, :title belongs_to :gallery diff --git a/app/models/frage.rb b/app/models/frage.rb index 0508fc2..beed787 100644 --- a/app/models/frage.rb +++ b/app/models/frage.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: fragen +# +# id :integer not null, primary key +# title :string(255) +# text :text +# created_at :datetime not null +# updated_at :datetime not null +# thema_id :integer +# + class Frage < ActiveRecord::Base attr_accessible :text, :title, :thema_id belongs_to :thema diff --git a/app/models/gallery.rb b/app/models/gallery.rb index 0b0f977..ac5e8c9 100644 --- a/app/models/gallery.rb +++ b/app/models/gallery.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: galleries +# +# id :integer not null, primary key +# name :string(255) +# desc :text +# datum :date +# created_at :datetime not null +# updated_at :datetime not null +# + class Gallery < ActiveRecord::Base attr_accessible :datum, :desc, :name has_many :fotos diff --git a/app/models/gremium.rb b/app/models/gremium.rb index ef6710f..2b0d20b 100644 --- a/app/models/gremium.rb +++ b/app/models/gremium.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: gremien +# +# id :integer not null, primary key +# name :string(255) +# desc :text +# typ :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + class Gremium < ActiveRecord::Base attr_accessible :desc, :name, :typ has_many :memberships diff --git a/app/models/lecturer.rb b/app/models/lecturer.rb index 664e612..f860542 100644 --- a/app/models/lecturer.rb +++ b/app/models/lecturer.rb @@ -1,3 +1,16 @@ +# == Schema Information +# +# Table name: lecturers +# +# id :integer not null, primary key +# name :string(255) +# email :string(255) +# oid :integer +# picture :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + class Lecturer < ActiveRecord::Base attr_accessible :email, :name, :oid, :picture, :remove_picture, :picture_cache, :lva_ids, :link has_and_belongs_to_many :lvas diff --git a/app/models/lva.rb b/app/models/lva.rb index 68cb831..a649467 100755 --- a/app/models/lva.rb +++ b/app/models/lva.rb @@ -1,4 +1,23 @@ # -*- coding: utf-8 -*- +# == 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 +# pruefungsinformation :text +# lernaufwand :text +# typ :string(255) +# + # == Schema Information # # Table name: lvas diff --git a/app/models/membership.rb b/app/models/membership.rb index a1c876e..ad17ee4 100644 --- a/app/models/membership.rb +++ b/app/models/membership.rb @@ -1,3 +1,17 @@ +# == Schema Information +# +# Table name: memberships +# +# id :integer not null, primary key +# fetprofile_id :string(255) +# gremium_id :string(255) +# start :date +# stop :date +# typ :string(255) +# created_at :datetime not null +# updated_at :datetime not null +# + class Membership < ActiveRecord::Base attr_accessible :fetprofile_id, :gremium_id, :start, :stop, :typ belongs_to :fetprofile diff --git a/app/models/neuigkeit.rb b/app/models/neuigkeit.rb index e2b655e..c258806 100755 --- a/app/models/neuigkeit.rb +++ b/app/models/neuigkeit.rb @@ -9,6 +9,7 @@ # rubrik_id :integer # created_at :datetime not null # updated_at :datetime not null +# author_id :integer # class Neuigkeit < ActiveRecord::Base @@ -19,4 +20,6 @@ class Neuigkeit < ActiveRecord::Base validates :rubrik, :presence=>true validates :author, :presence=>true translates :title,:text, :versioning=>true, :fallbacks_for_empty_translations => true + scope :published, -> {where("datum >= ?", Time.now.to_date)} + end diff --git a/app/models/studium.rb b/app/models/studium.rb index be8f3be..af783be 100755 --- a/app/models/studium.rb +++ b/app/models/studium.rb @@ -1,4 +1,19 @@ # -*- coding: utf-8 -*- +# == 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 +# abkuerzung :string(255) +# + # == Schema Information # # Table name: studien diff --git a/app/models/thema.rb b/app/models/thema.rb index 64bdea9..5d5797b 100644 --- a/app/models/thema.rb +++ b/app/models/thema.rb @@ -1,3 +1,15 @@ +# == Schema Information +# +# Table name: themen +# +# id :integer not null, primary key +# title :string(255) +# text :text +# created_at :datetime not null +# updated_at :datetime not null +# themengruppe_id :integer +# + class Thema < ActiveRecord::Base attr_accessible :text, :title, :themengruppe_id has_many :fragen diff --git a/app/models/themengruppe.rb b/app/models/themengruppe.rb index 0966914..7cee6f8 100644 --- a/app/models/themengruppe.rb +++ b/app/models/themengruppe.rb @@ -1,3 +1,14 @@ +# == Schema Information +# +# Table name: themengruppen +# +# id :integer not null, primary key +# title :string(255) +# text :text +# created_at :datetime not null +# updated_at :datetime not null +# + class Themengruppe < ActiveRecord::Base WORD_COUNT = 50 attr_accessible :text, :title diff --git a/app/views/fetprofiles/_form.html.erb b/app/views/fetprofiles/_form.html.erb index 4205b13..dcd19db 100644 --- a/app/views/fetprofiles/_form.html.erb +++ b/app/views/fetprofiles/_form.html.erb @@ -21,11 +21,12 @@ <%= semantic_fields_for m do |mf| %>
<%= notice %>
- -<%= render @neuigkeit %> -- Datum: - <%= @neuigkeit.datum %> -
+<%= notice %>
++ <%= @neuigkeit.try(:author).email.to_s %> am + <%= I18n.l @neuigkeit.datum.to_date %>
+
<%= "FOTO" %>