49 Commits

Author SHA1 Message Date
Andreas Stephanides
1e342cb66a v0.0.3a 2014-03-25 16:14:21 +01:00
Andreas Stephanides
1257d55403 modul view fixed 2014-03-24 14:41:08 +01:00
Andreas Stephanides
69111eb8e7 versions link fix 2014-03-24 14:40:54 +01:00
Andreas Stephanides
1857566b70 modulgruppenansicht 2014-03-23 21:48:38 +01:00
Andreas Stephanides
6f3c172ea1 Ansichtlinks translated 2014-03-23 21:48:30 +01:00
Andreas Stephanides
5186f06cdd links in studienansicht fixed 2014-03-23 21:28:55 +01:00
Andreas Stephanides
c235619e31 diverse fixed 2014-03-23 21:02:47 +01:00
Andreas Stephanides
8f4528f994 studienansicht zentralisisert
immer show template mit unterschiedlichen partials statt komplett
unterschiedlichen templates
2014-03-23 21:02:16 +01:00
82d591a116 gitignore 2014-03-18 17:38:46 +01:00
52d24d463f inti debuguser 2014-03-18 17:38:31 +01:00
01977cef20 Infofile fürblue1 added 2014-03-18 10:05:30 +01:00
1f886cc99a fixed nil error Studium
Wenn Beschreibung leer, dann leeren String als Kurzbeschreibung
zurückgeben
2014-03-18 09:56:12 +01:00
Andreas Stephanides
cbec643b96 #114 closed 2014-03-16 15:28:22 +01:00
Andreas Stephanides
94778f0fa7 Issue #71 Tisslink in neuem Tab
Issue #71 closed
2014-03-16 14:55:18 +01:00
Andreas Stephanides
c9fb304a78 Das Wort Semester hinzugefügt 2014-03-16 14:24:43 +01:00
Andreas Stephanides
699ef383eb raute dateien ignorieren (emacs) 2014-03-16 14:17:02 +01:00
Andreas Stephanides
0411a71394 logos 2014-03-16 14:16:21 +01:00
Andreas Stephanides
4eebaec132 missing views & Migration 2014-03-16 14:16:15 +01:00
Andreas Stephanides
6d4c24742a added some transations to thema 2014-03-16 14:15:48 +01:00
Andreas Stephanides
2598fc28f9 button text lvas 2014-03-16 14:15:24 +01:00
Andreas Stephanides
0959cb067d fixed insert issue 2014-03-16 14:15:06 +01:00
Andreas Stephanides
286fb014d2 kontakt added 2014-03-16 13:32:27 +01:00
Andreas Stephanides
3b8aee9e47 searchresults themen fixed 2014-03-16 13:32:09 +01:00
Andreas Stephanides
34fe0739d6 lecturers von tiss laden 2014-03-16 13:13:31 +01:00
Andreas Stephanides
dbf02ef3f8 removed database.yml 2014-03-16 11:23:23 +01:00
Andreas Stephanides
dfe06c5495 remotipart removed 2014-03-16 11:20:04 +01:00
Andreas Stephanides
340c9a4455 fetlogin translated 2014-03-16 11:19:47 +01:00
Andreas Stephanides
35cb224fb6 beuigkeiten reihenfolge fix 2014-03-16 11:19:31 +01:00
Andreas Stephanides
e62416dde4 remotipart fix 2014-03-16 11:19:18 +01:00
Andreas Stephanides
4ac7b41a7f lecturer load lva load first steps 2014-03-16 11:19:10 +01:00
Andreas Stephanides
bc455fcf06 Merge branch 'master' of github.com:fetsite/fetsite 2014-03-16 10:04:10 +01:00
HausdorffHimself
41ac6887af Merge pull request #125 from HausdorffHimself/master
Fixed Issues
2014-03-12 22:36:44 +01:00
Andreas Deutschmann
9fae6dae7f FIX: Translation Missing Themengruppe verwalten 2014-03-12 22:20:04 +01:00
Andreas Deutschmann
1dd6f027a0 FIX: Issue #117 2014-03-12 22:07:03 +01:00
Andreas Deutschmann
6022491a26 FIX: Translations Gremien Issure #121 2014-03-12 17:58:49 +01:00
Andreas Stephanides
28dd49bbee Merge branch 'master' of github.com:fetsite/fetsite
Conflicts:
	Gemfile.lock
2014-02-23 14:30:26 +01:00
Andreas Stephanides
aa2ef0955c gemfile fix 2014-02-23 14:26:01 +01:00
14b42ef33a Merge branch 'master' of https://github.com/fetsite/fetsite
Conflicts:
	Gemfile.lock
2014-02-22 19:27:08 +01:00
35941f0f72 fixes for new server 2014-02-22 19:00:03 +01:00
Andreas Stephanides
fce30918a9 Merge branch 'master' of github.com:fetsite/fetsite
Conflicts:
	Gemfile.lock
2014-02-20 10:52:49 +01:00
Andreas Stephanides
16102fbef6 gemlock 2014-02-20 10:50:50 +01:00
Andreas Stephanides
8897a217d9 upload beispiele attachments... 2014-02-20 10:50:03 +01:00
Andreas Stephanides
f13a59b64e link zu gremien 2014-02-20 10:49:29 +01:00
Andreas Stephanides
032d7913e8 testing remotipart 2014-02-20 10:49:11 +01:00
Andreas Stephanides
c314be8574 default theme -> blue1 2014-02-20 10:48:30 +01:00
Andreas Stephanides
b7c577d3b9 calender eintrag im compact view 2014-02-16 15:34:33 +01:00
Andreas Stephanides
82388150ff themengruppen verwaltung ergänzung 2014-02-16 15:34:16 +01:00
Andreas Stephanides
87d7cc247a themengruppen verwalten form 2014-02-16 15:32:04 +01:00
Andreas Stephanides
e466ed5679 no alerts sort_all 2014-02-10 19:27:41 +01:00
99 changed files with 907 additions and 633 deletions

9
.gitignore vendored
View File

@@ -1,4 +1,9 @@
/db/.#initdebug.rb
/usergroup.ldif
/newuser.ldif
/passwd.ldif
/config/omniauth_secrets.yml /config/omniauth_secrets.yml
/config/database.yml
/config/initializers/omniauth_secrets.rb /config/initializers/omniauth_secrets.rb
# See http://help.github.com/ignore-files/ for more about ignoring files. # See http://help.github.com/ignore-files/ for more about ignoring files.
# #
@@ -14,7 +19,7 @@
/db/schema.rb /db/schema.rb
/db/structure.sql /db/structure.sql
/config/initializers/devise.rb /config/initializers/devise.rb
Gemfile.lock
# Ignore all logfiles and tempfiles. # Ignore all logfiles and tempfiles.
/log/*.log /log/*.log
/tmp /tmp
@@ -24,4 +29,4 @@
console console
/server /server
/public/uploads/ /public/uploads/
*#

View File

@@ -1,7 +1,7 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'rails', '3.2.9' gem 'rails', '3.2.13'
gem 'sprockets', '2.2.2'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2' gem 'mysql2'
@@ -93,3 +93,4 @@ gem "seed_dump", "~> 0.5.3"
#gem "themes_for_rails" ,:git =>'git://github.com/tkriplean/themes_for_rails.git' #gem "themes_for_rails" ,:git =>'git://github.com/tkriplean/themes_for_rails.git'
#gem "themes_for_rails", :git=> 'git://github.com/lucasefe/themes_for_rails.git' #gem "themes_for_rails", :git=> 'git://github.com/lucasefe/themes_for_rails.git'
gem 'themes_for_rails' gem 'themes_for_rails'

View File

@@ -9,32 +9,32 @@ GIT
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actionmailer (3.2.9) actionmailer (3.2.13)
actionpack (= 3.2.9) actionpack (= 3.2.13)
mail (~> 2.4.4) mail (~> 2.5.3)
actionpack (3.2.9) actionpack (3.2.13)
activemodel (= 3.2.9) activemodel (= 3.2.13)
activesupport (= 3.2.9) activesupport (= 3.2.13)
builder (~> 3.0.0) builder (~> 3.0.0)
erubis (~> 2.7.0) erubis (~> 2.7.0)
journey (~> 1.0.4) journey (~> 1.0.4)
rack (~> 1.4.0) rack (~> 1.4.5)
rack-cache (~> 1.2) rack-cache (~> 1.2)
rack-test (~> 0.6.1) rack-test (~> 0.6.1)
sprockets (~> 2.2.1) sprockets (~> 2.2.1)
activemodel (3.2.9) activemodel (3.2.13)
activesupport (= 3.2.9) activesupport (= 3.2.13)
builder (~> 3.0.0) builder (~> 3.0.0)
activerecord (3.2.9) activerecord (3.2.13)
activemodel (= 3.2.9) activemodel (= 3.2.13)
activesupport (= 3.2.9) activesupport (= 3.2.13)
arel (~> 3.0.2) arel (~> 3.0.2)
tzinfo (~> 0.3.29) tzinfo (~> 0.3.29)
activeresource (3.2.9) activeresource (3.2.13)
activemodel (= 3.2.9) activemodel (= 3.2.13)
activesupport (= 3.2.9) activesupport (= 3.2.13)
activesupport (3.2.9) activesupport (3.2.13)
i18n (~> 0.6) i18n (= 0.6.1)
multi_json (~> 1.0) multi_json (~> 1.0)
annotate (2.6.1) annotate (2.6.1)
activerecord (>= 2.3.0) activerecord (>= 2.3.0)
@@ -96,7 +96,7 @@ GEM
hashie (2.0.5) hashie (2.0.5)
hike (1.2.3) hike (1.2.3)
httpauth (0.2.0) httpauth (0.2.0)
i18n (0.6.9) i18n (0.6.1)
journey (1.0.4) journey (1.0.4)
jquery-fileupload-rails (0.4.1) jquery-fileupload-rails (0.4.1)
actionpack (>= 3.1) actionpack (>= 3.1)
@@ -104,17 +104,18 @@ GEM
jquery-rails (3.0.4) jquery-rails (3.0.4)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-ui-rails (4.1.1)
railties (>= 3.1.0)
json (1.8.1) json (1.8.1)
jwt (0.1.8) jwt (0.1.8)
multi_json (>= 1.5) multi_json (>= 1.5)
libv8 (3.16.14.3) libv8 (3.16.14.3)
mail (2.4.4) mail (2.5.4)
i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
mime-types (1.25.1) mime-types (1.25.1)
mini_portile (0.5.2) mini_portile (0.5.2)
multi_json (1.8.2) multi_json (1.8.4)
multipart-post (1.2.0) multipart-post (1.2.0)
mysql2 (0.3.14) mysql2 (0.3.14)
net-ldap (0.3.1) net-ldap (0.3.1)
@@ -155,17 +156,17 @@ GEM
rack rack
rack-test (0.6.2) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (3.2.9) rails (3.2.13)
actionmailer (= 3.2.9) actionmailer (= 3.2.13)
actionpack (= 3.2.9) actionpack (= 3.2.13)
activerecord (= 3.2.9) activerecord (= 3.2.13)
activeresource (= 3.2.9) activeresource (= 3.2.13)
activesupport (= 3.2.9) activesupport (= 3.2.13)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.2.9) railties (= 3.2.13)
railties (3.2.9) railties (3.2.13)
actionpack (= 3.2.9) actionpack (= 3.2.13)
activesupport (= 3.2.9) activesupport (= 3.2.13)
rack-ssl (~> 1.3.2) rack-ssl (~> 1.3.2)
rake (>= 0.8.7) rake (>= 0.8.7)
rdoc (~> 3.4) rdoc (~> 3.4)
@@ -199,7 +200,7 @@ GEM
seed_dump (0.5.3) seed_dump (0.5.3)
simple_calendar (0.1.9) simple_calendar (0.1.9)
rails (>= 3.0) rails (>= 3.0)
sprockets (2.2.1) sprockets (2.2.2)
hike (~> 1.2) hike (~> 1.2)
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
@@ -246,13 +247,14 @@ DEPENDENCIES
haml haml
jquery-fileupload-rails jquery-fileupload-rails
jquery-rails jquery-rails
jquery-ui-rails (~> 4.1.1)
mysql2 mysql2
omniauth omniauth
omniauth-facebook omniauth-facebook
omniauth-ldap omniauth-ldap
paper_trail (>= 2.7.0)! paper_trail (>= 2.7.0)!
paperclip (~> 3.4.0) paperclip (~> 3.4.0)
rails (= 3.2.9) rails (= 3.2.13)
rmagick rmagick
rolify rolify
rspec-rails rspec-rails
@@ -260,6 +262,7 @@ DEPENDENCIES
sass-rails (~> 3.2) sass-rails (~> 3.2)
seed_dump (~> 0.5.3) seed_dump (~> 0.5.3)
simple_calendar (~> 0.1.9) simple_calendar (~> 0.1.9)
sprockets (= 2.2.2)
sqlite3 sqlite3
themes_for_rails themes_for_rails
therubyracer therubyracer

View File

@@ -25,15 +25,25 @@
//= require bootstrap/load-image.min //= require bootstrap/load-image.min
//= require bootstrap/image-gallery.min //= require bootstrap/image-gallery.min
//= require jquery-fileupload //= require jquery-fileupload
// require jquery.remotipart
function insertAttachment(url,name) { function insertAttachment(url,name) {
var ext = url.split('.').pop().toLowerCase(); var ext = url.split('.').pop().toLowerCase();
var img_ext = [ "jpg", "png", "bmp" , "jpeg" ]; var img_ext = [ "jpg", "png", "bmp" , "jpeg" ];
// if ( img_ext.indexOf(ext) > -1) {
// tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<img src=\"" + url + "\" title=\"" + name + "\">");
// }
// else {
// tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<a href=\"" + url + "\">" + name +"</a>");
// }
if ( img_ext.indexOf(ext) > -1) { if ( img_ext.indexOf(ext) > -1) {
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<img src=\"" + url + "\" title=\"" + name + "\">"); tinymce.activeEditor.execCommand('mceInsertContent', false, "<img src=\"" + url + "\" title=\"" + name + "\">");
} }
else { else {
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "<a href=\"" + url + "\">" + name +"</a>"); tinymce.activeEditor.execCommand('mceInsertContent', false, "<a href=\"" + url + "\">" + name +"</a>");
} }
} }

View File

@@ -22,6 +22,6 @@ else
end end
end end
def default_url_options def default_url_options
{locale: I18n.locale, theme: theme_name} {locale: I18n.locale, theme: theme_name, ansicht: nil}
end end
end end

View File

@@ -32,6 +32,7 @@ class AttachmentsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # new.html.erb format.html # new.html.erb
format.json { render json: @attachment } format.json { render json: @attachment }
format.js
end end
end end
@@ -46,15 +47,18 @@ class AttachmentsController < ApplicationController
def create def create
@attachment = Attachment.new(params[:attachment]) @attachment = Attachment.new(params[:attachment])
@thema = Thema.find(params[:thema_id]) @thema = Thema.find(params[:thema_id])
@attachment.thema_id = @thema.id @attachment.thema_id = @thema.id
@action="create"
logger.info "#{@attachment.inspect}"
respond_to do |format| respond_to do |format|
if @attachment.save if @attachment.save
format.html { redirect_to @thema, notice: 'Attachment was successfully created.' } format.html { redirect_to @thema, notice: 'Attachment was successfully created.' }
format.json { render json: @thema, status: :created, location: @thema } format.json { render json: @thema, status: :created, location: @thema }
format.js { }
else else
format.html { render action: "new" } format.html { render action: "new" }
format.json { render json: @attachment.errors, status: :unprocessable_entity } format.json { render json: @attachment.errors, status: :unprocessable_entity }
format.js { render action: "new.js.erb"}
end end
end end
end end
@@ -69,9 +73,11 @@ class AttachmentsController < ApplicationController
if @attachment.update_attributes(params[:attachment]) if @attachment.update_attributes(params[:attachment])
format.html { redirect_to @thema, notice: 'Attachment was successfully updated.' } format.html { redirect_to @thema, notice: 'Attachment was successfully updated.' }
format.json { head :no_content } format.json { head :no_content }
format.js {@attachment=Attachment.new; render action:"create"}
else else
format.html { render action: "edit" } format.html { render action: "edit" }
format.json { render json: @attachment.errors, status: :unprocessable_entity } format.json { render json: @attachment.errors, status: :unprocessable_entity }
format.js { render action: "new"}
end end
end end
end end

View File

@@ -43,15 +43,29 @@ class BeispieleController < ApplicationController
# POST /beispiele # POST /beispiele
# POST /beispiele.json # POST /beispiele.json
def create def create
logger.info "Creating Beispiel..."
@lva = Lva.find_by_id(params[:lva_id]) @lva = Lva.find_by_id(params[:lva_id])
params.delete(:lva_id) params.delete(:lva_id)
@beispiel = Beispiel.new(params[:beispiel]) @beispiel = Beispiel.new(params[:beispiel])
@backlink = @beispiel.lva.nil? ? root_url : lva_path(@beispiel.lva) @beispiel.lva=@lva
logger.info "New Beispiel: #{params.inspect}"
# @backlink = @beispiel.lva.nil? ? root_url : lva_path(@beispiel.lva)
@beispiel.name=@beispiel.beispieldatei.filename
logger.info "New Beispiel: #{@beispiel.attributes.inspect}"
@beispiel.datum=Time.now
respond_to do |format| respond_to do |format|
@beispiel.name=@beispiel.beispieldatei.to_s.split('/').last
if @beispiel.save if @beispiel.save
format.html { redirect_to @backlink, notice: 'Beispiel was successfully created.' } format.html {
format.json { render json: @beispiel, status: :created, location: @beispiel } render :json => [@beispiel.to_jq_upload].to_json,
:content_type => 'text/html',
:layout => false
}
format.json { render json: {files: [@beispiel.to_jq_upload]}, status: :created, location: [@lva, @beispiel] }
# format.html { redirect_to @backlink, notice: 'Beispiel was successfully created.' }
# format.json { render json: @beispiel, status: :created, location: @beispiel }
else else
format.html { render action: "new" } format.html { render action: "new" }
format.json { render json: @beispiel.errors, status: :unprocessable_entity } format.json { render json: @beispiel.errors, status: :unprocessable_entity }

View File

@@ -28,7 +28,7 @@ class FetprofilesController < ApplicationController
@toolbar_elements << {:hicon=>'icon-pencil', :text=> I18n.t('common.edit'),:path => edit_fetprofile_path(@fetprofile) } if can? :edit, @fetprofile @toolbar_elements << {:hicon=>'icon-pencil', :text=> I18n.t('common.edit'),:path => edit_fetprofile_path(@fetprofile) } if can? :edit, @fetprofile
@toolbar_elements << {:hicon=>'icon-minus', :text => I18n.t('common.delete'), :method=>:delete, :confirm=>"Sure"} @toolbar_elements << {:hicon=>'icon-minus', :text => I18n.t('common.delete'), :method=>:delete, :confirm=>"Sure"} if can? :destroy,@fetprofile
respond_to do |format| respond_to do |format|

View File

@@ -31,24 +31,30 @@ class FragenController < ApplicationController
respond_to do |format| respond_to do |format|
format.html format.html
format.json { render json: @frage } format.json { render json: @frage }
format.js
end end
end end
# GET /fragen/1/edit # GET /fragen/1/edit
def edit def edit
@frage = Frage.find(params[:id]) @frage = Frage.find(params[:id])
respond_to do |format|
format.html
format.js {render action: :new}
end
end end
# POST /fragen # POST /fragen
# POST /fragen.json # POST /fragen.json
def create def create
@frage = Frage.new(params[:frage]) @frage = Frage.new(params[:frage])
thema=@frage.thema
@fragen=@frage.thema.fragen @fragen=@frage.thema.fragen
respond_to do |format| respond_to do |format|
if @frage.save if @frage.save
format.html { redirect_to @frage.thema, notice: 'Frage was successfully created.' } format.html { redirect_to @frage.thema, notice: 'Frage was successfully created.' }
format.json { render json: @frage, status: :created, location: @frage } format.json { render json: @frage, status: :created, location: @frage }
format.js format.js {@frage=Frage.new ; @frage.thema=thema}
else else
format.html { render action: "new" } format.html { render action: "new" }
format.json { render json: @frage.errors, status: :unprocessable_entity } format.json { render json: @frage.errors, status: :unprocessable_entity }
@@ -66,9 +72,11 @@ class FragenController < ApplicationController
if @frage.update_attributes(params[:frage]) if @frage.update_attributes(params[:frage])
format.html { redirect_to @frage, notice: 'Frage was successfully updated.' } format.html { redirect_to @frage, notice: 'Frage was successfully updated.' }
format.json { head :no_content } format.json { head :no_content }
format.js {@frage=Frage.new; render action: "new"}
else else
format.html { render action: "edit" } format.html { render action: "edit" }
format.json { render json: @frage.errors, status: :unprocessable_entity } format.json { render json: @frage.errors, status: :unprocessable_entity }
format.js {render action: "edit"}
end end
end end
end end

View File

@@ -6,7 +6,7 @@ class GremienController < ApplicationController
def verwalten def verwalten
@gremien = Gremium.all @gremien = Gremium.all
@gremientabs=Gremium.tabs @gremientabs=Gremium.tabs
@toolbar_elements << {:text=>I18n.t('common.new'),:path=>new_gremium_path() ,:icon=>:plus} if can? :new, Gremium @toolbar_elements << {:text=>I18n.t('gremium.new'),:path=>new_gremium_path() ,:icon=>:plus} if can? :new, Gremium
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.json { render json: @gremien } format.json { render json: @gremien }

View File

@@ -1,9 +1,13 @@
class HomeController < ApplicationController class HomeController < ApplicationController
def index def index
@beispiele = Beispiel.last([Beispiel.count, 3].min) @beispiele = Beispiel.last([Beispiel.count, 3].min)
@neuigkeiten = Neuigkeit.recent
end end
def dev def dev
end
def kontakt
end end
def startdev def startdev
render 'setup_fetsite_dev' render 'setup_fetsite_dev'

View File

@@ -15,9 +15,12 @@ class LvasController < ApplicationController
def show def show
@lva = Lva.find_by_id(params[:id]) @lva = Lva.find_by_id(params[:id])
@beispiel=Beispiel.new @beispiel=Beispiel.new
@toolbar_elements<<{:hicon=>'icon-plus-sign', :icon=>:plus, :text => "Neues Beispiel", :path=> new_beispiel_path(:lva_id =>@lva.id)} # @toolbar_elements<<{:hicon=>'icon-plus-sign', :icon=>:plus, :text => "Neues Beispiel", :path=> new_beispiel_path(:lva_id =>@lva.id)}
@toolbar_elements<<{:hicon=>'icon-pencil', :icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_lva_path(@lva)} @toolbar_elements<<{:hicon=>'icon-pencil', :icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_lva_path(@lva)}
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t('common.delete'), :path=> lva_path(@lva), :method=>:delete, :confirm=>'Sure?' } @toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t('common.delete'), :path=> lva_path(@lva), :method=>:delete, :confirm=>'Sure?' }
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=>"Tissvergleichladen", :path=> lva_compare_tiss_path(@lva)}
end end
# GET /lvas/new # GET /lvas/new
@@ -36,6 +39,27 @@ class LvasController < ApplicationController
end end
def compare_tiss
@lva = Lva.find_by_id(params[:lva_id])
@lvatiss = Lva.new
@lvatiss.lvanr=@lva.lvanr
@lvatiss.load_tissdata("-2013W")
end
def load_tiss
@lva = Lva.find_by_id(params[:lva_id])
@lva.load_tissdata("-2013W")
if @lva.save
redirect_to @lva , notice: 'Lva von TISS geleaden.'
else
redirect_to @lva, action: :compare_tiss
end
end
# POST /lvas # POST /lvas
# POST /lvas.json # POST /lvas.json
def create def create
@@ -43,7 +67,7 @@ class LvasController < ApplicationController
respond_to do |format| respond_to do |format|
if @lva.save if @lva.save
@lva.add_semesters @lva.add_semesters
format.html { redirect_to @lva, notice: 'Lva was successfully created.' } format.html { redirect_to @lva, notice: 'Lva was successfully created.' }
else else

View File

@@ -8,6 +8,7 @@ class ModulsController < ApplicationController
if !params[:studium_id].nil? if !params[:studium_id].nil?
@studium=Studium.find_by_id(params[:studium_id]) @studium=Studium.find_by_id(params[:studium_id])
end end
@toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("modul.add"), :path=>new_modul_path}] @toolbar_elements = [{:hicon=>'icon-plus-sign', :text=>I18n.t("modul.add"), :path=>new_modul_path}]
@topbar_elements =[{:hicon=>'icon-list', :text=>I18n.t("studien.allestudien"),:path=>studien_path}] @topbar_elements =[{:hicon=>'icon-list', :text=>I18n.t("studien.allestudien"),:path=>studien_path}]
@topbar_elements<<{:hicon=>'icon-list', :text=>I18n.t("modul.list"),:path=>moduls_path} @topbar_elements<<{:hicon=>'icon-list', :text=>I18n.t("modul.list"),:path=>moduls_path}

View File

@@ -11,13 +11,12 @@ class RubrikenController < ApplicationController
@rubrik = Rubrik.find(params[:id]) @rubrik = Rubrik.find(params[:id])
@moderatoren=User.with_role(:newsmoderator,@rubrik) @moderatoren=User.with_role(:newsmoderator,@rubrik)
if can?(:showunpublished, Neuigkeit) if can?(:showunpublished, Neuigkeit)
@neuigkeiten = @rubrik.neuigkeiten @neuigkeiten = @rubrik.neuigkeiten
else else
@neuigkeiten = @rubrik.neuigkeiten.published @neuigkeiten = @rubrik.neuigkeiten.published
end end
@toolbar_elements << {:text=>I18n.t('neuigkeit.new.title'),:path=> new_rubrik_neuigkeit_path(@rubrik),:hicon=>'icon-plus-sign'} if can? :verwalten, @rubrik @toolbar_elements << {:text=>I18n.t('neuigkeit.new.title'), :path=> new_rubrik_neuigkeit_path(@rubrik),:hicon=>'icon-plus-sign'} if can? :verwalten, @rubrik
@toolbar_elements << {:text=>I18n.t('common.verwalten'), :path=>verwalten_rubrik_path(@rubrik),:icon=>:pencil} if can? :verwalten, @rubrik
@toolbar_elements << {:text=>I18n.t('common.verwalten'),:path=>verwalten_rubrik_path(@rubrik),:icon=>:pencil} if can? :verwalten, @rubrik

View File

@@ -34,18 +34,15 @@ class StudienController < ApplicationController
@toolbar_elements=[{:icon=>:plus, :hicon =>'icon-plus-sign' ,:text=> I18n.t('studien.new') , :path => new_studium_path(@studium) }, @toolbar_elements=[{:icon=>:plus, :hicon =>'icon-plus-sign' ,:text=> I18n.t('studien.new') , :path => new_studium_path(@studium) },
{:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('common.edit'),:path => edit_studium_path(@studium)}, {:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('common.edit'),:path => edit_studium_path(@studium)},
{:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => studium_path(@studium), :method=> :delete,:confirm=>"Sure?" }] {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => studium_path(@studium), :method=> :delete,:confirm=>'Sure?' }]
@toolbar_modulgruppen =[ {:hicon=>'icon-plus-sign', :text=> I18n.t('modulgruppe.new'), :path=>new_studium_modulgruppe_path(@studium)}, @toolbar_modulgruppen =[ {:hicon=>'icon-plus-sign', :text=> I18n.t('modulgruppe.new'), :path=>new_studium_modulgruppe_path(@studium)},
{:hicon=>'icon-list', :text => I18n.t('modulgruppe.list'), :path=>modulgruppen_path}] {:hicon=>'icon-list', :text => I18n.t('modulgruppe.list'), :path=>modulgruppen_path}]
case params[:ansicht]
if params[:ansicht] != 'modulgruppenansicht' when 'semesteransicht'
@text = 'Zu Modulansicht wechseln' when 'infoansicht'
@flip = 'modulgruppenansicht'
render 'semesteransicht'
else else
@text = 'Zu Semesteransicht wechseln' params[:ansicht]="modulgruppenansicht"
@flip = 'semesteransicht'
end end
end end
@@ -242,14 +239,14 @@ class StudienController < ApplicationController
end end
def default_url_options def default_url_options
{:ansicht=> params[:ansicht],
super.merge({:ansicht=> params[:ansicht],
:std_verw=> params[:std_verw], :std_verw=> params[:std_verw],
:mg_verw=> params[:mg_verw], :mg_verw=> params[:mg_verw],
:m_verw=>params[:m_verw], :m_verw=>params[:m_verw],
:lva_verw=>params[:lva_verw], :lva_verw=>params[:lva_verw],
:b_verw=>params[:b_verw], :b_verw=>params[:b_verw],
:lec_verw=>params[:lec_verw]}.merge(super) :lec_verw=>params[:lec_verw]})
end end
end end

View File

@@ -34,12 +34,17 @@ class ThemenController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # new.html.erb format.html # new.html.erb
format.json { render json: @thema } format.json { render json: @thema }
format.js { render action: "edit" }
end end
end end
# GET /themen/1/edit # GET /themen/1/edit
def edit def edit
@thema = Thema.find(params[:id]) @thema = Thema.find(params[:id])
respond_to do |format|
format.html
format.js
end
end end
# POST /themen # POST /themen
@@ -47,29 +52,40 @@ class ThemenController < ApplicationController
def create def create
@thema = Thema.new(params[:thema]) @thema = Thema.new(params[:thema])
@themen = @thema.themengruppe.themen.order(:priority).reverse
respond_to do |format| respond_to do |format|
if @thema.save if @thema.save
format.html { redirect_to @thema, notice: 'Thema was successfully created.' } format.html { redirect_to @thema, notice: 'Thema was successfully created.' }
format.json { render json: @thema, status: :created, location: @thema } format.json { render json: @thema, status: :created, location: @thema }
format.js {render action: "update"}
else else
format.html { render action: "new" } format.html { render action: "new" }
format.json { render json: @thema.errors, status: :unprocessable_entity } format.json { render json: @thema.errors, status: :unprocessable_entity }
format.js { render action: "edit" }
end end
end end
end end
def fragen
@thema = Thema.find(params[:thema_id])
@fragen=@thema.fragen
respond_to do |format|
format.js
end
end
# PUT /themen/1 # PUT /themen/1
# PUT /themen/1.json # PUT /themen/1.json
def update def update
@thema = Thema.find(params[:id]) @thema = Thema.find(params[:id])
@themen = @thema.themengruppe.themen.order(:priority).reverse
respond_to do |format| respond_to do |format|
if @thema.update_attributes(params[:thema]) if @thema.update_attributes(params[:thema])
format.html { redirect_to @thema, notice: 'Thema was successfully updated.' } format.html { redirect_to @thema, notice: 'Thema was successfully updated.' }
format.json { head :no_content } format.json { head :no_content }
format.js
else else
format.html { render action: "edit" } format.html { render action: "edit" }
format.json { render json: @thema.errors, status: :unprocessable_entity } format.json { render json: @thema.errors, status: :unprocessable_entity }
format.js { render action: "edit" }
end end
end end
end end

View File

@@ -12,6 +12,10 @@ class ThemengruppenController < ApplicationController
format.json { render json: @themengruppen } format.json { render json: @themengruppen }
end end
end end
def faqs
@themengruppen = Themengruppe.order(:priority).includes(:themen,{themen: :fragen})
end
# GET /themengruppen/1 # GET /themengruppen/1
# GET /themengruppen/1.json # GET /themengruppen/1.json
@@ -22,7 +26,7 @@ class ThemengruppenController < ApplicationController
@toolbar_elements = [] @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=>: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.edit'), :path=>edit_themengruppe_path(@themengruppe)} if can? :edit, @themengruppe
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t("themengruppe.verwalten"), :path=>themengruppe_verwalten_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 @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

View File

@@ -1,9 +1,11 @@
module ApplicationHelper module ApplicationHelper
def current_url(overwrite={}) def current_url1(overwrite={})
url_for :params => params.merge(overwrite).except(:controller,:action) url_for :params => params.merge(overwrite).except(:controller,:action,:ansicht)
end end
def switch_locale_url(target_locale) def switch_locale_url(target_locale)
current_url({:locale=>target_locale}) .sub "/"+I18n.locale.to_s+"/", "/"+target_locale.to_s+"/" current_url1({:locale=>target_locale}) .sub "/"+I18n.locale.to_s+"/", "/"+target_locale.to_s+"/"
end end
def toolbar_html(elemente) def toolbar_html(elemente)

View File

@@ -15,11 +15,22 @@ class Beispiel < ActiveRecord::Base
has_paper_trail has_paper_trail
attr_accessible :desc, :name, :lva_id, :beispieldatei, :beispieldatei_cache, :datum attr_accessible :desc, :name, :lva_id, :beispieldatei, :beispieldatei_cache, :datum
belongs_to :lva belongs_to :lva
mount_uploader :beispieldatei, BeispieldateiUploader mount_uploader :beispieldatei, AttachmentUploader
validates :beispieldatei, :presence => true validates :beispieldatei, :presence => true
validates :name, :presence => true validates :name, :presence => true
validates :lva_id, :presence => true validates :lva_id, :presence => true
validates :lva, :presence => true validates :lva, :presence => true
validates :datum, :presence => true validates :datum, :presence => true
def to_jq_upload
{
"id" => read_attribute(:id),
"title" => read_attribute(:title),
"description" => read_attribute(:desc),
"name" => read_attribute(:title),
"size" => beispieldatei.size,
"url" => beispieldatei.url,
"thumbnail_url" => beispieldatei.thumb.url,
"delete_type" => "DELETE"
}
end
end end

View File

@@ -22,6 +22,8 @@ class Calentry < ActiveRecord::Base
before_save :get_public before_save :get_public
belongs_to :object, polymorphic: true # Objekt zu dem der Calentry gehört (derzeit ein Newsartikel) belongs_to :object, polymorphic: true # Objekt zu dem der Calentry gehört (derzeit ein Newsartikel)
scope :upcoming, ->{ where("start >= ?", Time.now).order(:start)}
scope :recent,-> { where("start <= ?", Time.now).order(:start).reverse_order}
validate do |entry| validate do |entry|
if entry.ende.nil? if entry.ende.nil?
errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein") errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein")
@@ -30,8 +32,8 @@ class Calentry < ActiveRecord::Base
resourcify resourcify
def get_public 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 true
end end
def start_time def start_time
start start
@@ -61,5 +63,5 @@ def text
I18n.l(self.start) +" bis "+ I18n.l(self.ende) I18n.l(self.start) +" bis "+ I18n.l(self.ende)
end end
scope :public, -> { where(:public => :true) } scope :public, -> { where(:public => :true) }
scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 28.days.from_now) } # scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 28.days.from_now) }
end end

View File

@@ -16,4 +16,16 @@ class Lecturer < ActiveRecord::Base
has_and_belongs_to_many :lvas has_and_belongs_to_many :lvas
mount_uploader :picture, PictureUploader mount_uploader :picture, PictureUploader
resourcify resourcify
def load_tissdata
url= "https://tiss.tuwien.ac.at/adressbuch/adressbuch/person_via_oid/"+self.oid.to_s+".xml"
hash=Hash.from_xml(open(url).read)["tuvienna"]
self.name=hash["person"]["firstname"]+" "+hash["person"]["lastname"]
if hash["person"]["employee"]["employment"].is_a? Array
self.email= hash["person"]["employee"]["employment"].first["emails"]["email"].first
else
self.email= hash["person"]["employee"]["employment"]["emails"]["email"].first
end
self.link= "https://tiss.tuwien.ac.at/adressbuch/adressbuch/person_via_oid/"+self.oid.to_s
end
end end

View File

@@ -36,14 +36,14 @@
class Lva < ActiveRecord::Base class Lva < ActiveRecord::Base
ERLAUBTE_TYPEN = ['VO', 'UE', 'VU', 'LU', 'SE', 'andere']; ERLAUBTE_TYPEN = ['VO', 'UE', 'VU', 'LU', 'SE', 'andere'];
has_paper_trail # Versionsverfolgung has_paper_trail :ignore=>[:desc, :pruefungsinformation]# Versionsverfolgung
attr_accessible :desc, :ects, :lvanr, :name, :stunden, :modul_ids, :semester_ids, :pruefungsinformation, :lernaufwand, :typ, :lecturer_ids attr_accessible :desc, :ects, :lvanr, :name, :stunden, :modul_ids, :semester_ids, :pruefungsinformation, :lernaufwand, :typ, :lecturer_ids
has_and_belongs_to_many :modul,:uniq=>true # Gehört zu einem Modul has_and_belongs_to_many :modul,:uniq=>true # Gehört zu einem Modul
has_and_belongs_to_many :semester has_and_belongs_to_many :semester
#Gehört zu einem Semester( derzeit nicht implementiert) #Gehört zu einem Semester( derzeit nicht implementiert)
has_many :beispiele , :class_name => "Beispiel" has_many :beispiele , :class_name => "Beispiel"
has_and_belongs_to_many :lecturers has_and_belongs_to_many :lecturers
translates :desc, :fallbacks_for_empty_translations => true translates :desc,:pruefungsinformation, :fallbacks_for_empty_translations => true, :versioning=>true
validates :lvanr,:format=>{ :with => /^[0-9][0-9][0-9]\.[0-9A][0-9][0-9]$/}, :presence=>true, :uniqueness=>true # , :uniqueness=>true # LVA-Nummer muss das Format 000.000 besitzen (uniqueness?) oder 000 für nicht validates :lvanr,:format=>{ :with => /^[0-9][0-9][0-9]\.[0-9A][0-9][0-9]$/}, :presence=>true, :uniqueness=>true # , :uniqueness=>true # LVA-Nummer muss das Format 000.000 besitzen (uniqueness?) oder 000 für nicht
validates_presence_of :ects # ECTS vorhanden? validates_presence_of :ects # ECTS vorhanden?
@@ -72,10 +72,35 @@ class Lva < ActiveRecord::Base
## ##
# Lade Daten aus TISS und füge diese in die Datenbank ein. # Lade Daten aus TISS und füge diese in die Datenbank ein.
def tisshash(semester)
url= "https://tiss.tuwien.ac.at/api/course/"+ lvanr.to_s.gsub(".","")+semester
hash=Hash.from_xml(open(url).read)["tuvienna"]
end
def load_tissdata(semester) def load_tissdata(semester)
url= "https://tiss.tuwien.ac.at/api/course/"+ lvanr.to_s.gsub(".","")+semester urlp="https://tiss.tuwien.ac.at/api/course/"+ lvanr.to_s.gsub(".","")+"-"
# begin begin
url= urlp+Time.now.year.to_s+"W"
hash=Hash.from_xml(open(url).read)["tuvienna"] hash=Hash.from_xml(open(url).read)["tuvienna"]
rescue OpenURI::HTTPError => e
begin
url= urlp+Time.now.year.to_s+"S"
hash=Hash.from_xml(open(url).read)["tuvienna"]
rescue OpenURI::HTTPError => e
begin
url= urlp+(Time.now.year-1).to_s+"W"
hash=Hash.from_xml(open(url).read)["tuvienna"]
rescue OpenURI::HTTPError => e
end
end
end
# begin
# person=[] # person=[]
# if hash["course"]["lecturers"]["oid"].is_a? String # if hash["course"]["lecturers"]["oid"].is_a? String
# person = @hash["course"]["lecturers"]["oid"] # person = @hash["course"]["lecturers"]["oid"]
@@ -84,15 +109,60 @@ class Lva < ActiveRecord::Base
# person << Hash.from_xml(open("https://tiss.tuwien.ac.at/adressbuch/adressbuch/person_via_oid/" + pid.to_s + ".xml").read)["tuvienna"]["person"] # person << Hash.from_xml(open("https://tiss.tuwien.ac.at/adressbuch/adressbuch/person_via_oid/" + pid.to_s + ".xml").read)["tuvienna"]["person"]
# end # end
# end # end
# rescue OpenURI::HTTPError => e self.name=hash["course"]["title"]["de"]
# end self.pruefungsinformation = hash["course"]["examinationModalities"][I18n.locale.to_s].to_s
self.name=hash["course"]["title"][I18n.locale.to_s] self.desc= hash["course"]["objective"][I18n.locale.to_s]+"<p></p>"+hash["course"]["teachingContent"][I18n.locale.to_s]
self.pruefungsinformation= hash["course"]["examinationModalities"][I18n.locale.to_s]
self.desc= hash["course"]["objective"][I18n.locale.to_s]+hash["course"]["teachingContent"][I18n.locale.to_s]
self.typ=hash["course"]["courseType"] self.typ=hash["course"]["courseType"]
self.stunden=hash["course"]["weeklyHours"] self.stunden=hash["course"]["weeklyHours"]
#hash["course"]["url"]
if hash["course"]["lecturers"]["oid"].is_a? Array
hash["course"]["lecturers"]["oid"].each do |oid|
lecturer= self.lecturers.where(:oid=>oid).first
if lecturer.nil?
lecturer=Lecturer.where(:oid=>oid).first
if lecturer.nil?
logger.debug "Neuen Lecturer laden"
lecturer=Lecturer.new
lecturer.oid=oid
lecturer.load_tissdata
if lecturer.save
self.lecturers << lecturer
else
logger.fatal "Invaliden Lecturer erzeugt"
end
else
logger.debug "Lecturer hinzufügen"
self.lecturers << lecturer
end
end
end
else
oid= hash["course"]["lecturers"]["oid"]
lecturer= self.lecturers.where(:oid=>oid).first
if lecturer.nil?
lecturer=Lecturer.where(:oid=>oid).first
if lecturer.nil?
logger.info "Neuen Lecturer laden"
lecturer=Lecturer.new
lecturer.oid=oid
lecturer.load_tissdata
if lecturer.save
self.lecturers << lecturer
else
logger.fatal "Invaliden Lecturer erzeugt"
end
else
logger.info "Lecturer hinzufügen"
lecturer.load_tissdata
lecturer.save
self.lecturers << lecturer
end
end
end
end end
end end

View File

@@ -24,7 +24,7 @@ class Neuigkeit < ActiveRecord::Base
has_many :calentries, as: :object has_many :calentries, as: :object
mount_uploader :picture, PictureUploader mount_uploader :picture, PictureUploader
scope :published, -> {where("datum <= ? AND datum IS NOT NULL", Time.now.to_date).order(:datum).reverse_order} scope :published, -> {where("datum <= ? AND datum IS NOT NULL", Time.now.to_date).order(:datum).reverse_order}
scope :recent, -> { published.order(:datum).reverse_order.limit(15)} scope :recent, -> { published.limit(15)}
scope :unpublished, -> {where("datum >= ? OR datum IS NULL", Date.today)} scope :unpublished, -> {where("datum >= ? OR datum IS NULL", Date.today)}
scope :public, ->{includes(:rubrik).where("rubriken.public"=>:true)} scope :public, ->{includes(:rubrik).where("rubriken.public"=>:true)}
scope :search, ->(query) {where("text like ? or title like ?", "%#{query}%", "%#{query}%")} scope :search, ->(query) {where("text like ? or title like ?", "%#{query}%", "%#{query}%")}

View File

@@ -22,7 +22,7 @@ class Semester < ActiveRecord::Base
if self.nummer == 0 if self.nummer == 0
return I18n.t("ohnezuordnung") + " (" + self.studium.name + ")" return I18n.t("ohnezuordnung") + " (" + self.studium.name + ")"
else else
return self.nummer.to_s + ". " + self.studium.name return self.nummer.to_s + "."+I18n.t("semester.semester")+", " + self.studium.name
end end
end end
def name_kurz def name_kurz

View File

@@ -65,7 +65,11 @@ class Studium < ActiveRecord::Base
def desc_first_words def desc_first_words
md = /<p>(?<text>[\w\s,\.!\?]*)/.match self.desc md = /<p>(?<text>[\w\s,\.!\?]*)/.match self.desc
md[:text].split(" ")[0..100].join(" ")+ " ..." unless md.nil? unless md.nil?
md[:text].split(" ")[0..100].join(" ")+ " ..."
else
""
end
end end
end end

View File

@@ -0,0 +1,12 @@
<%= semantic_form_for [@thema,@attachment], :remote=>true do |f| %>
<%= f.inputs do %>
<%= f.input :name %>
<%= token_tag form_authenticity_token %>
<%= f.input :datei, :as => :file %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>

View File

@@ -0,0 +1,2 @@
alert('create_attachment');
$("#attachmentform").html("<%=escape_javascript( render :partial=>'attachments/rform' )%>");

View File

@@ -0,0 +1,4 @@
alert('new.js.erb')
$("#attachmentform").html("<%=escape_javascript( render :partial=>'attachments/rform' )+ @action.to_s%>");
$('document').trigger('ready');
alert('ready')

View File

@@ -1,5 +1,6 @@
<div class="container"> <div class="container">
<%= semantic_form_for [@lva, @beispiel], :remote=>true, :html => { :multipart => true, :id => "fileupload" } do |f| %> <%= semantic_form_for [@lva,@beispiel], :remote=>true, :html => { :multipart => true, :id => "fileupload" } do |f| %>
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload --> <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row "> <div class="row ">
@@ -10,7 +11,7 @@
<i class="icon-plus icon-white"></i> <i class="icon-plus icon-white"></i>
<span>Add files...</span> <span>Add files...</span>
<%= f.file_field :beispieldatei, :multiple=>true %> <%= f.file_field :beispieldatei, :multiple=>true %>
<%= f.input :lva %> <% f.input :lva %>
</span> </span>
<button type="submit" class="btn btn-primary start"> <button type="submit" class="btn btn-primary start">
<i class="icon-upload icon-white"></i> <i class="icon-upload icon-white"></i>

View File

@@ -41,7 +41,7 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span12"> <div class="span12">
<%= link_to I18n.t('fetprofiles.new'), new_fetprofile_path %> <%= link_to I18n.t('profile.new_profile'), new_fetprofile_path %>
</div> </div>
</div></div> </div></div>
</div> </div>

View File

@@ -17,7 +17,7 @@
<ul> <ul>
<% @memberships.each do |m| %> <% @memberships.each do |m| %>
<li> <li>
<%= render m %> <%= link_to m.gremium do %> <%= render m %><% end %>
<%= link_to I18n.t('common.edit'), edit_fetprofile_membership_path(@fetprofile,m) if params["verwalten"] && can?(:edit, m)%> <%= link_to I18n.t('common.edit'), edit_fetprofile_membership_path(@fetprofile,m) if params["verwalten"] && can?(:edit, m)%>
<%= link_to I18n.t('common.delete'), [@fetprofile, m], method: :delete, data: {confirm: I18n.t('common.sure_del')} if params["verwalten"] && can?(:delete, m ) %> <%= link_to I18n.t('common.delete'), [@fetprofile, m], method: :delete, data: {confirm: I18n.t('common.sure_del')} if params["verwalten"] && can?(:delete, m ) %>
</li> </li>

View File

@@ -3,6 +3,6 @@
<%= raw(frage.text) %> <%= raw(frage.text) %>
<br/> <br/>
<%= link_to 'Edit', edit_frage_path(frage) %> | <%= link_to 'Edit', edit_frage_path(frage),:remote=>true %> |
<%= link_to 'Destroy',frage, method: :delete, :remote=> true , data: { confirm: 'Are you sure?' } %> <%= link_to 'Destroy',frage, method: :delete, :remote=> true , data: { confirm: 'Are you sure?' } %>
</p> </p>

View File

@@ -1 +1,2 @@
$("#fragen").html("<%=escape_javascript( render :partial=>'fragen/liste' )%>") $("#fragen").html("<%=escape_javascript( render :partial=>'fragen/liste' )%>")
$("#fragenform").html("<%=escape_javascript( render :partial=>'fragen/rform' )%>")

View File

@@ -0,0 +1 @@
$("#fragenform").html("<%=escape_javascript( render :partial=>'fragen/rform' )%>")

View File

@@ -39,7 +39,7 @@
<br /> <br />
<%= render 'layouts/pretty_toolbar' %> <%= render 'layouts/pretty_toolbar' %>
<%= link_to 'New Gremium', new_gremium_path %>

View File

@@ -2,7 +2,7 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span8"> <div class="span8">
<h4>Neueste Beispiele</h4> <h4>Neueste Beispiele in unserer Sammlung</h4>
</div> </div>
<div class="span4"> <div class="span4">
<%= link_to I18n.t("beispiel.add"), new_beispiel_path, :class=>"btn"%> <%= link_to I18n.t("beispiel.add"), new_beispiel_path, :class=>"btn"%>

View File

@@ -28,10 +28,11 @@
<% end %> <% end %>
<% @themen.each do |thema| %> <% @themen.each do |thema| %>
<ul class="unstyled linkbox-list" style="max-width:70em"> <ul class="unstyled content-list" style="max-width:70em">
<li><%= link_to thema, {:class=>"linkbox"} do %> <li><%= link_to thema.title,thema %>
<div class="contentbox">
<%= render :partial=>"themen/small", :object=>thema %> <%= render :partial=>"themen/small", :object=>thema %>
<% end %> </div>
</li> </li>
</ul> </ul>
<% end %> <% end %>

View File

@@ -1,5 +1,14 @@
<div class="content-wrap content-column"> <div class="content-wrap content-column">
<h1><%= I18n.t('home.willkommen') %></h1> <h1><%= I18n.t('home.willkommen') %></h1>
<p><%= I18n.t('home.hallobeiderfet') %></p>
<ul class="unstyled linkbox-list" style="max-width:70em">
<% @neuigkeiten.each do |n| %>
<li><%= render n if can?(:show, n) %> </li>
<% end %>
</ul>
<p>
<%= link_to I18n.t('home.login'), user_omniauth_authorize_path(:ldap) %>
</p>
<div class="alert"> <div class="alert">
<h2>Beta Test</h2> <h2>Beta Test</h2>
<p>Die Webseite befindet sich derzeit in einem Entsicklungsstadium, <p>Die Webseite befindet sich derzeit in einem Entsicklungsstadium,
@@ -14,13 +23,12 @@
</p> </p>
<p><%= link_to "Steuerelemente und Komponenten", "http://getbootstrap.com/2.3.2/index.html" %></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>Um bei der Entwicklung mitzuhelfen braucht nur Ruby on Rails installiert werden</p>
<p><%= link_to "Getting Started" , home_startdev_path%></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> Das Kalender Feature wird überarbeitet, in Zukunft soll folgender Link nicht mehr funktionieren <%= link_to "Kalender", calendars_path %>
</p> </p>
</div> </div>
<p><%= I18n.t('home.hallobeiderfet') %></p> <%= link_to "Entwicklungsstatus" , dev_home_index_path %>
<%= link_to "Entwicklungsstatus" , home_dev_path %>
<%= render 'beispiele' %> <%= render 'beispiele' %>
Verschiedene Styles Verschiedene Styles

View File

@@ -0,0 +1 @@
<%= I18n.t "home.kontakt" %>

View File

@@ -10,20 +10,26 @@ Verwendung: Aufruf mit
<% toolbar_elements.each do |t| %> <% toolbar_elements.each do |t| %>
<% unless t[:method]==:versions %> <% unless t[:method]==:versions %>
<% text='<i class="'.html_safe+ t[:hicon].to_s.html_safe + '"></i>'.html_safe+t[:text] %> <% text='<i class="'.html_safe+ t[:hicon].to_s.html_safe + '"></i>'.html_safe+t[:text] %>
<%= link_to text, t[:path], :method=>t[:method], :confirm=>t[:confirm].to_s, :data=>t[:data], :class=>((t[:method].to_s=='delete') ? "btn btn-danger" : "btn") %> <%= link_to text, t[:path], :method=>t[:method], :confirm=>t[:confirm].to_s, :data=>t[:data], :class=>((t[:method].to_s=='delete') ? "btn btn-danger" : "btn") ,:remote=>(t[:remote])?true : false %>
<% else %> <% else %>
<div class="btn-group"> <div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
Versionen<span class="caret"></span> Versionen<span class="caret"></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li> <%= link_to "active", t[:path] %>
</li>
<% t[:versions].each_with_index do |v,i| %> <% t[:versions].each_with_index do |v,i| %>
<li> <li>
<% <% unless t[:path].nil?
uri= URI.parse(t[:path]); uri= URI.parse(t[:path]);
uri.query= URI.encode_www_form(URI.decode_www_form(uri.query)<<["version",i.to_s]) q=[];
%> q= q.merge(URI.decode_www_form(uri.query)) unless uri.query.nil?
<%= link_to v[:created_at],uri.to_s ,:version=>v[:id]%>
uri.query= URI.encode_www_form(q<<["version",i.to_s])
%>
<%= link_to I18n.l(v[:created_at]).to_s,uri.to_s ,:version=>v[:id] %>
<% end %>
</li> </li>
<% end %> <% end %>
</ul> </ul>

View File

@@ -5,10 +5,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fetsite</title> <title>Fetsite</title>
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.nil? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.nil? %>
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
<%= theme_stylesheet_link_tag "test", :media => "all" %>
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
<link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css"> <link rel="stylesheet" href="css/bootstrap-responsive.css">
@@ -18,28 +19,45 @@
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
</head> </head>
<body>
<div id="maincontainer" class="container-fluid">
<div class="row-fluid">
<div class="header">
<%= image_tag('/fetlogo.png',{:style=>"float:left"}) %>
<h1 style="display:block">Fachschaft Elektrotechnik</h1>
</div>
</div>
<div class="row-fluid"> <body>
<div class="span2 earlymax"> <div id="maincontainer" class="container-fluid">
<div class="row-fluid">
<div class="span1 "></div>
<div class="span10 ">
<div class="header_wrap" style="background:7070a0">
<div class="header">
<%= image_tag('/fetlogo90.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
<h1 style="display:block"></h1>
</div>
<div id="menudiv" style="margin-top:12px">
<%= render :template => 'layouts/menu' %>
</div>
</div>
</div>
<div id="menudiv"><%= render :template => 'layouts/menu' %></div> <div class="span1 "></div>
<%= render 'layouts/login' %> </div>
</div> <div class="row-fluid">
<div class="span10" id="contentdiv"> <div class="span1">
</div>
<div class="span10" id="contentdiv">
<%= yield %>
</div>
<div class="span1">
</div>
</div>
<div class="row-fluid">
<div class="span1">
</div>
<div class="span10" id="contentdiv">
<span class="pull-right"> <%= render 'layouts/login' %></span> Version 0.0.3a
</div>
<div class="span1">
</div>
</div>
</div>
<%= yield %> </body>
</div>
</div>
</div>
</body>
</html> </html>

25
app/views/layouts/menu.html.erb Executable file → Normal file
View File

@@ -1,7 +1,7 @@
<div class="navbar"> <div class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container"> <div class="container">
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>--> <!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse"> <a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
@@ -12,24 +12,25 @@
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %> <li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
</li> </li>
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li> <li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li> <li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li> <li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li> <li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li> <li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
<li class="divider"></li> <li> <%= link_to I18n.t("home.search"), search_home_index_path %></li>
<li> <%= link_to I18n.t("home.kontakt"), kontakt_home_index_path %></li>
<li><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %>
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
<%end %>
</li>
<li> <li>
<%= link_to 'Admin' , config_path%> <%= link_to 'Admin' , config_path%>
</li> </li>
</ul> </ul>
<span class="pull-right"><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %>
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
<%end %>
</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,11 +1,11 @@
<div class="media"> <div class="media">
<a class="pull-left" href="#"> <a class="pull-left" href="#">
<img class="media-object img" src="<%= lec_lva.picture.thumb.url %>"/> <img class="media-object img" src="<%= lec_lva.picture.thumb.url unless lec_lva.picture.nil? %>"/>
</a> </a>
<div class="media-body"> <div class="media-body">
<h4><%= link_to lec_lva.name, lec_lva %></h4> <h4><%= lec_lva.name %></h4>
Email: <%= mail_to lec_lva.email %><br> Email: <%= mail_to lec_lva.email %><br>
TISS: <%= link_to lec_lva.name, lec_lva.link %> TISS: <%= link_to lec_lva.name, lec_lva.link, target: "_blank" %>
</div> </div>
</div> </div>

View File

@@ -16,7 +16,7 @@
<td><%= lecturer.name %></td> <td><%= lecturer.name %></td>
<td><%= lecturer.email %></td> <td><%= lecturer.email %></td>
<td><%= lecturer.oid %></td> <td><%= lecturer.oid %></td>
<td><%= lecturer.picture %></td> <td><%= image_tag lecturer.picture.thumb %></td>
<td><%= link_to 'Show', lecturer %></td> <td><%= link_to 'Show', lecturer %></td>
<td><%= link_to 'Edit', edit_lecturer_path(lecturer) %></td> <td><%= link_to 'Edit', edit_lecturer_path(lecturer) %></td>
<td><%= link_to 'Destroy', lecturer, method: :delete, data: { confirm: 'Are you sure?' } %></td> <td><%= link_to 'Destroy', lecturer, method: :delete, data: { confirm: 'Are you sure?' } %></td>

View File

@@ -1,5 +1,8 @@
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<%= render partial: "lec_lva", object: @lecturer %>
<p> <p>
<b>Name:</b> <b>Name:</b>
<%= @lecturer.name %> <%= @lecturer.name %>

View File

@@ -1,28 +1,25 @@
<% @lva.modul.each do |modul| %>
<% modul.modulgruppen.each do |g| %>
<ul class="breadcrumb">
<li><%= link_to g.studium.name , studium_path(g.studium)%>
<span class="divider"></span></li>
<li><%= link_to g.name , modulgruppe_path(g)%><span class="divider">/</span></li>
<li><%= link_to modul.name , modul_path(modul)%></li>
<% end %>
</ul>
<% end %>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
<p>
<%= @lva.lvanr %>
<b><%= @lva.name %> <%= @lva.ects %> ECTS/ <%= @lva.stunden %> Std</b>
<h1><%=lva.typ.to_s + ' ' + lva.name %></h1>
<h2>Prüfungsinformation</h2>
<div class="">
<%= lva.pruefungsinformation.to_s.html_safe %>
</div>
<h2>Lernaufwand</h2>
<div class="">
<%= lva.lernaufwand %>
</div>
<h2>Beschreibung</h2>
<div class="">
<%= lva.desc.to_s.html_safe %>
</div>
<p>
<%= lva.lvanr %>
<b><%= lva.name %> <%= lva.ects %> ECTS/ <%= lva.stunden %> Std</b>
</p> </p>
<p> <p>
<%= @lva.desc %>
</p> </p>
<ul>
<% @lva.beispiele.each do |b|%>
<li><%= render b%></li>
<% end %>
</ul>
<%= toolbar_html(@toolbar_elements) %>

View File

@@ -0,0 +1,29 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span6">
<p>&nbsp;</p>
<p>&nbsp;</p>
<%= render partial: "lva", object: @lva %>
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
<% @lva.lecturers.each do |lec| %>
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
<% end %>
</div>
<div class="span6">
<p> Tiss Version</p>
<%= link_to "Von Tiss laden", lva_load_tiss_path(@lva) %>
<%= render partial: "lva", object: @lvatiss %>
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
<% @lvatiss.lecturers.each do |lec| %>
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
<% end %>
</div>
</div>
</div>

View File

@@ -2,7 +2,7 @@
<h2><%= link_to modulgruppe.name, modulgruppe_path(modulgruppe) %> <h2><%= link_to modulgruppe.name, modulgruppe_path(modulgruppe) %>
</h2> </h2>
<%= modulgruppe.desc%><ul> <%= modulgruppe.desc%><ul class="unstyled">
<%= render :partial=>'moduls/kurz', :collection=>modulgruppe.moduls, :as=>:modul%> <%= render :partial=>'moduls/kurz', :collection=>modulgruppe.moduls, :as=>:modul%>
</ul> </ul>
<br> <br>

View File

@@ -1,18 +1,23 @@
</ul><p id="notice"><%= notice %></p> <%= render 'studien/tabs' %>
<div class="content-wrap content-column">
<p id="notice"><%= notice %></p>
<h1> <h1>
<%= @modulgruppe.name %> <%= @modulgruppe.name %>
</h1> </h1>
<p> <p>
<!-- <b><%= link_to "Studium: "+@modulgruppe.studium.name, studium_path(@modulgruppe.studium) %></b>--> <!-- <b><%= link_to "Studium: "+@modulgruppe.studium.name, studium_path(@modulgruppe.studium) %></b>-->
</p><p> </p>
<p>
<b><%= I18n.t "modulgruppe.typ"%>:</b> <b><%= I18n.t "modulgruppe.typ"%>:</b>
<%= @modulgruppe.typ %> <%= @modulgruppe.typ %>
</p> </p>
<ul class="unstyled">
<% @modulgruppe.moduls.each do |modul| %>
<% @modulgruppe.moduls.each do |modul| %> <%= render 'moduls/kurz', :modul=>modul%>
<%= render 'moduls/kurz', :modul=>modul%> <% end %>
<% end %> </ul>
<%= render 'layouts/pretty_toolbar' %> <%= render 'layouts/pretty_toolbar' %>
</div>

View File

@@ -1,6 +1,19 @@
<li><p> <li>
<div class="contentbox">
<p>
<b><% if !modul.name.nil? %><%= link_to "Modul "+ modul.name , modul_path(modul) %> <%end%></b> <b><% if !modul.name.nil? %><%= link_to "Modul "+ modul.name , modul_path(modul) %> <%end%></b>
</p> </p>
<ul>
<% modul.lvas.each do |lva| %>
<li> <%= render :partial=>'lvas/lva_semester', :locals =>{:lva => lva}%>
</li>
<% end %>
</ul>
<% link_to '<i class="icon-pencil"></i>'.html_safe+I18n.t("common.edit"), edit_modul_path(modul) %> <% link_to '<i class="icon-pencil"></i>'.html_safe+I18n.t("common.edit"), edit_modul_path(modul) %>
</div>
</li> </li>

View File

@@ -5,31 +5,32 @@
<div class="row-fluid"> <div class="row-fluid">
<div class="span8"> <div class="span8">
<h2><%=I18n.t("modul.desc")%></h2> <h2><%=I18n.t("modul.lvas")%></h2>
<p> <% @modul.lvas.each_slice(3) do |row| %>
<%= raw(@modul.desc) %> <ul>
</p> <% row.each do |lv| %>
<li>
<%= render 'lvas/lva_semester', :lva=>lv%>
</li>
<% end %>
</ul>
<% end %>
<h2><%=I18n.t("modul.desc")%></h2>
<p>
<%= raw(@modul.desc) %>
</p>
</div>
<div class="span4">
<div class="lva-sidebar">
<h2><%=I18n.t("modul.mgs")%></h2>
<ul>
<% @modul.modulgruppen.each do |mg| %>
<li>
<%= render 'modulgruppen/kurz', :modulgruppe=>mg %>
</li>
<% end %>
</ul>
</div>
</div>
</div> </div>
<div class="span4">
<div class="lva-sidebar">
<h2><%=I18n.t("modul.mgs")%></h2>
<ul>
<% @modul.modulgruppen.each do |mg| %>
<li>
<%= render 'modulgruppen/kurz', :modulgruppe=>mg %>
</li>
<% end %>
</ul>
<h2><%=I18n.t("modul.lvas")%></h2>
<% @modul.lvas.each_slice(3) do |row| %>
<ul>
<% row.each do |lv| %>
<li>
<%= render 'lvas/lva_semester', :lva=>lv%>
</li>
<% end %>
</ul>
<% end %>
</div>
</div></div>

View File

@@ -13,13 +13,16 @@
<%= neuigkeit.title%> <%= neuigkeit.title%>
</h1> </h1>
<%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%> <%= raw(neuigkeit.text_first_words) unless neuigkeit.text.nil?%>
</div>
<% if neuigkeit.has_calentries? %>
<div class="pull-right" href="#">
<%= image_tag("/iconnavy/time.png") %>
<%= neuigkeit.calentries.first.text %>
</div> </div>
<% if neuigkeit.has_calentries? %>
<div class="pull-right" href="#">
<%= image_tag("/iconnavy/time.png") %>
<% unless neuigkeit.calentries.upcoming.empty? %>
<%= neuigkeit.calentries.upcoming.first.text %>
<% else unless neuigkeit.calentries.recent.empty? %>
<%= neuigkeit.calentries.recent.first.text %>
<% end %><% end %>
</div>
<% end %> <% end %>
</div> </div>

View File

@@ -11,7 +11,7 @@
</span> </span>
<div class="media"> <div class="media">
<div class="pull-left" href="#"> <div class="pull-left" href="#">
<p><br><%= link_to image_tag(@neuigkeit.picture.big_thumb.url),@neuigkeit.picture.url %> <p><br><%= link_to image_tag(@neuigkeit.picture.big_thumb.url),@neuigkeit.picture.try(:url) %>
</p> </p>
</div> </div>
<div class="media-body"> <div class="media-body">

View File

@@ -0,0 +1,9 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<%= raw(@studium.desc) %>
</div>
</div>
</div>

View File

@@ -0,0 +1,22 @@
<div class="container-fluid">
<div class="row-fluid">
<% if params[:info].true? %>
<%= raw(@studium.desc) %>
<% else %>
<%= @studium.desc_first_words %> <%= link_to I18n.t('studium.info'), studium_path(@studium, :ansicht=>params[:ansicht], :info=>true) %>
<% end %>
<% @studienphasen.each do |sp| %>
<% sp[:modulgruppen].each do |row| %>
<div class="row-fluid">
<% row.each do |modulgruppe| %>
<div class="span<%= sp[:width]%> min-width:13em;">
<%= render modulgruppe %>
</div>
<% end %>
</div>
<% end %>
<% end %>
</div>

View File

@@ -0,0 +1,34 @@
<div class="container-fluid">
<% if params[:info].true? %>
<%= raw(@studium.desc) %>
<% else %>
<%= @studium.desc_first_words %> <%= link_to I18n.t('studium.info'), studium_path(@studium, :ansicht=>params[:ansicht], :info=>true) %>
<% end %>
<% @studium.semester.each do |sem| %>
<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>
</div>
</div>
<% sem.lvas.each do |lva| %>
<div class="row-fluid">
<%= render :partial=>'lvas/lva_semester', :locals =>{:lva => lva}%>
</div>
<% end %>
</div>
</div>
</div>
</div>
<% end %>
<%= render :partial=>'layouts/pretty_toolbar', :locals=>{:elements=>@toolbar_elements} %>
</div>

View File

@@ -1,4 +1,4 @@
<%= link_to studium_path(studium, :ansicht=>'semesteransicht') ,{:class=>"linkbox"} do %> <%= link_to studium_path(studium, {:ansicht=>'semesteransicht'}) ,{:class=>"linkbox"} do %>
<div class="media"> <div class="media">
<div class="pull-left"> <div class="pull-left">
<%= image_tag studium.picture.big_thumb.url %> <%= image_tag studium.picture.big_thumb.url %>

View File

@@ -0,0 +1,26 @@
<%= render 'studien/tabs' %>
<div class="content-wrap content-column">
<div class="container-fluid">
<div class="row-fluid">
<div class="span6">
<h1><%= @studium.typ %> <%= @studium.name %> (<%= @studium.zahl %>)</h1>
</div>
<div class="span3 pull-right">
<div class="pull-right">
<%= link_to @text, studium_path(@studium, :ansicht=>@flip), :class=>"btn" %>
<%= link_to "Infoansicht", studium_path(@studium, :ansicht=>'infoansicht'), :class=>"btn" unless params[:ansicht]=='infoansicht'%>
</div>
</div>
<div class="row-fluid">
<div class="span12"x>
<%= raw(@studium.desc) %>
</div>
</div>
</div>
</div>

View File

@@ -2,8 +2,14 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row-fluid"> <div class="row-fluid">
<%= render 'studien/tabs' %> <%= render 'studien/tabs' %>
<div class="span6"> <h1><%= @studium.typ %> <%= @studium.name %> (<%= @studium.zahl %>)</h1></div> <div class="span6">
<div class="span3 pull-right"><div class="pull-right"> <%= link_to @text, studium_path(@studium, :ansicht=>@flip), :class=>"btn" %></div> <h1><%= @studium.typ %> <%= @studium.name %> (<%= @studium.zahl %>)</h1>
</div>
<div class="span3 pull-right">
<div class="pull-right">
<%= link_to @text, studium_path(@studium, :ansicht=>@flip), :class=>"btn" %>
<%= link_to "Infoansicht", studium_path(@studium, :ansicht=>'infoansicht'), :class=>"btn" unless params[:ansicht]=='infoansicht'%>
</div>
</div> </div>
</div> </div>

View File

@@ -1,32 +1,26 @@
<div class="container-fluid"> <%= render 'studien/tabs' %>
<div class="row-fluid"> <div class="content-wrap content-column">
<%= render 'studien/tabs' %> <p id="notice"><%= notice %></p>
<h1><%= @studium.typ %> <%= @studium.name %> (<%= @studium.zahl %>)</h1>
<p id="notice"><%= notice %></p> <p>
<div class="span6"> <h1><%= @studium.typ %> <%= @studium.name %> (<%= @studium.zahl %>)</h1></div> <div class="pull-right">
<div class="span3 pull-right"><div class="pull-right"><%= link_to @text, studium_path(@studium, :ansicht=>@flip), :class=>"btn" %></div> <%= link_to I18n.t("studien.ansicht.semester"), studium_path(@studium, :ansicht=>"semesteransicht"), :class=>"btn" unless params[:ansicht]=='semesteransicht' %>
</div> <%= link_to I18n.t("studien.ansicht.modulgruppe"), studium_path(@studium, :ansicht=>"modulgruppenansicht"), :class=>"btn" unless params[:ansicht]=='modulgruppenansicht' %>
</div> <%= link_to I18n.t("studien.ansicht.info"), studium_path(@studium, :ansicht=>"infoansicht"), :class=>"btn" unless params[:ansicht]=='infoansicht' %>
<div class="row-fluid"> </div>
<% if params[:info].true? %> </p>
<%= raw(@studium.desc) %> <% if params[:ansicht]=='modulgruppenansicht' %>
<%= render partial: 'modulgruppenansicht' %>
<% else if params[:ansicht]=='infoansicht' %>
<%= render partial: 'infoansicht' %>
<% else %> <% else %>
<%= @studium.desc_first_words %> <%= link_to I18n.t('studium.info'), studium_path(@studium, :ansicht=>params[:ansicht], :info=>true) %> <%= render partial: 'semesteransicht' %>
<% end %>
<% @studienphasen.each do |sp| %>
<% sp[:modulgruppen].each do |row| %>
<div class="row-fluid">
<% row.each do |modulgruppe| %>
<div class="span<%= sp[:width]%> min-width:13em;">
<%= render modulgruppe %>
</div>
<% end %>
</div>
<% end %>
<% end %> <% end %>
</div>
<% end %>
<%= render :partial=>'layouts/pretty_toolbar', :object=>@toolbar_modulgruppen %><br> <%= render :partial=>'layouts/pretty_toolbar', :object=>@toolbar_modulgruppen %><br>
<%= render 'layouts/pretty_toolbar' %> <%= render 'layouts/pretty_toolbar' %>
</div> </div>

View File

@@ -1,41 +1,32 @@
<%= tinymce_assets %> <%= tinymce_assets %>
<%= semantic_form_for @thema do |f| %> <div class="container-fluid">
<%= semantic_form_for @thema, :remote=>true do |f| %>
<%= f.inputs do %> <%= f.inputs do %>
<div class="row-fluid">
<div class="span6">
<%= f.input :title %> <%= f.input :title %>
</div>
<div class="span6">
<%= f.input :themengruppe %> <%= f.input :themengruppe %>
<%= f.input :text, :as=>:tinymce_text%> </div>
<% end %> <div class="row-fluid">
<%= tinymce %> <div class="span12">
<%= f.input :text, :as=>:tinymce_text,:label=>false %>
</div>
</div>
<h2>Attachments:</h2> </div>
<%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
<%= f.actions do %> <%= f.actions do %>
<%= f.action :submit, :as => :input %> <%= f.action :submit, :as => :input %>
<%= f.action :cancel, :as => :link %>
<% end %> <% end %>
<% end %><% end %>
<!-- <%= tinymce %>
<% @thema.attachments.each do |attachment| %> <h2>Attachments:</h2>
<ul> <%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
<li>
<%= link_to attachment.name, edit_thema_attachment_path(@thema,attachment) %>
<button type="button" onclick="insertAttachment(<%="\"" + attachment.datei.url + "\""%>,<%="\""+attachment.name+"\""%>)">Insert Me!</button>
</li>
</ul>
<% end %>
<% end %>
-->
<!--
<script>
function insertAttachment(url) {
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "Test");
//editor.setContent(editor.getContent + "<img src=\"" + url + "\">")
}
</script>
-->

View File

@@ -0,0 +1,10 @@
<h2>FAQs:</h2>
<div id="fragen">
<%= render :partial=>'fragen/liste' %>
</div>
<% @frage=Frage.new; @frage.thema=@thema %>
<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 %>

View File

@@ -24,8 +24,9 @@
</br> </br>
<% unless @thema.id.nil? %> <% unless @thema.id.nil? %>
<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema)}] %> <% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema),:remote=>true}] %>
<div id="attachmentform">
</div>
<%= render :partial=>'layouts/pretty_toolbar', :object=>@att_elements %> <%= render :partial=>'layouts/pretty_toolbar', :object=>@att_elements %>
<% end %> <% end %>
<br/> <br/>

View File

@@ -0,0 +1,3 @@
<% verw_liste.each do |thema| %>
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox handle" ><h2><%= thema.title %></h2> </div> <%= link_to edit_thema_path(thema),:remote=>true do %> Edit <% end %> <%= link_to thema_fragen_path(thema),:remote=>true do %> Fragen <% end %></li>
<% end %>

View File

@@ -1,5 +1,5 @@
<div id="themaview">
<h1>Editing thema</h1> <h1>Editing thema</h1>
<%= render 'form' %> <%= render 'form' %>
</div>
</br><%= link_to 'Back', @thema %> </br><%= link_to 'Back', @thema %>

View File

@@ -0,0 +1 @@
$("#themaview").html("<%= escape_javascript(raw("<h2>"+I18n.t('thema.edit')+"</h2>")+render(:partial=>"themen/form") )%>");

View File

@@ -0,0 +1 @@
$("#themaview").html("<%=escape_javascript( render :partial=>'themen/fragen' )%>")

View File

@@ -1,5 +1,6 @@
<h1>New thema</h1>
<div id="themaview">
<h1><%= I18n.t("thema.add") %></h1>
<%= render 'form' %> <%= render 'form' %>
</div>
<%= link_to 'Back', themen_path %> <%= link_to 'Back', themen_path %>

View File

@@ -11,18 +11,14 @@
--> -->
<%= render :partial=>'layouts/pretty_toolbar' %> <%= render :partial=>'layouts/pretty_toolbar' %>
<h2>FAQs:</h2> <%= render :partial=>'themen/fragen' %>
<div id="fragen">
<%= render :partial=>'fragen/liste' %>
</div>
<% @frage=Frage.new; @frage.thema=@thema %>
<%= render :partial=>'fragen/rform' %>
<% @frage_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('frage.add'), :path=>new_frage_path}] %>
<%= render :partial=>'layouts/pretty_toolbar', :object=>@frage_elements %>
<!-- <!--
<%= link_to 'Neue Frage', new_frage_path %> <br/> <%= link_to 'Neue Frage', new_frage_path %> <br/>
--> -->
<br/> <br/>
<h2><%= I18n.t('attachment.title')%>:</h2> <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} %> <%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>

View File

@@ -0,0 +1,4 @@
$("#themaview").html("<%= escape_javascript(raw("<h2>Bearbeiten</h2>")+render(:partial=>"themen/small", :object=>@thema) )%>");
$("#themen").html("<%= escape_javascript(render(:partial=>"themen/verw_liste", :object=>@themen) )%>");

View File

@@ -0,0 +1,2 @@
alert("hallo Welt");
$("#themaview").html("<%=escape_javascript( render :action=>:edit, :layout=>false )%>");

View File

@@ -0,0 +1,17 @@
<% @themengruppen.each do |tg| %>
<h2><%= tg.title%></h2>
<ul>
<% tg.themen.each do |t| %>
<li> <%= t.title %>
<ul>
<% t.fragen.each do |f| %>
<li><b> <%= f.title %></b><p> <%= f.text %></p></li>
<% end %>
</ul>
</li>
<% end %>
</ul>
<% end %>

View File

@@ -1,4 +1,5 @@
<div class="content-wrap content-column"> <div class="content-wrap content-column">
<p> <%= link_to "FAQS", faqs_themengruppen_path %></p>
<ul class="unstyled linkbox-list"> <ul class="unstyled linkbox-list">
<li> <li>
<% @themengruppen.each do |themengruppe| %> <% @themengruppen.each do |themengruppe| %>

View File

@@ -1,30 +1,26 @@
<h1><%= @themengruppe.title %></h1> <div class="content-wrap content-column" >
<h1><%= @themengruppe.title %></h1>
<p> <p>
<%= @themengruppe.text %> <%= @themengruppe.text %>
</p> </p>
<ul class="unstyled linkbox-list" >
<div class="accordion" id="accordion1"> <% @themengruppe.themen.each do |thema| %>
<% @themen.each do |thema| %> <li>
<div class="accordion-group"> <div class="contentbox">
<div class="accordion-heading"> <a href="#<%=thema.id%>">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapse<%=thema.id%>"> <h2><%= thema.title %></h2>
<%= thema.title %> </a>
</a> <% unless thema.gremium.nil? %>
</div> <p>
<div id="collapse<%=thema.id%>" class="accordion-body<%= ' collapse' unless params['thema'].to_i==thema.id %>"> <%= link_to "Zu dem Gremium ..." , thema.gremium %>
<div class="accordion-inner"> </p>
<% unless thema.gremium.nil? %> <% end %>
<p><%= link_to "Zu dem Gremium ..." , thema.gremium %> <%= render :partial => 'themen/small', :object => thema %>
</p> </div>
<% end %> </li>
<%= render :partial => 'themen/small', :object => thema %>
</div>
</div>
</div>
<% end %> <% end %>
</div> </ul>
<%= render :partial=>'layouts/pretty_toolbar' %> <%= render :partial=>'layouts/pretty_toolbar' %>
</div>

View File

@@ -1 +0,0 @@
alert("tt")

View File

@@ -2,18 +2,25 @@
#themen { list-style-type: none; margin: 0; padding: 0; margin-bottom: 15px;zoom: 1; } #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%; } #themen li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 95%; }
</style> </style>
<ul id="themen" class="sort" > <div class="container-fluid">
<% @themen.each do |thema| %> <div class="row-fluid">
<li id="themen_<%= thema.id %>" class="sort" ><div class="contentbox" ><h2><%= thema.title %></h2> </div></li> <div class="span4">
<% end %>
</ul>
<ul id="themen" class="sort" >
<%= render partial:"themen/verw_liste", object: @themen %>
</ul>
<%= link_to new_themengruppe_thema_path(@themengruppe),:remote=>true do %> New Thema <% end %>
</div>
<div class="span8">
<div id="themaview"></div>
</div>
<script> <script>
$( document ).ready(function(){ $( document ).ready(function(){
$("#themen").sortable({ $("#themen").sortable({
cursor: 'crosshair', cursor: 'crosshair',
drag:true, drag:true,
handle: '.handle',
update: function(){ update: function(){
$.ajax({ $.ajax({
url: '<%= themengruppe_sort_themen_path(@themengruppe) %>', url: '<%= themengruppe_sort_themen_path(@themengruppe) %>',

View File

@@ -1,57 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fetsite</title>
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
<%= theme_stylesheet_link_tag "test", :media => "all" %>
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="maincontainer" class="container-fluid">
<div class="row-fluid">
<div class="span1 "></div>
<div class="span10 ">
<div class="header_wrap" style="background:7070a0">
<div class="header">
<%= image_tag('/fetlogo.png',{:style=>"float:left"}) %>
<h1 style="display:block"></h1>
</div>
<div id="menudiv" style="margin-top:12px">
<%= render :template => 'layouts/menu' %>
</div>
</div>
</div>
<div class="span1 "></div>
</div>
<div class="row-fluid">
<div class="span1">
</div>
<div class="span10" id="contentdiv">
<%= yield %>
<span class="pull-right"> <%= render 'layouts/login' %></span>
</div>
<div class="span1">
</div>
</div>
</div>
</body>
</html>

View File

@@ -18,7 +18,6 @@ $( document ).ready(function(){
data: $('#themengruppen').sortable('serialize'), data: $('#themengruppen').sortable('serialize'),
dataType: 'script', dataType: 'script',
complete: function(request){ complete: function(request){
alert("complete");
} }
}) })
} }

View File

@@ -0,0 +1 @@
Blue1 hat eine optisch schlankereKopfzeile und hat ein zentriertes Layout

View File

@@ -1,57 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fetsite</title>
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
<%= theme_stylesheet_link_tag "test", :media => "all" %>
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="maincontainer" class="container-fluid">
<div class="row-fluid">
<div class="span1 "></div>
<div class="span10 ">
<div class="header_wrap" style="background:7070a0">
<div class="header">
<%= image_tag('/fetlogo90.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
<h1 style="display:block"></h1>
</div>
<div id="menudiv" style="margin-top:12px">
<%= render :template => 'layouts/menu' %>
</div>
</div>
</div>
<div class="span1 "></div>
</div>
<div class="row-fluid">
<div class="span1">
</div>
<div class="span10" id="contentdiv">
<%= yield %>
<span class="pull-right"> <%= render 'layouts/login' %></span>
</div>
<div class="span1">
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,34 +0,0 @@
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse collapse">
<ul class="nav nav-pills nav-stacked">
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
</li>
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
<li>
<%= link_to 'Admin' , config_path%>
</li>
</ul>
<span class="pull-right"><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %>
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
<%end %>
</span>
</div>
</div>
</div>
</div>

View File

@@ -1,26 +0,0 @@
<div class="content-wrap content-column" >
<h1><%= @themengruppe.title %></h1>
<p>
<%= @themengruppe.text %>
</p>
<ul class="unstyled linkbox-list" >
<% @themengruppe.themen.each do |thema| %>
<li>
<div class="contentbox">
<a href="#<%=thema.id%>">
<h2><%= thema.title %></h2>
</a>
<% unless thema.gremium.nil? %>
<p>
<%= link_to "Zu dem Gremium ..." , thema.gremium %>
</p>
<% end %>
<%= render :partial => 'themen/small', :object => thema %>
</div>
</li>
<% end %>
</ul>
<%= render :partial=>'layouts/pretty_toolbar' %>
</div>

View File

@@ -1,57 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fetsite</title>
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
<%= theme_stylesheet_link_tag "test", :media => "all" %>
<% theme_stylesheet_link_tag "mod", :media=>"all" %>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="maincontainer" class="container-fluid">
<div class="row-fluid">
<div class="span1 "></div>
<div class="span10 ">
<div class="header_wrap" style="background:7070a0">
<div class="header">
<%= image_tag('/fetlogo90white.png',{:style=>"float:left;height:45px"}) %>
<h1 style="display:block"></h1>
</div>
<div id="menudiv" style="margin-top:12px">
<%= render :template => 'layouts/menu' %>
</div>
</div>
</div>
<div class="span1 "></div>
</div>
<div class="row-fluid">
<div class="span1">
</div>
<div class="span10" id="contentdiv">
<%= yield %>
<span class="pull-right"> <%= render 'layouts/login' %></span>
</div>
<div class="span1">
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,34 +0,0 @@
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse collapse">
<ul class="nav nav-pills nav-stacked">
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
</li>
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
<li>
<%= link_to 'Admin' , config_path%>
</li>
</ul>
<span class="pull-right"><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %>
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
<%end %>
</span>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fetsite</title>
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.nil? %>
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.nil? %>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="maincontainer" class="container-fluid">
<div class="row-fluid">
<div class="header">
<%= image_tag('/fetlogo.png',{:style=>"float:left"}) %>
<h1 style="display:block">Fachschaft Elektrotechnik</h1>
</div>
</div>
<div class="row-fluid">
<div class="span2 earlymax">
<div id="menudiv"><%= render :template => 'layouts/menu' %></div>
<%= render 'layouts/login' %>
</div>
<div class="span10" id="contentdiv">
<%= yield %>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,7 +1,7 @@
<div class="navbar"> <div class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container"> <div class="container">
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>--> <!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse"> <a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
@@ -12,23 +12,24 @@
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %> <li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
</li> </li>
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li> <li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li> <li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li> <li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li> <li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li> <li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
<li class="divider"></li>
<li><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %>
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
<%end %>
</li>
<li> <li>
<%= link_to 'Admin' , config_path%> <%= link_to 'Admin' , config_path%>
</li> </li>
</ul> </ul>
<span class="pull-right"><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %>
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
<%end %>
</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,30 @@
<h1><%= @themengruppe.title %></h1>
<p>
<%= @themengruppe.text %>
</p>
<div class="accordion" id="accordion1">
<% @themen.each do |thema| %>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapse<%=thema.id%>">
<%= thema.title %>
</a>
</div>
<div id="collapse<%=thema.id%>" class="accordion-body<%= ' collapse' unless params['thema'].to_i==thema.id %>">
<div class="accordion-inner">
<% unless thema.gremium.nil? %>
<p><%= link_to "Zu dem Gremium ..." , thema.gremium %>
</p>
<% end %>
<%= render :partial => 'themen/small', :object => thema %>
</div>
</div>
</div>
<% end %>
</div>
<%= render :partial=>'layouts/pretty_toolbar' %>

View File

@@ -51,7 +51,7 @@ Fetsite::Application.configure do
# config.action_controller.asset_host = "http://assets.example.com" # config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js ) # config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored # Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false # config.action_mailer.raise_delivery_errors = false

View File

@@ -12,7 +12,9 @@ de:
back: "Zurück" back: "Zurück"
sure_del: "Sicher endgültig löschen?" sure_del: "Sicher endgültig löschen?"
home: home:
kontakt: "Kontakt"
mtitle: "Menu" mtitle: "Menu"
login: "FET Login"
willkommen: "Willkommen bei der Fachschaft Elektrotechnik" willkommen: "Willkommen bei der Fachschaft Elektrotechnik"
hallobeiderfet: "auf der Seite der Fachschaft Elektrotechnik an der TU Wien. Wir sind die offizielle Vertretung aller Studierenden auf der Fakultät für Elektrotechnik und Informationstechnik. Wir vertreten eure Interessen in den offiziellen Gremien der Universität. Wir sind bemüht euch in Anliegen des Studiums bestmöglich zu unterstützen und beraten. Außerdem bieten wir ein Rahmenprogramm zum Studium in Form von Veranstaltungen und Festln. Wir freuen uns über Feedback und Anregungen, insbesondere von jenen, die gleich Nägel mit Köpfen machen und unser Team verstärken wollen oder ihre Themen und Meinungen in eine unserer Sitzungen einbringen möchten." hallobeiderfet: "auf der Seite der Fachschaft Elektrotechnik an der TU Wien. Wir sind die offizielle Vertretung aller Studierenden auf der Fakultät für Elektrotechnik und Informationstechnik. Wir vertreten eure Interessen in den offiziellen Gremien der Universität. Wir sind bemüht euch in Anliegen des Studiums bestmöglich zu unterstützen und beraten. Außerdem bieten wir ein Rahmenprogramm zum Studium in Form von Veranstaltungen und Festln. Wir freuen uns über Feedback und Anregungen, insbesondere von jenen, die gleich Nägel mit Köpfen machen und unser Team verstärken wollen oder ihre Themen und Meinungen in eine unserer Sitzungen einbringen möchten."
home: "Startseite" home: "Startseite"
@@ -21,6 +23,8 @@ de:
info: "Information" info: "Information"
mitarbeiter: "Mitarbeiter" mitarbeiter: "Mitarbeiter"
fotos: "Fotos" fotos: "Fotos"
search: "Suche"
formtastic: formtastic:
titles: titles:
modul: modul:

View File

@@ -7,6 +7,7 @@ de:
notactive_members: "Pension" notactive_members: "Pension"
new_profile: "Neues Profil anlegen" new_profile: "Neues Profil anlegen"
gremium: gremium:
new: "Neues Gremium"
filter: filter:
berufung: berufung:
title: "Berufungskommission" title: "Berufungskommission"

View File

@@ -14,6 +14,10 @@ de:
<li>Klick auf den Namen eines Objektes führt zu dessen Ansicht, ein Klick auf edit direkt zum Bearbeitungsformular</li> <li>Klick auf den Namen eines Objektes führt zu dessen Ansicht, ein Klick auf edit direkt zum Bearbeitungsformular</li>
<li>Per Dropdown-Menü kann nach einzelnen Objekten gefiltert werden. Die Filter können kombiniert werden, wobei nur erlaubte Kombinationen möglich sind. <b>Solange validation-Fehler (im Log rot und fett) auftreten, keine Filter verwenden</b></li> <li>Per Dropdown-Menü kann nach einzelnen Objekten gefiltert werden. Die Filter können kombiniert werden, wobei nur erlaubte Kombinationen möglich sind. <b>Solange validation-Fehler (im Log rot und fett) auftreten, keine Filter verwenden</b></li>
</ul>" </ul>"
ansicht:
modulgruppe: "Modulgruppenansicht"
semester: "Semesteransicht"
info: "Infoansicht"
modul: modul:
edit: "Modul bearbeiten" edit: "Modul bearbeiten"
list: "Alle Module" list: "Alle Module"
@@ -31,6 +35,7 @@ de:
list: "Alle Lvas" list: "Alle Lvas"
semester: semester:
ohne: "Ohne Semesterzuordnung" ohne: "Ohne Semesterzuordnung"
semester: "Semester"
modulgruppe: modulgruppe:
typ: "Typ" typ: "Typ"
edit: "Modulgruppe bearbeiten" edit: "Modulgruppe bearbeiten"

View File

@@ -5,6 +5,7 @@ de:
edit: "Themengruppe bearbeiten" edit: "Themengruppe bearbeiten"
remove: "Themengruppe löschen" remove: "Themengruppe löschen"
sure: "Sicher, dass Sie diese Themengruppe löschen möchten?" sure: "Sicher, dass Sie diese Themengruppe löschen möchten?"
manage: "Themengruppe verwalten"
thema: thema:
add: "Thema hinzufügen" add: "Thema hinzufügen"
edit: "Thema bearbeiten" edit: "Thema bearbeiten"
@@ -18,3 +19,18 @@ de:
attachment: attachment:
title: "Anhang" title: "Anhang"
add: "Anhang hinzufügen" add: "Anhang hinzufügen"
formtastic:
labels:
thema:
title: "Themen Name"
themengruppe: "Gruppe"
hints:
thema:
title: "Überschrift"
activerecord:
errors:
models:
thema:
attributes:
title:
blank: "Der Themen Name darf nicht leer sein!"

View File

@@ -7,10 +7,10 @@
#get 'home',:controller=>home,:action=>:index,:as=>"home_index" #get 'home',:controller=>home,:action=>:index,:as=>"home_index"
scope '(:locale)/admin' do scope '(:locale)/admin' do
resources :users, :only=>[] do resources :users, :only=>[] do
collection do collection do
get :index get :index
post :all_update post :all_update
end end
end end
get 'users/:id/add_role/:role', :controller=>:users, :action=>:add_role, :as=>'user_add_role' get 'users/:id/add_role/:role', :controller=>:users, :action=>:add_role, :as=>'user_add_role'
get 'users/:id/do_confirm', :controller=>:users, :action=>:do_confirm, :as=>'user_do_confirm' get 'users/:id/do_confirm', :controller=>:users, :action=>:do_confirm, :as=>'user_do_confirm'
@@ -20,10 +20,12 @@ end
devise_for :users , :controllers=>{:omniauth_callbacks=> "users/omniauth_callbacks"} devise_for :users , :controllers=>{:omniauth_callbacks=> "users/omniauth_callbacks"}
scope '(:locale)' do scope ':locale' do
scope '(t/:theme)' do
# Studien
resources :studien, :only=>[:new,:edit,:update,:destroy]
scope '(:ansicht)' do scope '(:ansicht)' do
resources :studien, :only=>[:new,:edit,:update,:destroy]
resources :studien, :only=>[:show] resources :studien, :only=>[:show]
end end
@@ -62,9 +64,11 @@ end
get 'load_tiss' get 'load_tiss'
post 'show_tiss' post 'show_tiss'
end end
resources :beispiele#, :only=>[:show,:index,:create]
resources :lvas do resources :lvas do
resources :beispiele, :only=>[:show,:index] get 'compare_tiss'
get 'load_tiss'
resources :beispiele#, :only=>[:show,:index,:create]
end end
resources :fragen resources :fragen
@@ -96,21 +100,24 @@ end
# get 'rubriken/:id/verwalten',:controller=>:rubriken,:action=>:verwalten, :as=>'verwalten_rubrik' # get 'rubriken/:id/verwalten',:controller=>:rubriken,:action=>:verwalten, :as=>'verwalten_rubrik'
# get 'rubriken/verwalten',:controller=>:rubriken,:action=>:alle_verwalten, :as=>'rubriken_verwalten' # get 'rubriken/verwalten',:controller=>:rubriken,:action=>:alle_verwalten, :as=>'rubriken_verwalten'
resources :home, :only=>[:index] resources :home, :only=>[:index] do
get 'home/dev', :controller=>:home, :action=>:dev, :as=>'home_dev' collection do
get 'home/startdev', :controller=>:home, :action=>:startdev, :as=>'home_startdev' get 'dev'
get 'home/linksnotimplemented', :controller=>:home, :action=>:linksnotimplemented, :as=>'home_linksnotimplemented' get 'startdev'
get 'linksnotimplemented'
get 'kontakt'
end
end
resources :beispiele
resources :themen do resources :themen do
get :fragen
resources :attachments resources :attachments
end end
resources :themengruppen do resources :themengruppen do
get :verwalten get :verwalten
get :verwalten_all,:on=>:collection get :verwalten_all,:on=>:collection
get :faqs, :on=>:collection
post :sort_themen post :sort_themen
post :sort_themengruppen, :on=>:collection post :sort_themengruppen, :on=>:collection
resources :themen, :only=>[:new, :show] resources :themen, :only=>[:new, :show]
@@ -121,7 +128,7 @@ end
resources :calentries resources :calentries
end end
end
# The priority is based upon order of creation: # The priority is based upon order of creation:
# first created -> highest priority. # first created -> highest priority.

4
db/initdebug.rb Normal file
View File

@@ -0,0 +1,4 @@
u=User.new
u.email="peter@fet.at"
u.password="schlechter"
u.save

View File

@@ -0,0 +1,5 @@
class AddPruefungsinformationToLvaTranslations < ActiveRecord::Migration
def change
add_column :lva_translations, :pruefungsinformation,:text
end
end

BIN
public/fet_innen-6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
public/fetlogo2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB