Merge branch 'master' of https://github.com/fetsite/fetsite
This commit is contained in:
5
Gemfile
5
Gemfile
@@ -72,8 +72,9 @@ gem 'paperclip' ,'~>3.4.0'
|
||||
|
||||
gem 'git'
|
||||
gem 'haml'
|
||||
#gem 'RedCloth'
|
||||
#gem 'gollum'
|
||||
gem 'RedCloth'
|
||||
gem 'wikicloth'
|
||||
gem 'gollum-lib'
|
||||
gem 'awesome_nested_set'
|
||||
gem 'annotate', ">=2.5.0"
|
||||
gem 'carrierwave', "~>0.9.0"
|
||||
|
||||
29
Gemfile.lock
29
Gemfile.lock
@@ -9,6 +9,7 @@ GIT
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
RedCloth (4.2.9)
|
||||
actionmailer (3.2.13)
|
||||
actionpack (= 3.2.13)
|
||||
mail (~> 2.5.3)
|
||||
@@ -53,6 +54,7 @@ GEM
|
||||
activemodel (>= 3.2.0)
|
||||
activesupport (>= 3.2.0)
|
||||
json (>= 1.7)
|
||||
charlock_holmes (0.6.9.4)
|
||||
climate_control (0.0.3)
|
||||
activesupport (>= 3.0)
|
||||
cocaine (0.5.3)
|
||||
@@ -73,6 +75,7 @@ GEM
|
||||
erubis (2.7.0)
|
||||
execjs (1.4.0)
|
||||
multi_json (~> 1.0)
|
||||
expression_parser (0.9.0)
|
||||
factory_girl (4.3.0)
|
||||
activesupport (>= 3.0.0)
|
||||
factory_girl_rails (4.3.0)
|
||||
@@ -87,12 +90,25 @@ GEM
|
||||
formtastic-bootstrap (2.1.3)
|
||||
formtastic (~> 2.2)
|
||||
git (1.2.6)
|
||||
github-markup (0.7.5)
|
||||
gitlab-grit (2.6.0)
|
||||
charlock_holmes (~> 0.6.9)
|
||||
diff-lcs (~> 1.1)
|
||||
mime-types (~> 1.15)
|
||||
posix-spawn (~> 0.3.6)
|
||||
globalize (3.0.4)
|
||||
activemodel (>= 3.0.0, < 4.0.0)
|
||||
activerecord (>= 3.0.0, < 4.0.0)
|
||||
globalize-versioning (0.1.0.alpha.1)
|
||||
globalize (>= 3, < 5)
|
||||
paper_trail (~> 3.0.0)
|
||||
gollum-lib (2.0.0)
|
||||
github-markup (>= 0.7.5, < 1.0.0)
|
||||
gitlab-grit (= 2.6.0)
|
||||
nokogiri (~> 1.6.0)
|
||||
rouge (~> 1.3.1)
|
||||
sanitize (~> 2.0.6)
|
||||
stringex (~> 2.1.0)
|
||||
haml (4.0.5)
|
||||
tilt
|
||||
hashie (2.0.5)
|
||||
@@ -150,6 +166,7 @@ GEM
|
||||
cocaine (~> 0.5.0)
|
||||
mime-types
|
||||
polyglot (0.3.3)
|
||||
posix-spawn (0.3.8)
|
||||
pyu-ruby-sasl (0.0.3.3)
|
||||
rack (1.4.5)
|
||||
rack-cache (1.2)
|
||||
@@ -177,8 +194,10 @@ GEM
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
ref (1.0.5)
|
||||
rinku (1.7.3)
|
||||
rmagick (2.13.2)
|
||||
rolify (3.2.0)
|
||||
rouge (1.3.4)
|
||||
rspec-core (2.14.7)
|
||||
rspec-expectations (2.14.4)
|
||||
diff-lcs (>= 1.1.3, < 2.0)
|
||||
@@ -208,6 +227,7 @@ GEM
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sqlite3 (1.3.8)
|
||||
stringex (2.1.2)
|
||||
themes_for_rails (0.5.1)
|
||||
rails (>= 3.0.0)
|
||||
therubyracer (0.12.0)
|
||||
@@ -226,11 +246,17 @@ GEM
|
||||
json (>= 1.8.0)
|
||||
warden (1.2.3)
|
||||
rack (>= 1.0)
|
||||
webrick (1.3.1)
|
||||
wikicloth (0.8.1)
|
||||
builder
|
||||
expression_parser
|
||||
rinku
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
RedCloth
|
||||
annotate (>= 2.5.0)
|
||||
awesome_nested_set
|
||||
bootstrap-addons-rails
|
||||
@@ -247,6 +273,7 @@ DEPENDENCIES
|
||||
git
|
||||
globalize (~> 3.0.4)
|
||||
globalize-versioning
|
||||
gollum-lib
|
||||
haml
|
||||
jquery-fileupload-rails
|
||||
jquery-rails
|
||||
@@ -271,3 +298,5 @@ DEPENDENCIES
|
||||
therubyracer
|
||||
tinymce-rails (~> 3.5.8)
|
||||
uglifier (>= 1.0.3)
|
||||
webrick (= 1.3.1)
|
||||
wikicloth
|
||||
|
||||
@@ -18,7 +18,7 @@ def get_theme
|
||||
params[:theme]
|
||||
|
||||
else
|
||||
"2003"
|
||||
"blue1"
|
||||
end
|
||||
end
|
||||
def default_url_options
|
||||
|
||||
@@ -46,19 +46,29 @@ class AttachmentsController < ApplicationController
|
||||
# POST /attachments.json
|
||||
def create
|
||||
@attachment = Attachment.new(params[:attachment])
|
||||
@thema = Thema.find(params[:thema_id])
|
||||
@attachment.thema_id = @thema.id
|
||||
@action="create"
|
||||
logger.info "#{@attachment.inspect}"
|
||||
@thema = Thema.find_by_id(params[:thema_id])
|
||||
# logger.info "gg"
|
||||
@attachment.thema = @thema
|
||||
@attachment.name=@attachment.datei.filename
|
||||
@action="create"
|
||||
|
||||
|
||||
# logger.info "sdf"
|
||||
respond_to do |format|
|
||||
if @attachment.save
|
||||
format.html { redirect_to @thema, notice: 'Attachment was successfully created.' }
|
||||
format.json { render json: @thema, status: :created, location: @thema }
|
||||
format.js { }
|
||||
if @attachment.save
|
||||
format.html {
|
||||
render :json => [@attachment.to_jq_upload].to_json,
|
||||
:content_type => 'text/html',
|
||||
:layout => false
|
||||
}
|
||||
|
||||
# format.html { redirect_to @thema, notice: 'Attachment was successfully created.' }
|
||||
format.json { render json: {files: [@attachment.to_jq_upload]}, status: :created, location: [@thema, @attachment]}
|
||||
|
||||
else
|
||||
format.html { render action: "new" }
|
||||
format.json { render json: @attachment.errors, status: :unprocessable_entity }
|
||||
format.js { render action: "new.js.erb"}
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,9 +12,12 @@ class FetprofilesController < ApplicationController
|
||||
@gremientabs = Gremium.tabs
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @fetprofiles }
|
||||
end
|
||||
end
|
||||
end
|
||||
def internlist
|
||||
@fetprofiles = Fetprofile.order(:vorname,:nachname)
|
||||
end
|
||||
|
||||
|
||||
# GET /fetprofiles/1
|
||||
# GET /fetprofiles/1.json
|
||||
|
||||
@@ -7,6 +7,8 @@ class GremienController < ApplicationController
|
||||
@gremien = Gremium.all
|
||||
@gremientabs=Gremium.tabs
|
||||
@toolbar_elements << {:text=>I18n.t('gremium.new'),:path=>new_gremium_path() ,:icon=>:plus} if can? :new, Gremium
|
||||
@toolbar_elements << {:text=>I18n.t('profile.new'),:path=>new_fetprofile_path() ,:icon=>:plus} if can? :new, Fetprofile
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @gremien }
|
||||
|
||||
@@ -12,6 +12,7 @@ class HomeController < ApplicationController
|
||||
def intern
|
||||
authorize! :seeintern, User
|
||||
@neuigkeiten = Neuigkeit.intern.recent
|
||||
@themengruppen=Themengruppe.intern
|
||||
end
|
||||
def startdev
|
||||
render 'setup_fetsite_dev'
|
||||
|
||||
@@ -8,7 +8,7 @@ class RubrikenController < ApplicationController
|
||||
@rubriken = Rubrik.where(:public=>true)
|
||||
end
|
||||
@neuigkeiten = @rubriken.collect(&:neuigkeiten).map(&:recent).flatten
|
||||
@calentries= @rubriken.collect(&:calendar).collect(&:calentries).flatten
|
||||
@calentries= @rubriken.collect(&:calentries).flatten
|
||||
end
|
||||
def intern
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@ class ThemenController < ApplicationController
|
||||
end
|
||||
def verwalten
|
||||
@thema = Thema.find(params[:id])
|
||||
@attachment=Attachment.new
|
||||
|
||||
|
||||
@fragen=@thema.fragen
|
||||
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>"Verwalten", :path=>verwalten_thema_path(@thema)}]
|
||||
|
||||
@@ -54,6 +57,10 @@ class ThemenController < ApplicationController
|
||||
# GET /themen/1/edit
|
||||
def edit
|
||||
@thema = Thema.find(params[:id])
|
||||
unless ( @thema.wikiname.nil? || @thema.wikiname.empty? )
|
||||
redirect_to edit_wiki_path(Wiki.find(@thema.id))
|
||||
return
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
@@ -88,6 +95,7 @@ class ThemenController < ApplicationController
|
||||
def attachments
|
||||
@thema = Thema.find(params[:id])
|
||||
@attachments=@thema.attachments
|
||||
@attachment=Attachment.new
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
||||
@@ -24,10 +24,7 @@ class ThemengruppenController < ApplicationController
|
||||
@themen = @themengruppe.themen.order(:priority).reverse
|
||||
|
||||
@toolbar_elements = []
|
||||
@toolbar_elements << {:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('thema.add'), :path=>new_themengruppe_thema_path(@themengruppe)} if can? :new, Themengruppe
|
||||
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('themengruppe.edit'), :path=>edit_themengruppe_path(@themengruppe)} if can? :edit, @themengruppe
|
||||
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t("themengruppe.manage"), :path=>themengruppe_verwalten_path(@themengruppe)} if can? :edit, @themengruppe
|
||||
@toolbar_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('themengruppe.remove'), :path=>themengruppe_path(@themengruppe), :method=>:delete,:confirm=>I18n.t('themengruppe.sure')} if can? :delete, @themengruppe
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
@@ -52,10 +49,18 @@ class ThemengruppenController < ApplicationController
|
||||
end
|
||||
def verwalten_all
|
||||
@themengruppen =Themengruppe.order(:priority).reverse
|
||||
end
|
||||
@toolbar_elements = [{:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('themengruppe.new'), :path=>new_themengruppe_path()}]
|
||||
|
||||
end
|
||||
def verwalten
|
||||
@themengruppe = Themengruppe.find(params[:themengruppe_id])
|
||||
@themen = @themengruppe.themen.order(:priority).reverse
|
||||
|
||||
@toolbar_elements =[]
|
||||
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('themengruppe.edit'), :path=>edit_themengruppe_path(@themengruppe)} if can? :edit, @themengruppe
|
||||
@toolbar_elements << {:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('thema.add'), :path=>new_themengruppe_thema_path(@themengruppe)} if can? :new, Themengruppe
|
||||
@toolbar_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('themengruppe.remove'), :path=>themengruppe_path(@themengruppe), :method=>:delete,:confirm=>I18n.t('themengruppe.sure')} if can? :delete, @themengruppe
|
||||
|
||||
end
|
||||
|
||||
def sort_themengruppen
|
||||
|
||||
46
app/controllers/wikis_controller.rb
Normal file
46
app/controllers/wikis_controller.rb
Normal file
@@ -0,0 +1,46 @@
|
||||
class WikisController < ApplicationController
|
||||
load_and_authorize_resource
|
||||
|
||||
def show
|
||||
@wiki = Wiki.find(params[:id])
|
||||
@fragen = @wiki.fragen
|
||||
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('wiki.edit'), :path=>verwalten_wiki_path(@wiki)}]
|
||||
end
|
||||
|
||||
def wiki
|
||||
@wiki = Wiki.find_or_init(params[:name])
|
||||
@fragen = @wiki.fragen
|
||||
@toolbar_elements = []
|
||||
# @toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('wiki.edit'), :path=>verwalten_wiki_path(@wiki)}]
|
||||
|
||||
redirect_to wiki_path(@wiki)
|
||||
end
|
||||
|
||||
|
||||
def edit
|
||||
@wiki = Wiki.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def update
|
||||
@wiki = Wiki.find(params[:id])
|
||||
@themen = @wiki.themengruppe.themen.order(:priority).reverse
|
||||
@wiki.raw_data=params[:wiki][:raw_data]
|
||||
respond_to do |format|
|
||||
if @wiki.update_attributes(params[:wiki])
|
||||
format.html { redirect_to verwalten_thema_path(@wiki), notice: 'Thema was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
format.js
|
||||
else
|
||||
format.html { render action: "edit" }
|
||||
format.json { render json: @wiki.errors, status: :unprocessable_entity }
|
||||
format.js { render action: "edit" }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -12,9 +12,22 @@
|
||||
|
||||
class Attachment < ActiveRecord::Base
|
||||
has_paper_trail
|
||||
attr_accessible :name, :datei
|
||||
attr_accessible :name, :datei, :datei_cache
|
||||
belongs_to :thema
|
||||
mount_uploader :datei, AttachmentUploader
|
||||
validates :thema, :presence => true
|
||||
validates :name, :presence => true
|
||||
|
||||
def to_jq_upload
|
||||
{
|
||||
"id" => read_attribute(:id),
|
||||
"title" => read_attribute(:title),
|
||||
"description" => read_attribute(:desc),
|
||||
"name" => read_attribute(:title),
|
||||
"size" => datei.size,
|
||||
"url" => datei.url,
|
||||
"thumbnail_url" => datei.thumb.url,
|
||||
"delete_type" => "DELETE"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ class Calentry < ActiveRecord::Base
|
||||
|
||||
resourcify
|
||||
def get_public
|
||||
self.public = (self.try(:object).nil?)? (self.calendar.try(:public)) : object.try(:public)
|
||||
self.public = (self.try(:object).nil?)? (self.calendar.try(:public?)) : object.try(:public?)
|
||||
true
|
||||
end
|
||||
def start_time
|
||||
|
||||
@@ -15,19 +15,27 @@
|
||||
#
|
||||
|
||||
class Fetprofile < ActiveRecord::Base
|
||||
attr_accessible :active, :desc, :fetmailalias, :nachname, :picture, :short, :vorname, :memberships_attributes, :remove_picture, :picture_cache
|
||||
attr_accessible :active, :desc, :fetmailalias, :nachname, :picture, :short, :vorname, :memberships_attributes, :remove_picture, :picture_cache, :plz, :street, :city, :instant,:skype, :telnr, :hdynr, :birth_day, :birth_month, :birth_year,:geschlecht
|
||||
has_many :memberships, dependent: :delete_all
|
||||
has_many :gremien, :through=> :membership
|
||||
mount_uploader :picture, PictureUploader
|
||||
has_paper_trail
|
||||
validates :desc, :presence=>true
|
||||
validates :desc, :presence=>true
|
||||
validates :nachname, length:{minimum: 3},:presence=>true
|
||||
validates :vorname, length:{minimum: 3},:presence=>true
|
||||
validate :validate_birthday
|
||||
GESCHLECHT={0=>"gendered", 1=>"maennlich", 2=>"weiblich"}
|
||||
has_many :users
|
||||
scope :search, ->(query) {where("nachname like ? or vorname like ? or short like ?", "%#{query}%", "%#{query}%", "%#{query}%")}
|
||||
|
||||
accepts_nested_attributes_for :memberships, :reject_if=>lambda{|a| a[:typ].blank?|| a[:start].blank? ||a[:gremium_id].blank?}, :allow_destroy=>true
|
||||
has_many :nlinks, as: :link
|
||||
def validate_birthday
|
||||
unless Date.valid_date?(birth_year, birth_month, birth_day)
|
||||
errors.add(:birth_month, "Invalides Datum")
|
||||
errors.add(:birth_day, "Invalides Datum")
|
||||
end
|
||||
end
|
||||
|
||||
def title
|
||||
self.name
|
||||
@@ -39,4 +47,15 @@ validates :desc, :presence=>true
|
||||
def fetmail
|
||||
(fetmailalias.nil? || fetmailalias.empty?) ? short.to_s + "@fet.at" : fetmailalias.to_s + "@fet.at"
|
||||
end
|
||||
def adress
|
||||
connector= (self.street.nil?||self.street.empty?||(self.city.empty? && self.plz.empty?)) ? '' : ', '
|
||||
self.plz.to_s + ' ' + self.city.to_s + connector.to_s + self.street.to_s
|
||||
end
|
||||
def birthday
|
||||
if self.birth_year.nil? || self.birth_year.zero?
|
||||
Date.new( Date.today.year,self.birth_month,self.birth_day)
|
||||
else
|
||||
Date.new( self.birth_year,self.birth_month,self.birth_day)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
class Gremium < ActiveRecord::Base
|
||||
TYPEN={1=>"offiziell", 2=>"offiziell-temporär", 3 => "inoffiziell",4=>"inoffiziell-tempo", 11=> "berufungskommission",12=> "habilitationskommission" } # 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
|
||||
ART4FALL={0=>"das", 1=>"den",2=>"die"} # Artikel 2.Fall abhängig vom Geschlecht
|
||||
ART2FALL={0=>"des", 1=>"des",2=>"der"} # Artikel 2.Fall abhängig vom Geschlecht
|
||||
ART4FALL={0=>"das", 1=>"den",2=>"die"} # Artikel 2.Fall abhängig vom Geschlecht
|
||||
FILTER={11=>I18n.t("gremium.filter.berufung.title"),12=>I18n.t("gremium.filter.habil.title")}
|
||||
TEXT={11=>I18n.t("gremium.filter.berufung.text"),12=>I18n.t("gremium.filter.habil.text")}
|
||||
|
||||
|
||||
@@ -58,12 +58,14 @@ class Lva < ActiveRecord::Base
|
||||
validates_presence_of :modul # Zugehöriges Modul eingetragen?
|
||||
# (zumindest eines)
|
||||
|
||||
|
||||
def typ_n
|
||||
typ=="andere" ? "" : typ
|
||||
end
|
||||
def title
|
||||
self.name
|
||||
end
|
||||
def full_name
|
||||
return self.typ + ' ' + self.name
|
||||
return self.typ_n + ' ' + self.name
|
||||
end
|
||||
def add_semesters
|
||||
# Diese Methode fügt die Instanz automatisch zu allen Studien als "Ohne Semesterempfehlung" (Semester 0) zu, bei denen die Instanz im Studium noch nicht vorkommt.
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
class Membership < ActiveRecord::Base
|
||||
TYPEN={-2=>"VorsitzendeR", -1=>"stv VorsitzendeR", 0=>"2. stv VorsitzendeR", 1=>"Mitglied",2=> "Ersatzmitglied",3=>"VerantwortlicheR"}
|
||||
TYPEN_g={0=>TYPEN, 1=>{ -2=>"Vorsitzender", -1=>"stv Vorsitzender", 0=>"2. stv Vorsitzender", 1=>"Mitglied",2=> "Ersatzmitglied",3=>"Verantwortlicher"},2=>{-2=>"Vorsitzende", -1=>"stv Vorsitzende", 0=>"2. stv Vorsitzende", 1=>"Mitglied",2=> "Ersatzmitglied",3=>"Verantwortliche"}}
|
||||
attr_accessible :fetprofile_id, :gremium_id, :start, :stop, :typ
|
||||
belongs_to :fetprofile
|
||||
belongs_to :gremium
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#
|
||||
|
||||
class Modul < ActiveRecord::Base
|
||||
attr_accessible :desc,:name, :depend, :studium_id, :modulgruppen
|
||||
attr_accessible :desc,:name, :depend, :studium_id, :modulgruppen, :modulgruppe_ids
|
||||
|
||||
has_and_belongs_to_many :lvas , :uniq=>true
|
||||
has_and_belongs_to_many :modulgruppen
|
||||
|
||||
@@ -22,7 +22,9 @@ class Thema < ActiveRecord::Base
|
||||
validates :text, :presence => true
|
||||
scope :search, ->(query) {where("text like ? or title like ?", "%#{query}%", "%#{query}%")}
|
||||
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
|
||||
|
||||
def is_wiki?
|
||||
wikiname.nil? || wikiname.empty?
|
||||
end
|
||||
def text_first_words
|
||||
md = /<p>(?<text>[^\<\>]*)/.match Sanitize.clean(self.text,:elements=>['p'])
|
||||
words=md[:text].split(" ") unless md.nil?
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
class Themengruppe < ActiveRecord::Base
|
||||
WORD_COUNT = 50
|
||||
attr_accessible :text, :title, :picture, :priority
|
||||
attr_accessible :text, :title, :picture, :priority, :public
|
||||
has_many :themen, class_name: 'Thema'
|
||||
has_many :fragen, through: :themen
|
||||
|
||||
@@ -20,4 +20,17 @@ class Themengruppe < ActiveRecord::Base
|
||||
validates :text, :presence => true
|
||||
|
||||
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
|
||||
|
||||
scope :intern,-> {where(:public=>false)}
|
||||
|
||||
def self.find_wiki_default
|
||||
where(:wiki_default=>true).first
|
||||
end
|
||||
|
||||
def make_wiki_default
|
||||
Themengruppe.where(:wiki_default=>:true).update_all(:wiki_default=>:false)
|
||||
self.wiki_default=true;
|
||||
self.save;
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
73
app/models/wiki.rb
Normal file
73
app/models/wiki.rb
Normal file
@@ -0,0 +1,73 @@
|
||||
class Wiki < Thema
|
||||
validates :wikiname, :uniqueness=>true, :presence=>true
|
||||
after_initialize :load_wiki
|
||||
attr_accessible :wikiname, :wikiformat, :hidelink, :raw_data
|
||||
WIKIFORMATS={nil=> :textile, 0 =>:textile, 1=> :mediawiki}
|
||||
|
||||
def self.find_or_init(name)
|
||||
w = Wiki.where(:wikiname=>name).first
|
||||
page = is_file_availaible(name)
|
||||
if w.nil?
|
||||
unless page.nil?
|
||||
w=Wiki.new(:wikiname=>name, :title=>name, :wikiformat=>Wiki::WIKIFORMATS.invert[page.format], :hidelink=>true)
|
||||
else
|
||||
w=Wiki.new(:wikiname=>name, :title=>name, :wikiformat=>0, :hidelink=>true)
|
||||
wiki = Gollum::Wiki.new("../wiki.git", :base_path => "/wiki")
|
||||
page=wiki.write_page(name, :textile, "ioi", self.commit)
|
||||
w.reload_page
|
||||
end
|
||||
|
||||
w.themengruppe = Themengruppe.find_wiki_default
|
||||
w.raw_data="Neues Wiki"
|
||||
w.save
|
||||
end
|
||||
w
|
||||
end
|
||||
|
||||
def raw_data
|
||||
self.page.raw_data
|
||||
end
|
||||
|
||||
def raw_data=(data)
|
||||
self.get_page(self.wikiname)
|
||||
self.wiki.update_page(self.page, self.wikiname, Wiki::WIKIFORMATS[self.wikiformat], data, self.commit)
|
||||
self.text=self.page.formatted_data
|
||||
|
||||
end
|
||||
|
||||
def page
|
||||
self.get_page(wikiname) if @page.nil?
|
||||
@page
|
||||
end
|
||||
|
||||
def wiki
|
||||
@wiki
|
||||
end
|
||||
def reload_page
|
||||
self.get_page(self.wikiname)
|
||||
end
|
||||
protected
|
||||
|
||||
|
||||
def self.is_file_availaible(name)
|
||||
wiki = Gollum::Wiki.new("../wiki.git", :base_path => "/wiki")
|
||||
wiki.page(name)
|
||||
end
|
||||
|
||||
def load_wiki
|
||||
@wiki = Gollum::Wiki.new("../wiki.git", :base_path => "/wiki")
|
||||
end
|
||||
|
||||
def get_page(name)
|
||||
@page= @wiki.page(name)
|
||||
@page=self.wiki.write_page(self.wikiname, Wiki::WIKIFORMATS[self.wikiformat]," ",self.commit) if @page.nil?
|
||||
@page
|
||||
end
|
||||
def commit
|
||||
{message: "RailsUpdate", name:"SomeUser", email: "ttt@t"}
|
||||
end
|
||||
|
||||
def self.commit
|
||||
{message: "RailsUpdate", name:"SomeUser", email: "ttt@t"}
|
||||
end
|
||||
end
|
||||
@@ -6,6 +6,9 @@ class AttachmentUploader < CarrierWave::Uploader::Base
|
||||
include CarrierWave::RMagick
|
||||
# include CarrierWave::RMagick
|
||||
# include CarrierWave::MiniMagick
|
||||
def root
|
||||
Rails.root.join 'public/'
|
||||
end
|
||||
|
||||
# Choose what kind of storage to use for this uploader:
|
||||
storage :file
|
||||
@@ -20,6 +23,9 @@ class AttachmentUploader < CarrierWave::Uploader::Base
|
||||
version :thumb do
|
||||
process :resize_to_fill => [64, 64]
|
||||
end
|
||||
version :thumb_small do
|
||||
process :resize_to_fill => [32, 32]
|
||||
end
|
||||
|
||||
# Provide a default URL as a default if there hasn't been a file uploaded:
|
||||
# def default_url
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% data_ext = attachment.datei.file.extension.downcase %>
|
||||
|
||||
<%= attachment.name %> </br>
|
||||
|
||||
<% if (!["jpg","png","jpeg"].find_index(data_ext).nil?) %>
|
||||
<%= image_tag attachment.datei.thumb.url %>
|
||||
<% else %>
|
||||
<%= image_tag "pdf-logo.jpg" %>
|
||||
<% end %>
|
||||
|
||||
<%= attachment.name %>
|
||||
|
||||
143
app/views/attachments/_form_bulk.html.erb
Normal file
143
app/views/attachments/_form_bulk.html.erb
Normal file
@@ -0,0 +1,143 @@
|
||||
|
||||
<div class="container-fluid">
|
||||
<%= semantic_form_for [@thema,@attachment], :remote=>true, :html => { :multipart => true, :id => "fileupload" } do |f| %>
|
||||
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span7">
|
||||
<div class="fileupload-buttonbar">
|
||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
||||
<span class="btn btn-success fileinput-button">
|
||||
<i class="icon-plus icon-white"></i>
|
||||
<span>Add files...</span>
|
||||
<%= f.file_field :datei, :multiple=>true %>
|
||||
<% f.input :thema %>
|
||||
</span>
|
||||
<button type="submit" class="btn btn-primary start">
|
||||
<i class="icon-upload icon-white"></i>
|
||||
<span>Start upload</span>
|
||||
</button>
|
||||
<button type="reset" class="btn btn-warning cancel">
|
||||
<i class="icon-ban-circle icon-white"></i>
|
||||
<span>Cancel upload</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger delete">
|
||||
<i class="icon-trash icon-white"></i>
|
||||
<span>Delete</span>
|
||||
</button>
|
||||
<input type="checkbox" class="toggle">
|
||||
</div>
|
||||
<div class="span5">
|
||||
<!-- The global progress bar -->
|
||||
<div class="progress progress-success progress-striped active fade">
|
||||
<div class="bar" style="width:100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- The loading indicator is shown during image processing -->
|
||||
<div class="fileupload-loading"></div>
|
||||
<br>
|
||||
<!-- The table listing the files available for upload/download -->
|
||||
<table class="table table-striped"><tbody class="files" data-toggle="modal-lva" data-target="#modal-lva"></tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var fileUploadErrors = {
|
||||
maxFileSize: 'File is too big',
|
||||
minFileSize: 'File is too small',
|
||||
acceptFileTypes: 'Filetype not allowed',
|
||||
maxNumberOfFiles: 'Max number of files exceeded',
|
||||
uploadedBytes: 'Uploaded bytes exceed file size',
|
||||
emptyResult: 'Empty file upload result'
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- The template to display files available for upload -->
|
||||
<script id="template-upload" type="text/x-tmpl">
|
||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||
<tr class="template-upload fade">
|
||||
<!--<td class="preview"><span class="fade"></span></td>-->
|
||||
<td class="name"><span>{%=file.name %}</span></td>
|
||||
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
||||
{% if (file.error) { %}
|
||||
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
||||
{% } else if (o.files.valid && !i) { %}
|
||||
<td>
|
||||
<div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
|
||||
</td>
|
||||
<td class="start">{% if (!o.options.autoUpload) { %}
|
||||
<button class="btn btn-primary">
|
||||
<i class="icon-upload icon-white"></i>
|
||||
<span>{%=locale.fileupload.start%}</span>
|
||||
</button>
|
||||
{% } %}</td>
|
||||
{% } else { %}
|
||||
<td colspan="2"></td>
|
||||
{% } %}
|
||||
<td class="cancel">{% if (!i) { %}
|
||||
<button class="btn btn-warning">
|
||||
<i class="icon-ban-circle icon-white"></i>
|
||||
<span>{%=locale.fileupload.cancel%}</span>
|
||||
</button>
|
||||
{% } %}</td>
|
||||
</tr>
|
||||
{% } %}
|
||||
</script>
|
||||
<!-- The template to display files available for download -->
|
||||
<script id="template-download" type="text/x-tmpl">
|
||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||
<tr class="template-download fade">
|
||||
{% if (file.error) { %}
|
||||
<td></td>
|
||||
<td class="name"><span>{%=file.name%}</span></td>
|
||||
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
||||
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
||||
{% } else { %}
|
||||
<!--<td class="preview">{% if (file.thumbnail_url) { %}
|
||||
<a href="{%=file.url%}" title="{%=file.name%}" rel="lva" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>
|
||||
{% } %}</td>-->
|
||||
<td class="name">
|
||||
<a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'lva'%}" download="{%=file.name%}">{%=file.name%}</a>
|
||||
</td>
|
||||
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
||||
<td colspan="2"></td>
|
||||
{% } %}
|
||||
<td class="delete">
|
||||
<button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">
|
||||
<i class="icon-trash icon-white"></i>
|
||||
<span>{%=locale.fileupload.destroy%}</span>
|
||||
</button>
|
||||
<input type="checkbox" name="delete" value="1">
|
||||
</td>
|
||||
</tr>
|
||||
{% } %}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(function () {
|
||||
// Initialize the jQuery File Upload widget:
|
||||
$('#fileupload').fileupload();
|
||||
//
|
||||
// Load existing files:
|
||||
$.getJSON($('#fileupload').prop('action'), function (files) {
|
||||
var fu = $('#fileupload').data('blueimpFileupload'),
|
||||
template;
|
||||
fu._adjustMaxNumberOfFiles(-files.length);
|
||||
console.log(files);
|
||||
// no Download on Upload form
|
||||
//template = fu._renderDownload(files)
|
||||
//.appendTo($('#fileupload .files'));
|
||||
// Force reflow:
|
||||
fu._reflow = fu._transition && template.length &&
|
||||
template[0].offsetWidth;
|
||||
template.addClass('in');
|
||||
$('#loading').remove();
|
||||
});
|
||||
$('#attachment_datei').attr('name', 'attachment[datei]');
|
||||
$('#attachment_datei').fileupload();
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span4"> <%= f.input :active %></div>
|
||||
<div class="span4"> <%= f.input :active %> <%= f.input :geschlecht,:as=>:select, :collection=>Fetprofile::GESCHLECHT.invert %></div>
|
||||
<div class="span4">
|
||||
<%= image_tag(@fetprofile.picture.thumb.url) unless @fetprofile.picture.nil? %>
|
||||
<%= f.file_field :picture %>
|
||||
@@ -28,24 +28,35 @@
|
||||
<div class="span4"> <%= f.input :fetmailalias %></div>
|
||||
</div>
|
||||
|
||||
<% @memberships.each do |m| %>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
Adresse:
|
||||
|
||||
<%= f.semantic_fields_for :memberships, m do |membership| %>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
|
||||
<div class="span3"><%= membership.input :start, :as=>:datepicker, :prepend=>"von",:label=>false%></div>
|
||||
<div class="span3"><%= membership.input :stop, :as=>:datepicker,:label=>false, :prepend =>"bis" %></div>
|
||||
<div class="span2"><%= membership.input :typ ,:as=>:select, :collection=>Membership::TYPEN.invert, :label=>false %></div>
|
||||
<div class="span3"><%= membership.input :gremium, :label=>false %>
|
||||
<%=f.input :street %>
|
||||
<%=f.input :plz %>
|
||||
<%=f.input :city %>
|
||||
KOntakt:
|
||||
<%=f.input :instant %>
|
||||
<%=f.input :skype %>
|
||||
<%=f.input :telnr %>
|
||||
<%=f.input :hdynr %>
|
||||
|
||||
</div>
|
||||
<div class="span1"><%= membership.check_box :_destroy %> <%= I18n.t 'common.delete' %></div>
|
||||
<div class="span6">
|
||||
Geburtstag:
|
||||
<%=f.input :birth_day %>
|
||||
<%=f.input :birth_month %>
|
||||
<%=f.input :birth_year %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %> <% end %>
|
||||
</div>
|
||||
<div id="memberships_form_list">
|
||||
<% @memberships.each do |m| %>
|
||||
<%= render partial:"membership_fields", object: m , locals: {:f=>f} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= f.actions do %>
|
||||
|
||||
16
app/views/fetprofiles/_interninfo.html.erb
Normal file
16
app/views/fetprofiles/_interninfo.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<p>
|
||||
<b>Geburtstag</b> <%= %>
|
||||
</p>
|
||||
<p>
|
||||
<b>Adresse:</b>
|
||||
<%= interninfo.plz %>
|
||||
<%= interninfo.city %>,
|
||||
<%= interninfo.street %>
|
||||
</p>
|
||||
<p>
|
||||
<%= raw("<b>Telefon: </b>")+ interninfo.telnr + "<br>" unless interninfo.telnr.empty?%>
|
||||
<%= raw("<b>Handy: </b>") +interninfo.hdynr unless interninfo.hdynr.empty? %><br>
|
||||
<%= raw("<b>Skype: </b>") +interninfo.skype unless interninfo.skype.empty? %><br>
|
||||
<%= raw("<b>Instant Messaging: </b>") +interninfo.instant unless interninfo.instant.empty? %><br>
|
||||
|
||||
</p>
|
||||
12
app/views/fetprofiles/_internrow.html.erb
Normal file
12
app/views/fetprofiles/_internrow.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<tr>
|
||||
<td> <%= link_to internrow.name, internrow %>
|
||||
</td>
|
||||
<td> <%= internrow.adress %></td>
|
||||
<td>
|
||||
<%= raw("Telefon: ")+ internrow.telnr + "<br>" unless internrow.telnr.nil? || internrow.telnr.empty?%>
|
||||
<%= raw("Handy: ") +internrow.hdynr + raw("<br>") unless internrow.hdynr.nil? || internrow.hdynr.empty? %>
|
||||
<%= raw("Skype: ") +internrow.skype + raw("<br>") unless internrow.skype.nil? || internrow.skype.empty? %>
|
||||
<%= raw("Instant Messaging: ") +internrow.instant + raw("<br>") unless internrow.instant.nil? || internrow.instant.empty? %>
|
||||
</td>
|
||||
<td><%= internrow.fetmail %></td>
|
||||
</tr>
|
||||
13
app/views/fetprofiles/_membership_fields.html.erb
Normal file
13
app/views/fetprofiles/_membership_fields.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<%= f.semantic_fields_for :memberships, membership_fields do |membership| %>
|
||||
<table><tr><td>
|
||||
<%= membership.input :start, :as=>:datepicker, :prepend=>"von",:label=>false , :input_html => { :style => "width:6em"} %>
|
||||
</td><td>
|
||||
<%= membership.input :stop, :as=>:datepicker,:label=>false, :prepend =>"bis" , :input_html => { :style => "width:6em"}%></td><td>
|
||||
|
||||
<%= membership.input :typ ,:as=>:select, :collection=>Membership::TYPEN.invert, :label=>false , :input_html => { :style => "width:12em" }%></td><td>
|
||||
|
||||
<%= membership.input :gremium, :label=>false %>
|
||||
</td><td>
|
||||
<%= membership.check_box :_destroy %> <%= I18n.t 'common.delete' %></td></tr></table>
|
||||
|
||||
<% end %>
|
||||
5
app/views/fetprofiles/internlist.html.erb
Normal file
5
app/views/fetprofiles/internlist.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<table style="width:100%" class="table table-striped">
|
||||
<% @fetprofiles.each do |item| %>
|
||||
<%= render partial: "internrow", object: item %>
|
||||
<% end %>
|
||||
</table>
|
||||
@@ -10,10 +10,15 @@
|
||||
<p>
|
||||
<%= @fetprofile.fetmail %>
|
||||
</p>
|
||||
<p>
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @fetprofiles }
|
||||
end
|
||||
|
||||
<p>
|
||||
<%= @fetprofile.desc %>
|
||||
</p>
|
||||
|
||||
<%= render partial: "interninfo", object: @fetprofile if can?(:seeintern, @fetprofile) %>
|
||||
<ul>
|
||||
<% @memberships.each do |m| %>
|
||||
<li>
|
||||
|
||||
@@ -10,3 +10,5 @@
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= tinymce %>
|
||||
|
||||
@@ -10,3 +10,4 @@
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
|
||||
@@ -7,35 +7,29 @@
|
||||
<%= f.input :thema, :as=> :select, :collection => Thema.all %>
|
||||
|
||||
|
||||
<% f.inputs :for => :memberships, :objects=>@memberships do |membership,i| %>
|
||||
<div class="row-fluid">
|
||||
<div class="span1"></div>
|
||||
<div class="span3"><%= membership.input :start, :as=>:datepicker, :prepend=>"von",:label=>false%></div>
|
||||
<div class="span3"><%= membership.input :stop, :as=>:datepicker,:label=>false, :prepend =>"bis" %></div>
|
||||
<div class="span2"><%= membership.input :typ ,:as=>:select, :collection=>Membership::TYPEN.invert, :label=>false %></div>
|
||||
<div class="span3"><%= membership.input :fetprofile, :as=>:select, :label=>false %></div>
|
||||
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% @memberships.each do |m| %>
|
||||
|
||||
<% @memberships.each do |m| %>
|
||||
<%= f.semantic_fields_for :memberships, m do |memberships_attributes| %>
|
||||
<div class="row-fluid">
|
||||
<div class="span1"></div>
|
||||
<div class="span3"><%= memberships_attributes.input :start, :as=>:datepicker, :prepend=>"von",:label=>false%></div>
|
||||
<div class="span3"><%= memberships_attributes.input :stop, :as=>:datepicker,:label=>false, :prepend =>"bis" %></div>
|
||||
<div class="span2"><%= memberships_attributes.input :typ ,:as=>:select, :collection=>Membership::TYPEN.invert, :label=>false %></div>
|
||||
<div class="span3"><%= memberships_attributes.input :fetprofile, :as=>:select, :label=>false %></div>
|
||||
|
||||
|
||||
<div class="span11">
|
||||
<table>
|
||||
<tr><td><%= memberships_attributes.input :start, :as=>:datepicker, :prepend=>"von",:label=>false , :input_html => { :style => "width:6em" } ,:value=>Proc.new { |c| I18n.l(c) }%>
|
||||
</td>
|
||||
<td>
|
||||
<%= memberships_attributes.input :stop, :as=>:datepicker,:label=>false, :prepend =>"bis" , :input_html => { :style => "width:6em"},:value_method=>Proc.new { |c| I18n.l(c) }%>
|
||||
</td>
|
||||
<td>
|
||||
<%= memberships_attributes.input :typ ,:as=>:select, :collection=>Membership::TYPEN.invert, :label=>false, :input_html => { :style => "width:12em" } %>
|
||||
</td>
|
||||
<td><%= memberships_attributes.input :fetprofile, :as=>:select, :label=>false %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
@@ -43,3 +37,9 @@
|
||||
<% end %>
|
||||
<script>$('.datepicker').datepicker()</script>
|
||||
<%= tinymce %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<h1>Listing gremien</h1>
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
<div class="container-fluid">
|
||||
<% @gremien.each do |gremium| %>
|
||||
<div class="row-fluid">
|
||||
@@ -38,7 +39,7 @@
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,31 @@
|
||||
<h1> FET Intern NEU </h1>
|
||||
<h2>Neuigkeiten</h2>
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<%= link_to "Adressliste", internlist_fetprofiles_path %>
|
||||
<%= link_to "Internes Nachschlagewerk" %>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<li>
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
<div class="container-fluid">
|
||||
<%= render themengruppe if can?(:show,themengruppe)%>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h2>Neuigkeiten</h2>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2></h2>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1><%=lva.typ.to_s + ' ' + lva.name %></h1>
|
||||
<h1><%= lva.typ_n.to_s + ' ' + lva.name %></h1>
|
||||
<h2>Prüfungsinformation</h2>
|
||||
<div class="">
|
||||
<%= lva.pruefungsinformation.to_s.html_safe %>
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<h1><%=@lva.typ.to_s + ' ' + @lva.name %></h1>
|
||||
<h1><%= @lva.full_name %></h1>
|
||||
|
||||
<h2>Prüfungsinformation</h2>
|
||||
<div class="">
|
||||
<%= @lva.pruefungsinformation.html_safe %>
|
||||
<%= @lva.pruefungsinformation.to_s.html_safe %>
|
||||
</div>
|
||||
|
||||
<h2>Lernaufwand</h2>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
<%= membership.stop.nil? ? "seit " : "von " %>
|
||||
<%=membership.start.to_s %>
|
||||
<%= " bis "+membership.stop.to_s unless membership.stop.nil? %>
|
||||
<%= Membership::TYPEN[membership.typ.to_i] %>
|
||||
<%= Membership::TYPEN_g[membership.fetprofile.geschlecht.to_i][membership.typ.to_i] %>
|
||||
<%= membership.gremium.fall2 %>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<div class="span8">
|
||||
<h2><%= sem.name %></h2>
|
||||
</div>
|
||||
<div class="span4"><div class="pull-right"><%= link_to I18n.t("lva.addrem"), edit_semester_path(sem), :class=>"btn-small"%>
|
||||
</div>
|
||||
<div class="span4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% sem.lvas.each do |lva| %>
|
||||
|
||||
@@ -20,16 +20,17 @@
|
||||
<% end %>
|
||||
|
||||
<% @studium.semester.each do |sem| %>
|
||||
<div class="row-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="contentbox">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span8">
|
||||
<h2><%= sem.name %></h2>
|
||||
</div>
|
||||
<div class="span4"><div class="pull-right"><%= link_to I18n.t("lva.addrem"), edit_semester_path(sem), :class=>"btn-small"%></div>
|
||||
<h2><%= sem.name %></h2>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<div class="pull-right"><!--<% link_to I18n.t("lva.addrem"), edit_semester_path(sem), :class=>"btn-small"%>--></div>
|
||||
</div></div>
|
||||
<% sem.lvas.each do |lva| %>
|
||||
<div class="row-fluid">
|
||||
|
||||
@@ -2,11 +2,17 @@
|
||||
<% attachment_list.each do |a| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to a.datei.url do %>
|
||||
<%= render a %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% if editor %>
|
||||
<td>
|
||||
<%= link_to "Edit", edit_thema_attachment_path(a.thema,a) %>
|
||||
<%= link_to "Delete", thema_attachment_path(a.thema,a), method: "DELETE", confirm: "Sure?" %>
|
||||
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
3
app/views/themen/_attachment_verwalten.html.erb
Normal file
3
app/views/themen/_attachment_verwalten.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
<%= render :partial=>"attachments/form_bulk" %>
|
||||
<%= render partial: "themen/attachment_list", object:@thema.attachments ,locals: {:editor => true}%>
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<%= semantic_form_for @thema, :remote=>true do |f| %>
|
||||
<%= semantic_form_for @thema, :remote=>remote do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
<div id="fragenform">
|
||||
<%= render :partial=>'fragen/rform' %>
|
||||
</div>
|
||||
<% @frage_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('frage.add'), :path=>new_frage_path}] %>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@frage_elements %>
|
||||
<% # @frage_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('frage.add'), :path=>new_frage_path}] %>
|
||||
<% # render :partial=>'layouts/pretty_toolbar', :object=>@frage_elements %>
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
|
||||
<h2><%= small.title %></h2>
|
||||
</a>
|
||||
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
|
||||
<h2><%= small.title %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %></h2>
|
||||
</a>
|
||||
<%= raw(small.text) %>
|
||||
<br/>
|
||||
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>
|
||||
|
||||
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>
|
||||
<br/>
|
||||
<% small.fragen.each do |frage| %>
|
||||
<p>
|
||||
<b> <%= frage.title %> </b> <br/>
|
||||
<%= raw(frage.text) %>
|
||||
<b> <%= frage.title %> </b> <br/>
|
||||
<%= raw(frage.text) %>
|
||||
</p>
|
||||
<br/>
|
||||
<% end %>
|
||||
|
||||
<%= render partial: "themen/attachment_list", object: small.attachments, locals:{editor: false} unless small.attachments.empty? %>
|
||||
<br/>
|
||||
|
||||
|
||||
<%
|
||||
@small_elements = []
|
||||
@small_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>small} if can? :edit, small
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t('thema.show')+"</h2>")+render(:partial=>"themen/attachment_list", :object=>@attachments) )%>");
|
||||
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t('thema.show')+"</h2>")+render(:partial=>"themen/attachment_verwalten") )%>");
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="themaview">
|
||||
<h1>Editing thema</h1>
|
||||
<%= render 'form' %>
|
||||
<%= render 'form' , :locals=>{:remote=>false}, :remote=>false %>
|
||||
</div>
|
||||
</br><%= link_to 'Back', @thema %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t('thema.edit')+"</h2>")+render(:partial=>"themen/form") )%>");
|
||||
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t('thema.edit')+"</h2>")+render(:partial=>"themen/form", :locals=>{:remote=>true}) )%>");
|
||||
|
||||
@@ -5,5 +5,3 @@
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<%= link_to new_thema_attachment_path(@thema) ,:remote=>true do %> new Attachment <% end %>
|
||||
<%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1><%= @thema.title %></h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
|
||||
<p>
|
||||
<%= raw(@thema.text) %>
|
||||
</p>
|
||||
@@ -11,16 +14,22 @@
|
||||
-->
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<h2><%= I18n.t('attachment.title')%>:</h2>
|
||||
<div id="attachmentform">
|
||||
</div>
|
||||
<%= render partial: "attachment_verwalten" %>
|
||||
<%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>
|
||||
|
||||
</div>
|
||||
<div class="span6">
|
||||
|
||||
<%= render :partial=>'themen/fragen' %>
|
||||
<!--
|
||||
<%= link_to 'Neue Frage', new_frage_path %> <br/>
|
||||
-->
|
||||
<br/>
|
||||
|
||||
<h2><%= I18n.t('attachment.title')%>:</h2>
|
||||
<div id="attachmentform">
|
||||
</div>
|
||||
|
||||
<%= link_to new_thema_attachment_path(@thema) ,:remote=>true do %> new Attachment <% end %>
|
||||
<%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>
|
||||
<%= link_to I18n.t('common.back'), themengruppen_path, :class=>:btn %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :priority %>
|
||||
<%= f.input :public %>
|
||||
<%= f.input :picture, :as => :file %>
|
||||
<%= f.input :text %>
|
||||
|
||||
|
||||
@@ -1,35 +1,28 @@
|
||||
<div class="content-wrap content-column">
|
||||
<p> <%= link_to "FAQS", faqs_themengruppen_path,class: :btn %></p>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<li>
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
|
||||
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
<p>
|
||||
<%= link_to "FAQS", faqs_themengruppen_path,class: :btn %>
|
||||
</p>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<li>
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
<div class="container-fluid">
|
||||
<%= render themengruppe %>
|
||||
<br/>
|
||||
<div class="row-fluid">
|
||||
<!--
|
||||
<%= link_to 'Edit', edit_themengruppe_path(themengruppe) %>
|
||||
-->
|
||||
</div>
|
||||
<%= render themengruppe if can?(:show,themengruppe)%>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<script class="hidden-phone">
|
||||
|
||||
<!-- make_equal_height();
|
||||
-->
|
||||
</script>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<!--
|
||||
<%= link_to 'New Themengruppe', new_themengruppe_path %>
|
||||
-->
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<div class="content-wrap content-column" >
|
||||
<%= link_to fa_icon("arrow-circle-left 2x")+" Alle Themengruppen", themengruppen_path, :class=>"linkbox" %>
|
||||
<%= link_to fa_icon("question 2x")+" Häufige Fragen", faqs_themengruppen_path(:anchor=>"themengruppe_"+@themengruppe.id.to_s), :class=>"linkbox" %>
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<h1><%= @themengruppe.title %></h1>
|
||||
|
||||
<p>
|
||||
<%= @themengruppe.text %>
|
||||
</p>
|
||||
@@ -10,13 +13,8 @@
|
||||
<li>
|
||||
<div class="contentbox">
|
||||
<%= render :partial => 'themen/small', :object => thema %>
|
||||
tools:
|
||||
<%
|
||||
@small_elements2 = []
|
||||
@small_elements2 << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('common.verwalten'), :path=>verwalten_thema_path(thema)} if can? :edit, thema
|
||||
|
||||
%>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@small_elements2 unless @small_elements2.empty? %>
|
||||
|
||||
<ul class="unstyled">
|
||||
<% unless thema.gremium.nil? %>
|
||||
|
||||
@@ -37,5 +35,4 @@
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#themen { list-style-type: none; margin: 0; padding: 0; margin-bottom: 15px;zoom: 1; }
|
||||
#themen li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 95%; }
|
||||
</style>
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<ul id="themengruppen" class="sort" >
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
<li id="themengruppen_<%= themengruppe.id %>" class="sort" style="background:white;display:block;" ><%= themengruppe.title %>-<%= themengruppe.priority %></li>
|
||||
@@ -6,7 +8,6 @@
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
|
||||
$( document ).ready(function(){
|
||||
$("#themengruppen").sortable({
|
||||
cursor: 'crosshair',
|
||||
|
||||
56
app/views/themes/blue1/home/index.html.erb
Normal file
56
app/views/themes/blue1/home/index.html.erb
Normal file
@@ -0,0 +1,56 @@
|
||||
<div class="content-wrap content-column">
|
||||
<h1><%= I18n.t('home.willkommen') %></h1></p>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
|
||||
|
||||
<p>
|
||||
<%= link_to I18n.t('home.login'), user_omniauth_authorize_path(:ldap) %>
|
||||
</p>
|
||||
<div class="alert">
|
||||
<h2>Beta Test</h2>
|
||||
<p>Die Webseite befindet sich derzeit in einem Entwicklungsstadium,
|
||||
volle Funktionsfähigkeit ist noch nicht erreicht. Bitte Featurerequests und
|
||||
Fehlermeldungen auf GitHub melden.
|
||||
</p>
|
||||
<p>
|
||||
<%= link_to "Issues", "http://www.github.com/fetsite/fetsite/issues" %>
|
||||
</p>
|
||||
<p>
|
||||
Bezüglich Design und Steuerung sind Vorschläge erwünscht.
|
||||
</p>
|
||||
<p><%= link_to "Steuerelemente und Komponenten", "http://getbootstrap.com/2.3.2/index.html" %></p>
|
||||
<p>Um bei der Entwicklung mitzuhelfen braucht nur Ruby on Rails installiert werden</p>
|
||||
<p><%= link_to "Getting Started" , startdev_home_index_path %></p>
|
||||
<p> Das Kalender Feature wird überarbeitet, in Zukunft soll folgender Link nicht mehr funktionieren <%= link_to "Kalender", calendars_path %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<%= link_to "Entwicklungsstatus" , dev_home_index_path %>
|
||||
<p>
|
||||
<%= link_to "FAQS", faqs_themengruppen_path,class: :btn %>
|
||||
</p>
|
||||
|
||||
<%= render 'beispiele' %>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<ul class="unstyled linkbox-list" style="max-width:70em">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
Verschiedene Styles
|
||||
<ul>
|
||||
<li> <%= link_to "Darkblue", home_index_path({:theme=>"darkblue"}) %></li>
|
||||
<li> <%= link_to "Blue1", home_index_path({:theme=>"blue1"}) %></li>
|
||||
|
||||
<li> <%= link_to "2003", home_index_path({:theme=>"2003"}) %></li>
|
||||
<li> <%= link_to "white_1", home_index_path({:theme=>"white_1"}) %></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
38
app/views/wikis/_form.html.erb
Normal file
38
app/views/wikis/_form.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<%= tinymce_assets %>
|
||||
<div class="container-fluid">
|
||||
<%= semantic_form_for @wiki, :remote=>remote do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<%= f.input :title %>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<%= f.input :themengruppe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<%= f.input :wikiformat, :as=>:select, :collection=>Wiki::WIKIFORMATS.invert %>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<%= f.input :hidelink, :as=>:boolean %>
|
||||
|
||||
<%= @wiki.wikiname %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= f.input :raw_data, :label=>false,:as=>:text, :input_html=>{:rows=>20,:class=>"row-fluid"} %>
|
||||
</div>
|
||||
</div>
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :button %>
|
||||
<%= f.action :cancel, :as => :link %>
|
||||
<% end %>
|
||||
<% end %><% end %>
|
||||
<%= tinymce %>
|
||||
<h2>Attachments:</h2>
|
||||
|
||||
|
||||
|
||||
5
app/views/wikis/edit.html.erb
Normal file
5
app/views/wikis/edit.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<div id="themaview">
|
||||
<h1>Editing thema</h1>
|
||||
<%= render 'form', :remote=>false, :locals=>{:remote=>false} %>
|
||||
</div>
|
||||
</br><%= link_to 'Back', @thema %>
|
||||
1
app/views/wikis/edit.js.erb
Normal file
1
app/views/wikis/edit.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t('wiki.edit')+"</h2>")+render(:partial=>"wikis/form", :locals=>{:remote=>true}) )%>");
|
||||
9
app/views/wikis/show.html.erb
Normal file
9
app/views/wikis/show.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<%= link_to "Zurück", @wiki.themengruppe %>
|
||||
<br>
|
||||
<%= debug @wiki %>
|
||||
<%= render :partial=>"themen/small", :object=>@wiki %>
|
||||
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
8
app/views/wikis/verwalten.html.erb
Normal file
8
app/views/wikis/verwalten.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
verwalte ein wiki
|
||||
|
||||
<%= @wiki %>
|
||||
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<%= debug @wiki %>
|
||||
<%= debug params %>
|
||||
@@ -1,5 +1,5 @@
|
||||
Fetsite::Application.routes.draw do
|
||||
themes_for_rails
|
||||
themes_for_rails
|
||||
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
|
||||
resources :home, :only=>[:index] do
|
||||
|
||||
@@ -16,10 +16,24 @@
|
||||
get 'users/:id/do_confirm', :controller=>:users, :action=>:do_confirm, :as=>'user_do_confirm'
|
||||
get 'config',:controller=>:config,:action=>:index , :as => 'config'
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
devise_for :users , :controllers=>{:omniauth_callbacks=> "users/omniauth_callbacks"}
|
||||
scope '(:locale)' do
|
||||
scope '(t/:theme)' do
|
||||
|
||||
get "wiki/:name", action: :wiki, controller: :wikis
|
||||
resources :wikis do
|
||||
member do
|
||||
get :verwalten
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# end
|
||||
# end
|
||||
scope ':locale' do
|
||||
scope '(t/:theme)' do
|
||||
# Studien
|
||||
@@ -57,6 +71,7 @@
|
||||
resources :fetprofiles do
|
||||
collection do
|
||||
get 'verwalten'
|
||||
get 'internlist'
|
||||
end
|
||||
resources :memberships, :only => [:new, :edit, :update,:destroy,:create]
|
||||
end
|
||||
|
||||
15
db/migrate/20140522094444_add_adress_to_fetprofile.rb
Normal file
15
db/migrate/20140522094444_add_adress_to_fetprofile.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class AddAdressToFetprofile < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :fetprofiles, :street, :string
|
||||
add_column :fetprofiles, :plz, :string
|
||||
add_column :fetprofiles, :telnr, :string
|
||||
add_column :fetprofiles, :hdynr, :string
|
||||
add_column :fetprofiles, :skype, :string
|
||||
add_column :fetprofiles, :instant, :string
|
||||
add_column :fetprofiles, :city, :string
|
||||
add_column :fetprofiles, :birth_day, :integer
|
||||
add_column :fetprofiles, :birth_month, :integer
|
||||
add_column :fetprofiles, :birth_year, :integer
|
||||
add_column :fetprofiles, :public_birthday, :boolean
|
||||
end
|
||||
end
|
||||
5
db/migrate/20140526054302_add_public_to_themengruppe.rb
Normal file
5
db/migrate/20140526054302_add_public_to_themengruppe.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddPublicToThemengruppe < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :themengruppen, :public, :boolean
|
||||
end
|
||||
end
|
||||
7
db/migrate/20140529120536_add_wiki_to_thema.rb
Normal file
7
db/migrate/20140529120536_add_wiki_to_thema.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class AddWikiToThema < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :themen, :wikiname, :string
|
||||
add_column :themen, :wikiformat, :integer
|
||||
add_column :themen, :hidelink, :boolea
|
||||
end
|
||||
end
|
||||
5
db/migrate/20140601114003_add_wiki_to_themengruppen.rb
Normal file
5
db/migrate/20140601114003_add_wiki_to_themengruppen.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddWikiToThemengruppen < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :themengruppen, :wiki_default, :boolean
|
||||
end
|
||||
end
|
||||
5
db/migrate/20140603140147_add_sex_to_fetprofile.rb
Normal file
5
db/migrate/20140603140147_add_sex_to_fetprofile.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddSexToFetprofile < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :fetprofiles, :geschlecht, :integer
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user