diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index ebdf98f..20524f0 100755 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -99,3 +99,6 @@ box-shadow:none; #contentdiv{ background: #FFFFFF } +#contentdiv .container-fluid +{ padding:0; +} \ No newline at end of file diff --git a/app/assets/stylesheets/fetprofiles.css.scss b/app/assets/stylesheets/fetprofiles.css.scss index 03ed414..501950b 100644 --- a/app/assets/stylesheets/fetprofiles.css.scss +++ b/app/assets/stylesheets/fetprofiles.css.scss @@ -1,3 +1,7 @@ // Place all the styles related to the fetprofiles controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +ul.fetprofile_list li a { +display:block +} \ No newline at end of file diff --git a/app/assets/stylesheets/neuigkeiten.css.scss b/app/assets/stylesheets/neuigkeiten.css.scss index 9324374..b4ac790 100755 --- a/app/assets/stylesheets/neuigkeiten.css.scss +++ b/app/assets/stylesheets/neuigkeiten.css.scss @@ -8,4 +8,7 @@ border: 1px solid #ccc; background: white; padding:10px; +} +div .neuigkeit_block:hover { +box-shadow: 1px 1px 2px 2px lightgray; } \ No newline at end of file diff --git a/app/assets/stylesheets/studien.css.scss b/app/assets/stylesheets/studien.css.scss index 3d04378..6d21e9b 100755 --- a/app/assets/stylesheets/studien.css.scss +++ b/app/assets/stylesheets/studien.css.scss @@ -16,3 +16,9 @@ border-radius:2px; border-color: blue; margin: 5px; } +a.studium { +display:block +} +a.studium:hover { +box-shadow: 1px 1px 2px 2px lightgray; +} diff --git a/app/controllers/fetprofiles_controller.rb b/app/controllers/fetprofiles_controller.rb index 79242f4..3790511 100644 --- a/app/controllers/fetprofiles_controller.rb +++ b/app/controllers/fetprofiles_controller.rb @@ -5,7 +5,7 @@ class FetprofilesController < ApplicationController @fetprofiles = Fetprofile.active.order(:vorname,:nachname) @fetprofiles = Fetprofile.order(:vorname,:nachname) if params[:filter]== "all" - @gremientabs=Gremium.order(:typ) + @gremientabs=Gremium.tabs respond_to do |format| format.html # index.html.erb format.json { render json: @fetprofiles } diff --git a/app/controllers/gremien_controller.rb b/app/controllers/gremien_controller.rb index 042bafc..597b83a 100644 --- a/app/controllers/gremien_controller.rb +++ b/app/controllers/gremien_controller.rb @@ -4,7 +4,7 @@ class GremienController < ApplicationController before_filter {@toolbar_elements=[]} def verwalten @gremien = Gremium.all - @gremientabs=Gremium.all + @gremientabs=Gremium.tabs @toolbar_elements << {:text=>I18n.t('common.new'),:path=>new_gremium_path() ,:icon=>:plus} if can? :new, Gremium respond_to do |format| format.html # index.html.erb @@ -12,11 +12,18 @@ class GremienController < ApplicationController end end + def index + @gremien = Gremium.order(:typ).order(:name) + @gremientabs=Gremium.tabs + + end + + # GET /gremien/1 # GET /gremien/1.json def show @gremium = Gremium.find(params[:id]) - @gremientabs=Gremium.order(:typ) + @gremientabs=Gremium.tabs respond_to do |format| format.html # show.html.erb format.json { render json: @gremium } diff --git a/app/models/calentry.rb b/app/models/calentry.rb index 94561f3..1b9f245 100644 --- a/app/models/calentry.rb +++ b/app/models/calentry.rb @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # == Schema Information # # Table name: calentries @@ -17,14 +18,13 @@ class Calentry < ActiveRecord::Base validates :start, :presence => true validates :typ, :presence => true before_save :get_public - belongs_to :object, polymorphic: true + belongs_to :object, polymorphic: true # Objekt zu dem der Calentry gehört (derzeit ein Newsartikel) - validate do |entry| +validate do |entry| if entry.ende.nil? errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein") end - end - + end resourcify def get_public @@ -38,7 +38,11 @@ class Calentry < ActiveRecord::Base start.to_date end def name - summary + unless self.object.nil? + self.object.name + else + summary + end end scope :public, -> { where(:public => :true) } scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 8.days.from_now) } diff --git a/app/models/gremium.rb b/app/models/gremium.rb index 342f3b0..b3bc9fa 100644 --- a/app/models/gremium.rb +++ b/app/models/gremium.rb @@ -12,15 +12,15 @@ # class Gremium < ActiveRecord::Base - TYPEN={1=>"offiziell", 2=>"offiziell-temporaer", 3 => "inoffiziell",4=>"inoffiziell-tempo"} - GESCHLECHT={0=>"saechlich", 1 => "maennlich", 2 => "weiblich"} - ART2FALL={0=>"des", 1=>"des",2=>"der"} + TYPEN={1=>"offiziell", 2=>"offiziell-temporär", 3 => "inoffiziell",4=>"inoffiziell-tempo"} # Kategorien, im Wesentlichen wichtig für Listung oder nicht Listung + GESCHLECHT={0=>"saechlich", 1 => "maennlich", 2 => "weiblich"} # Geschlecht des Gremiums zur richtige Deklination + ART2FALL={0=>"des", 1=>"des",2=>"der"} # Artikel 2.Fall abhängig vom Geschlecht attr_accessible :desc, :name, :typ, :geschlecht,:thema_id - has_many :memberships - belongs_to :thema - scope :tabs, -> { where(:typ => [1,2]) } - - def fall2 + has_many :memberships # Mitgliedschaften bei dem Gremium + belongs_to :thema # Gehört zu einem Thema + scope :tabs, -> { where(:typ => [1,3]).order(:typ).order(:name) } # Gremien die in Tabs angezeigt werden (Alle Anderen nur in der Liste + # Gremium im 2. Fall für die Konstruktion "Mitglied des ... / der ... " + def fall2 Gremium::ART2FALL[self.geschlecht.to_i].to_s+" "+ self.name.to_s+ ((self.geschlecht.to_i==1||self.geschlecht.to_i==0)? "s":"") end diff --git a/app/views/fetprofiles/_tabs.html.erb b/app/views/fetprofiles/_tabs.html.erb index 2359bc7..902e756 100644 --- a/app/views/fetprofiles/_tabs.html.erb +++ b/app/views/fetprofiles/_tabs.html.erb @@ -1,7 +1,7 @@