forked from bofh/fetsite
Compare commits
12 Commits
prep_upgra
...
latest
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f5fed7881 | ||
|
|
638795b8d3 | ||
|
|
1b3e5694c9 | ||
|
|
d7ff42dc18 | ||
|
|
37956e673d | ||
|
|
2f43d5966f | ||
|
|
df3b771048 | ||
|
|
c7267f9299 | ||
|
|
2afbd0fa45 | ||
|
|
165268d695 | ||
|
|
ad36b8dfc7 | ||
|
|
cc3eccd43d |
11
.gitignore
vendored
11
.gitignore
vendored
@@ -28,7 +28,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
|
||||||
@@ -40,23 +40,16 @@ console
|
|||||||
/server
|
/server
|
||||||
/public/uploads/
|
/public/uploads/
|
||||||
/public/sitemap*
|
/public/sitemap*
|
||||||
/public/assets/
|
|
||||||
/vendor/*
|
/vendor/*
|
||||||
/bak/*
|
/bak/*
|
||||||
/solr/*
|
/solr/*
|
||||||
/log/*
|
/log/*
|
||||||
*#
|
*#
|
||||||
|
Gemfile.lock
|
||||||
/config/database.yml
|
/config/database.yml
|
||||||
/config/start_topic.yml
|
/config/start_topic.yml
|
||||||
/config/contact_topic.yml
|
/config/contact_topic.yml
|
||||||
/config/etherpad/APIKEY.*
|
|
||||||
/config/page.yml
|
|
||||||
|
|
||||||
.#*
|
.#*
|
||||||
.*
|
.*
|
||||||
!/.gitignore
|
!/.gitignore
|
||||||
*.pid
|
*.pid
|
||||||
|
|
||||||
/doc/app
|
|
||||||
coverage/*
|
|
||||||
7
Gemfile
7
Gemfile
@@ -1,5 +1,5 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
gem 'rake', '~>10.0'
|
gem 'rake', '~>11.0'
|
||||||
gem 'rails', '3.2.13'
|
gem 'rails', '3.2.13'
|
||||||
gem 'sprockets', '2.2.2'
|
gem 'sprockets', '2.2.2'
|
||||||
gem 'webrick', '1.3.1'
|
gem 'webrick', '1.3.1'
|
||||||
@@ -33,7 +33,7 @@ gem 'jquery-rails'
|
|||||||
# gem 'jbuilder'
|
# gem 'jbuilder'
|
||||||
|
|
||||||
# Use unicorn as the app server
|
# Use unicorn as the app server
|
||||||
gem 'unicorn', '~>4.8.0'
|
gem 'unicorn'
|
||||||
|
|
||||||
# Deploy with Capistran
|
# Deploy with Capistran
|
||||||
# gem 'capistrano'
|
# gem 'capistrano'
|
||||||
@@ -82,7 +82,7 @@ gem 'haml'
|
|||||||
#gem 'wikicloth'
|
#gem 'wikicloth'
|
||||||
#gem 'gollum-lib'
|
#gem 'gollum-lib'
|
||||||
gem 'awesome_nested_set'
|
gem 'awesome_nested_set'
|
||||||
gem 'annotate', "~>2.6.0"
|
gem 'annotate', ">=2.5.0"
|
||||||
gem 'carrierwave', "~>0.9.0"
|
gem 'carrierwave', "~>0.9.0"
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
gem 'factory_girl_rails',"~>4.5.0"
|
gem 'factory_girl_rails',"~>4.5.0"
|
||||||
@@ -96,7 +96,6 @@ gem 'rspec-activemodel-mocks', '~>1.0.1'
|
|||||||
gem 'rspec-html-matchers', '~>0.7.0'
|
gem 'rspec-html-matchers', '~>0.7.0'
|
||||||
gem 'rspec-expectations', '~>3.3.1'
|
gem 'rspec-expectations', '~>3.3.1'
|
||||||
gem 'capybara', '~>2.5.0'
|
gem 'capybara', '~>2.5.0'
|
||||||
gem 'simplecov'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
gem "simple_calendar", "~> 0.1.9"
|
gem "simple_calendar", "~> 0.1.9"
|
||||||
|
|||||||
456
Gemfile.lock
456
Gemfile.lock
@@ -1,456 +0,0 @@
|
|||||||
GIT
|
|
||||||
remote: git://github.com/matenia/bootstrap-kaminari-views.git
|
|
||||||
revision: 9df61d400fc144c3f33d65f3f97e4867b8e68273
|
|
||||||
specs:
|
|
||||||
bootstrap-kaminari-views (0.0.5)
|
|
||||||
kaminari (>= 0.13)
|
|
||||||
rails (>= 3.1)
|
|
||||||
|
|
||||||
GIT
|
|
||||||
remote: git://github.com/rgrove/sanitize
|
|
||||||
revision: acc7e6440139379a0c6b4b76b662ed90acd4b923
|
|
||||||
specs:
|
|
||||||
sanitize (4.6.4)
|
|
||||||
crass (~> 1.0.2)
|
|
||||||
nokogiri (>= 1.4.4)
|
|
||||||
nokogumbo (~> 1.4)
|
|
||||||
|
|
||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
actionmailer (3.2.13)
|
|
||||||
actionpack (= 3.2.13)
|
|
||||||
mail (~> 2.5.3)
|
|
||||||
actionpack (3.2.13)
|
|
||||||
activemodel (= 3.2.13)
|
|
||||||
activesupport (= 3.2.13)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
erubis (~> 2.7.0)
|
|
||||||
journey (~> 1.0.4)
|
|
||||||
rack (~> 1.4.5)
|
|
||||||
rack-cache (~> 1.2)
|
|
||||||
rack-test (~> 0.6.1)
|
|
||||||
sprockets (~> 2.2.1)
|
|
||||||
active_record_query_trace (1.5.4)
|
|
||||||
activemodel (3.2.13)
|
|
||||||
activesupport (= 3.2.13)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
activerecord (3.2.13)
|
|
||||||
activemodel (= 3.2.13)
|
|
||||||
activesupport (= 3.2.13)
|
|
||||||
arel (~> 3.0.2)
|
|
||||||
tzinfo (~> 0.3.29)
|
|
||||||
activeresource (3.2.13)
|
|
||||||
activemodel (= 3.2.13)
|
|
||||||
activesupport (= 3.2.13)
|
|
||||||
activesupport (3.2.13)
|
|
||||||
i18n (= 0.6.1)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
acts_as_votable (0.11.1)
|
|
||||||
addressable (2.5.2)
|
|
||||||
public_suffix (>= 2.0.2, < 4.0)
|
|
||||||
aes_key_wrap (1.0.1)
|
|
||||||
annotate (2.6.10)
|
|
||||||
activerecord (>= 3.2, <= 4.3)
|
|
||||||
rake (~> 10.4)
|
|
||||||
arel (3.0.3)
|
|
||||||
attr_required (1.0.1)
|
|
||||||
awesome_nested_set (2.1.6)
|
|
||||||
activerecord (>= 3.0.0)
|
|
||||||
bcrypt (3.1.11)
|
|
||||||
bcrypt-ruby (3.1.5)
|
|
||||||
bcrypt (>= 3.1.3)
|
|
||||||
bindata (2.4.3)
|
|
||||||
blueimp-gallery (2.11.0.1)
|
|
||||||
railties (>= 3.1.0)
|
|
||||||
blueimp-gallery-rails (2.7.0)
|
|
||||||
railties (>= 3.0, < 5.0)
|
|
||||||
bootstrap-addons-rails (0.1.2)
|
|
||||||
rails
|
|
||||||
bootstrap-sass (2.3.2.2)
|
|
||||||
sass (~> 3.2)
|
|
||||||
builder (3.0.4)
|
|
||||||
cancan (1.6.10)
|
|
||||||
capybara (2.5.0)
|
|
||||||
mime-types (>= 1.16)
|
|
||||||
nokogiri (>= 1.3.3)
|
|
||||||
rack (>= 1.0.0)
|
|
||||||
rack-test (>= 0.5.4)
|
|
||||||
xpath (~> 2.0)
|
|
||||||
carrierwave (0.9.0)
|
|
||||||
activemodel (>= 3.2.0)
|
|
||||||
activesupport (>= 3.2.0)
|
|
||||||
json (>= 1.7)
|
|
||||||
chronic (0.10.2)
|
|
||||||
climate_control (0.2.0)
|
|
||||||
cocaine (0.5.8)
|
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
|
||||||
coffee-rails (3.2.2)
|
|
||||||
coffee-script (>= 2.2.0)
|
|
||||||
railties (~> 3.2.0)
|
|
||||||
coffee-script (2.4.1)
|
|
||||||
coffee-script-source
|
|
||||||
execjs
|
|
||||||
coffee-script-source (1.12.2)
|
|
||||||
crass (1.0.4)
|
|
||||||
devise (2.2.8)
|
|
||||||
bcrypt-ruby (~> 3.0)
|
|
||||||
orm_adapter (~> 0.1)
|
|
||||||
railties (~> 3.1)
|
|
||||||
warden (~> 1.2.1)
|
|
||||||
diff-lcs (1.3)
|
|
||||||
docile (1.3.1)
|
|
||||||
domain_name (0.5.20180417)
|
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
|
||||||
erubis (2.7.0)
|
|
||||||
etherpad-lite (0.3.0)
|
|
||||||
rest-client (>= 1.6)
|
|
||||||
execjs (1.4.1)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
factory_girl (4.5.0)
|
|
||||||
activesupport (>= 3.0.0)
|
|
||||||
factory_girl_rails (4.5.0)
|
|
||||||
factory_girl (~> 4.5.0)
|
|
||||||
railties (>= 3.0.0)
|
|
||||||
faraday (0.12.2)
|
|
||||||
multipart-post (>= 1.2, < 3)
|
|
||||||
fb_graph (2.7.17)
|
|
||||||
httpclient (>= 2.4)
|
|
||||||
multi_json (>= 1.3)
|
|
||||||
rack-oauth2 (>= 0.14.4)
|
|
||||||
tzinfo
|
|
||||||
ffi (1.9.23)
|
|
||||||
font-awesome-rails (4.7.0.4)
|
|
||||||
railties (>= 3.2, < 6.0)
|
|
||||||
formtastic (2.2.1)
|
|
||||||
actionpack (>= 3.0)
|
|
||||||
formtastic-bootstrap (3.0.0)
|
|
||||||
formtastic (>= 2.2)
|
|
||||||
git (1.3.0)
|
|
||||||
globalize (3.0.5)
|
|
||||||
activemodel (>= 3.0.0, < 4.0.0)
|
|
||||||
activerecord (>= 3.0.0, < 4.0.0)
|
|
||||||
globalize-accessors (0.1.5)
|
|
||||||
globalize (>= 3)
|
|
||||||
globalize-versioning (0.2.0)
|
|
||||||
activemodel (>= 3.2.0, < 5)
|
|
||||||
activerecord (>= 3.2.0, < 5)
|
|
||||||
globalize (>= 3.0.4, < 6)
|
|
||||||
paper_trail (>= 3.0.0, < 5)
|
|
||||||
haml (5.0.4)
|
|
||||||
temple (>= 0.8.0)
|
|
||||||
tilt
|
|
||||||
hashie (3.5.7)
|
|
||||||
highline (1.7.10)
|
|
||||||
hike (1.2.3)
|
|
||||||
http-cookie (1.0.3)
|
|
||||||
domain_name (~> 0.5)
|
|
||||||
httpclient (2.8.3)
|
|
||||||
i18n (0.6.1)
|
|
||||||
journey (1.0.4)
|
|
||||||
jquery-datetimepicker-rails (2.4.1.0)
|
|
||||||
jquery-fileupload-rails (0.4.1)
|
|
||||||
actionpack (>= 3.1)
|
|
||||||
railties (>= 3.1)
|
|
||||||
jquery-rails (3.1.5)
|
|
||||||
railties (>= 3.0, < 5.0)
|
|
||||||
thor (>= 0.14, < 2.0)
|
|
||||||
jquery-ui-rails (4.1.2)
|
|
||||||
railties (>= 3.1.0)
|
|
||||||
json (2.1.0)
|
|
||||||
json-jwt (1.9.4)
|
|
||||||
activesupport
|
|
||||||
aes_key_wrap
|
|
||||||
bindata
|
|
||||||
jwt (1.5.6)
|
|
||||||
kaminari (0.17.0)
|
|
||||||
actionpack (>= 3.0.0)
|
|
||||||
activesupport (>= 3.0.0)
|
|
||||||
kgio (2.11.2)
|
|
||||||
libv8 (3.16.14.19)
|
|
||||||
mail (2.5.5)
|
|
||||||
mime-types (~> 1.16)
|
|
||||||
treetop (~> 1.4.8)
|
|
||||||
meta-tags (2.9.0)
|
|
||||||
actionpack (>= 3.2.0, < 5.3)
|
|
||||||
mime-types (1.25.1)
|
|
||||||
mini_portile2 (2.3.0)
|
|
||||||
minitest (4.7.5)
|
|
||||||
multi_json (1.13.1)
|
|
||||||
multi_xml (0.6.0)
|
|
||||||
multipart-post (2.0.0)
|
|
||||||
mysql2 (0.3.21)
|
|
||||||
net-ldap (0.16.1)
|
|
||||||
netrc (0.11.0)
|
|
||||||
nokogiri (1.8.2)
|
|
||||||
mini_portile2 (~> 2.3.0)
|
|
||||||
nokogumbo (1.5.0)
|
|
||||||
nokogiri
|
|
||||||
oauth2 (1.4.0)
|
|
||||||
faraday (>= 0.8, < 0.13)
|
|
||||||
jwt (~> 1.0)
|
|
||||||
multi_json (~> 1.3)
|
|
||||||
multi_xml (~> 0.5)
|
|
||||||
rack (>= 1.2, < 3)
|
|
||||||
omniauth (1.2.2)
|
|
||||||
hashie (>= 1.2, < 4)
|
|
||||||
rack (~> 1.0)
|
|
||||||
omniauth-facebook (2.0.1)
|
|
||||||
omniauth-oauth2 (~> 1.2)
|
|
||||||
omniauth-ldap (1.0.5)
|
|
||||||
net-ldap (~> 0.12)
|
|
||||||
omniauth (~> 1.0)
|
|
||||||
pyu-ruby-sasl (~> 0.0.3.2)
|
|
||||||
rubyntlm (~> 0.3.4)
|
|
||||||
omniauth-oauth2 (1.5.0)
|
|
||||||
oauth2 (~> 1.1)
|
|
||||||
omniauth (~> 1.2)
|
|
||||||
opengraph_parser (0.2.3)
|
|
||||||
addressable
|
|
||||||
nokogiri
|
|
||||||
options (2.3.2)
|
|
||||||
orm_adapter (0.5.0)
|
|
||||||
paper_trail (3.0.9)
|
|
||||||
activerecord (>= 3.0, < 5.0)
|
|
||||||
activesupport (>= 3.0, < 5.0)
|
|
||||||
paperclip (3.4.2)
|
|
||||||
activemodel (>= 3.0.0)
|
|
||||||
activerecord (>= 3.0.0)
|
|
||||||
activesupport (>= 3.0.0)
|
|
||||||
cocaine (~> 0.5.0)
|
|
||||||
mime-types
|
|
||||||
polyglot (0.3.5)
|
|
||||||
pr_geohash (1.0.0)
|
|
||||||
progress_bar (1.2.0)
|
|
||||||
highline (~> 1.6)
|
|
||||||
options (~> 2.3.0)
|
|
||||||
public_suffix (3.0.2)
|
|
||||||
pyu-ruby-sasl (0.0.3.3)
|
|
||||||
rack (1.4.7)
|
|
||||||
rack-cache (1.7.2)
|
|
||||||
rack (>= 0.4)
|
|
||||||
rack-oauth2 (1.9.2)
|
|
||||||
activesupport
|
|
||||||
attr_required
|
|
||||||
httpclient
|
|
||||||
json-jwt (>= 1.9.0)
|
|
||||||
rack
|
|
||||||
rack-ssl (1.3.4)
|
|
||||||
rack
|
|
||||||
rack-test (0.6.3)
|
|
||||||
rack (>= 1.0)
|
|
||||||
rails (3.2.13)
|
|
||||||
actionmailer (= 3.2.13)
|
|
||||||
actionpack (= 3.2.13)
|
|
||||||
activerecord (= 3.2.13)
|
|
||||||
activeresource (= 3.2.13)
|
|
||||||
activesupport (= 3.2.13)
|
|
||||||
bundler (~> 1.0)
|
|
||||||
railties (= 3.2.13)
|
|
||||||
railties (3.2.13)
|
|
||||||
actionpack (= 3.2.13)
|
|
||||||
activesupport (= 3.2.13)
|
|
||||||
rack-ssl (~> 1.3.2)
|
|
||||||
rake (>= 0.8.7)
|
|
||||||
rdoc (~> 3.4)
|
|
||||||
thor (>= 0.14.6, < 2.0)
|
|
||||||
raindrops (0.19.0)
|
|
||||||
rake (10.5.0)
|
|
||||||
rb-fsevent (0.10.3)
|
|
||||||
rb-inotify (0.9.10)
|
|
||||||
ffi (>= 0.5.0, < 2)
|
|
||||||
rdoc (3.9.5)
|
|
||||||
ref (2.0.0)
|
|
||||||
rest-client (2.0.2)
|
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
|
||||||
mime-types (>= 1.16, < 4.0)
|
|
||||||
netrc (~> 0.8)
|
|
||||||
rmagick (2.16.0)
|
|
||||||
rolify (4.0.0)
|
|
||||||
rsolr (2.2.1)
|
|
||||||
builder (>= 2.1.2)
|
|
||||||
faraday (>= 0.9.0)
|
|
||||||
rspec (3.3.0)
|
|
||||||
rspec-core (~> 3.3.0)
|
|
||||||
rspec-expectations (~> 3.3.0)
|
|
||||||
rspec-mocks (~> 3.3.0)
|
|
||||||
rspec-activemodel-mocks (1.0.3)
|
|
||||||
activemodel (>= 3.0)
|
|
||||||
activesupport (>= 3.0)
|
|
||||||
rspec-mocks (>= 2.99, < 4.0)
|
|
||||||
rspec-collection_matchers (1.1.3)
|
|
||||||
rspec-expectations (>= 2.99.0.beta1)
|
|
||||||
rspec-core (3.3.2)
|
|
||||||
rspec-support (~> 3.3.0)
|
|
||||||
rspec-expectations (3.3.1)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
|
||||||
rspec-support (~> 3.3.0)
|
|
||||||
rspec-html-matchers (0.7.3)
|
|
||||||
nokogiri (~> 1)
|
|
||||||
rspec (>= 3.0.0.a, < 4)
|
|
||||||
rspec-mocks (3.3.2)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
|
||||||
rspec-support (~> 3.3.0)
|
|
||||||
rspec-rails (3.3.3)
|
|
||||||
actionpack (>= 3.0, < 4.3)
|
|
||||||
activesupport (>= 3.0, < 4.3)
|
|
||||||
railties (>= 3.0, < 4.3)
|
|
||||||
rspec-core (~> 3.3.0)
|
|
||||||
rspec-expectations (~> 3.3.0)
|
|
||||||
rspec-mocks (~> 3.3.0)
|
|
||||||
rspec-support (~> 3.3.0)
|
|
||||||
rspec-support (3.3.0)
|
|
||||||
rubyntlm (0.3.4)
|
|
||||||
rubyzip (1.2.1)
|
|
||||||
sass (3.5.6)
|
|
||||||
sass-listen (~> 4.0.0)
|
|
||||||
sass-listen (4.0.0)
|
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
|
||||||
sass-rails (3.2.6)
|
|
||||||
railties (~> 3.2.0)
|
|
||||||
sass (>= 3.1.10)
|
|
||||||
tilt (~> 1.3)
|
|
||||||
seed_dump (0.5.3)
|
|
||||||
shareable (1.1.4)
|
|
||||||
actionpack (>= 3.0.0)
|
|
||||||
activesupport (>= 3.0.0)
|
|
||||||
simple_calendar (0.1.11)
|
|
||||||
rails (>= 3.0)
|
|
||||||
simplecov (0.16.1)
|
|
||||||
docile (~> 1.1)
|
|
||||||
json (>= 1.8, < 3)
|
|
||||||
simplecov-html (~> 0.10.0)
|
|
||||||
simplecov-html (0.10.2)
|
|
||||||
sitemap_generator (6.0.1)
|
|
||||||
builder (~> 3.0)
|
|
||||||
sprockets (2.2.2)
|
|
||||||
hike (~> 1.2)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
rack (~> 1.0)
|
|
||||||
tilt (~> 1.1, != 1.3.0)
|
|
||||||
sqlite3 (1.3.13)
|
|
||||||
sunspot (2.3.0)
|
|
||||||
pr_geohash (~> 1.0)
|
|
||||||
rsolr (>= 1.1.1, < 3)
|
|
||||||
sunspot_rails (2.3.0)
|
|
||||||
rails (>= 3)
|
|
||||||
sunspot (= 2.3.0)
|
|
||||||
sunspot_solr (2.3.0)
|
|
||||||
sunspot_test (0.4.1)
|
|
||||||
sunspot_rails (>= 2.1.1)
|
|
||||||
sunspot_solr
|
|
||||||
temple (0.8.0)
|
|
||||||
themes_for_rails (0.5.1)
|
|
||||||
rails (>= 3.0.0)
|
|
||||||
therubyracer (0.12.3)
|
|
||||||
libv8 (~> 3.16.14.15)
|
|
||||||
ref
|
|
||||||
thor (0.20.0)
|
|
||||||
tilt (1.4.1)
|
|
||||||
tinymce-rails (4.1.10)
|
|
||||||
railties (>= 3.1.1)
|
|
||||||
treetop (1.4.15)
|
|
||||||
polyglot
|
|
||||||
polyglot (>= 0.3.1)
|
|
||||||
tzinfo (0.3.54)
|
|
||||||
uglifier (4.1.10)
|
|
||||||
execjs (>= 0.3.0, < 3)
|
|
||||||
unf (0.1.4)
|
|
||||||
unf_ext
|
|
||||||
unf_ext (0.0.7.5)
|
|
||||||
unicorn (4.8.3)
|
|
||||||
kgio (~> 2.6)
|
|
||||||
rack
|
|
||||||
raindrops (~> 0.7)
|
|
||||||
warden (1.2.7)
|
|
||||||
rack (>= 1.0)
|
|
||||||
webrick (1.3.1)
|
|
||||||
whenever (0.10.0)
|
|
||||||
chronic (>= 0.6.3)
|
|
||||||
xpath (2.1.0)
|
|
||||||
nokogiri (~> 1.3)
|
|
||||||
yaml_db (0.6.0)
|
|
||||||
rails (>= 3.0, < 5.2)
|
|
||||||
rake (>= 0.8.7)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
active_record_query_trace
|
|
||||||
acts_as_votable
|
|
||||||
annotate (~> 2.6.0)
|
|
||||||
awesome_nested_set
|
|
||||||
blueimp-gallery
|
|
||||||
blueimp-gallery-rails
|
|
||||||
bootstrap-addons-rails
|
|
||||||
bootstrap-kaminari-views!
|
|
||||||
bootstrap-sass (~> 2.3.2.1)
|
|
||||||
cancan (~> 1.6.0)
|
|
||||||
capybara (~> 2.5.0)
|
|
||||||
carrierwave (~> 0.9.0)
|
|
||||||
coffee-rails (~> 3.0)
|
|
||||||
devise (~> 2.2.3)
|
|
||||||
etherpad-lite
|
|
||||||
execjs (~> 1.4.0)
|
|
||||||
factory_girl_rails (~> 4.5.0)
|
|
||||||
fb_graph (~> 2.7.17)
|
|
||||||
font-awesome-rails
|
|
||||||
formtastic (~> 2.2.1)
|
|
||||||
formtastic-bootstrap (~> 3.0.0)
|
|
||||||
git
|
|
||||||
globalize (~> 3.0.4)
|
|
||||||
globalize-accessors
|
|
||||||
globalize-versioning
|
|
||||||
haml
|
|
||||||
jquery-datetimepicker-rails
|
|
||||||
jquery-fileupload-rails (= 0.4.1)
|
|
||||||
jquery-rails
|
|
||||||
jquery-ui-rails (~> 4.1.0)
|
|
||||||
kaminari
|
|
||||||
meta-tags
|
|
||||||
minitest (~> 4.7.5)
|
|
||||||
mysql2 (~> 0.3.10)
|
|
||||||
omniauth (~> 1.2.2)
|
|
||||||
omniauth-facebook (~> 2.0.0)
|
|
||||||
omniauth-ldap (~> 1.0.4)
|
|
||||||
opengraph_parser
|
|
||||||
paper_trail (~> 3.0.5)
|
|
||||||
paperclip (~> 3.4.0)
|
|
||||||
progress_bar
|
|
||||||
rails (= 3.2.13)
|
|
||||||
rake (~> 10.0)
|
|
||||||
rmagick
|
|
||||||
rolify (~> 4.0.0)
|
|
||||||
rspec-activemodel-mocks (~> 1.0.1)
|
|
||||||
rspec-collection_matchers (~> 1.1.2)
|
|
||||||
rspec-core (~> 3.3.0)
|
|
||||||
rspec-expectations (~> 3.3.1)
|
|
||||||
rspec-html-matchers (~> 0.7.0)
|
|
||||||
rspec-rails (~> 3.3.0)
|
|
||||||
rspec-support (~> 3.3.0)
|
|
||||||
rubyzip
|
|
||||||
sanitize!
|
|
||||||
sass-rails (~> 3.0)
|
|
||||||
seed_dump (~> 0.5.3)
|
|
||||||
shareable
|
|
||||||
simple_calendar (~> 0.1.9)
|
|
||||||
simplecov
|
|
||||||
sitemap_generator
|
|
||||||
sprockets (= 2.2.2)
|
|
||||||
sqlite3
|
|
||||||
sunspot_rails
|
|
||||||
sunspot_solr
|
|
||||||
sunspot_test
|
|
||||||
themes_for_rails
|
|
||||||
therubyracer
|
|
||||||
tinymce-rails (~> 4.1.0)
|
|
||||||
uglifier (>= 1.0.3)
|
|
||||||
unicorn (~> 4.8.0)
|
|
||||||
webrick (= 1.3.1)
|
|
||||||
whenever
|
|
||||||
yaml_db
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
1.16.6
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
install ruby/fetsite requirements
|
|
||||||
|
|
||||||
do all the rvm stuff
|
|
||||||
|
|
||||||
apt-get install git
|
|
||||||
|
|
||||||
chown fetsite /srv
|
|
||||||
|
|
||||||
su fetsite
|
|
||||||
cd /srv
|
|
||||||
BIN
app/assets/images/infoscreen_header_provisorisch.png
Normal file
BIN
app/assets/images/infoscreen_header_provisorisch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -101,7 +101,7 @@ p {
|
|||||||
.footer .servicecontainer .servicestatus{
|
.footer .servicecontainer .servicestatus{
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width:20px;
|
width:20px;
|
||||||
height: 100vh; /* height: 100%;*/
|
height: 100%
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,11 @@
|
|||||||
if params[:locale]
|
if params[:locale]
|
||||||
if I18n.available_locales.include?(params[:locale].to_sym)
|
if I18n.available_locales.include?(params[:locale].to_sym)
|
||||||
session[:locale] = params[:locale]
|
session[:locale] = params[:locale]
|
||||||
|
|
||||||
else
|
else
|
||||||
flash.now[:notice]= "#{params[:locale]} translation not available"
|
flash.now[:notice]= "#{params[:locale]} translation not available"
|
||||||
logger.error flash.now[:notice]
|
logger.error flash.now[:notice]
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
http_header=request.env['HTTP_ACCEPT_LANGUAGE']
|
http_header=request.env['HTTP_ACCEPT_LANGUAGE']
|
||||||
@@ -20,8 +22,8 @@
|
|||||||
else
|
else
|
||||||
ht=nil
|
ht=nil
|
||||||
end
|
end
|
||||||
I18n.locale = session[:locale] || I18n.default_locale
|
I18n.locale = session[:locale] || ht || I18n.default_locale
|
||||||
# removed ht from selection add || ht to check http header
|
|
||||||
|
|
||||||
session[:locale] = I18n.locale
|
session[:locale] = I18n.locale
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ class HomeController < ApplicationController
|
|||||||
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
|
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
|
||||||
render layout: false
|
render layout: false
|
||||||
end
|
end
|
||||||
|
def verleihkalender
|
||||||
|
authorize! :verleihkalender, User
|
||||||
|
#@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
|
||||||
|
render layout: false
|
||||||
|
end
|
||||||
def kontakt
|
def kontakt
|
||||||
t=YAML.load_file("#{::Rails.root.to_s}/config/contact_topic.yml")
|
t=YAML.load_file("#{::Rails.root.to_s}/config/contact_topic.yml")
|
||||||
@themen = Thema.where(:id=>t)
|
@themen = Thema.where(:id=>t)
|
||||||
@@ -116,5 +121,4 @@ class HomeController < ApplicationController
|
|||||||
File.open("config/contact_topic.yml",'w'){|f| f.write(t.to_yaml)}
|
File.open("config/contact_topic.yml",'w'){|f| f.write(t.to_yaml)}
|
||||||
redirect_to admin_home_index_path
|
redirect_to admin_home_index_path
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class NeuigkeitenController < ApplicationController
|
|||||||
end
|
end
|
||||||
@calentry=ce
|
@calentry=ce
|
||||||
ce.object=@neuigkeit
|
ce.object=@neuigkeit
|
||||||
@neuigkeit.calentries<<ce
|
@neuigkeit.calentry=ce
|
||||||
@neuigkeit.save
|
@neuigkeit.save
|
||||||
|
|
||||||
render 'edit'
|
render 'edit'
|
||||||
@@ -145,7 +145,6 @@ end
|
|||||||
@calentries<< Calentry.new
|
@calentries<< Calentry.new
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_link
|
def find_link
|
||||||
@rubrik=@neuigkeit.rubrik
|
@rubrik=@neuigkeit.rubrik
|
||||||
if can?(:shownonpublic, Rubrik)
|
if can?(:shownonpublic, Rubrik)
|
||||||
@@ -157,7 +156,6 @@ end
|
|||||||
@calentries1=@neuigkeit.calentries
|
@calentries1=@neuigkeit.calentries
|
||||||
nlink_search = Neuigkeit::LINKTYPES.clone
|
nlink_search = Neuigkeit::LINKTYPES.clone
|
||||||
nlink_search.collect!{|t| t.constantize}
|
nlink_search.collect!{|t| t.constantize}
|
||||||
|
|
||||||
# @nlink_search.collect!{|t| t.search(params[:query]).limit(2)}
|
# @nlink_search.collect!{|t| t.search(params[:query]).limit(2)}
|
||||||
@results= Sunspot.search nlink_search do
|
@results= Sunspot.search nlink_search do
|
||||||
fulltext params[:query]
|
fulltext params[:query]
|
||||||
@@ -170,7 +168,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
@neuigkeit = Neuigkeit.find(params[:id])
|
@neuigkeit = Neuigkeit.find(params[:id])
|
||||||
|
|
||||||
@@ -181,7 +178,6 @@ end
|
|||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_link
|
def delete_link
|
||||||
@neuigkeit = Neuigkeit.find(params[:id])
|
@neuigkeit = Neuigkeit.find(params[:id])
|
||||||
@nlink = @neuigkeit.nlinks.find(params[:nlink_id])
|
@nlink = @neuigkeit.nlinks.find(params[:nlink_id])
|
||||||
@@ -191,7 +187,6 @@ end
|
|||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@neuigkeit = Neuigkeit.new(params[:neuigkeit])
|
@neuigkeit = Neuigkeit.new(params[:neuigkeit])
|
||||||
@neuigkeit.author=current_user
|
@neuigkeit.author=current_user
|
||||||
|
|||||||
@@ -2,23 +2,11 @@
|
|||||||
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||||
skip_before_filter :verify_authenticity_token
|
skip_before_filter :verify_authenticity_token
|
||||||
def failure
|
def failure
|
||||||
|
|
||||||
# flash[:notice] = "Failure #{Hash.new(request.env)} #{Hash.new(params)}"
|
# flash[:notice] = "Failure #{Hash.new(request.env)} #{Hash.new(params)}"
|
||||||
#redirect_to new_user_registration_url , :notice=>"Omniauth Login failed"
|
#redirect_to new_user_registration_url , :notice=>"Omniauth Login failed"
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
def developer
|
|
||||||
if Rails.env.development?
|
|
||||||
@user= User.find_for_developer_oauth(request.env["omniauth.auth"],current_user)
|
|
||||||
if @user
|
|
||||||
sign_in_and_redirect @user, event: :authentication
|
|
||||||
else
|
|
||||||
redirect_to new_user_registration_url
|
|
||||||
end
|
|
||||||
else
|
|
||||||
flash[:notice]=flash[:notice] + "Still not logged in "
|
|
||||||
redirect_to new_user_registration_url
|
|
||||||
end
|
|
||||||
end
|
|
||||||
def facebook
|
def facebook
|
||||||
# You need to implement the method below in your model (e.g. app/models/user.rb)
|
# You need to implement the method below in your model (e.g. app/models/user.rb)
|
||||||
@user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)
|
@user = User.find_for_facebook_oauth(request.env["omniauth.auth"], current_user)
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ m.save
|
|||||||
# current_url1({: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+"/"
|
||||||
language_path(locale: target_locale)
|
language_path(locale: target_locale)
|
||||||
end
|
end
|
||||||
|
|
||||||
def ffi1_icon (name)
|
def ffi1_icon (name)
|
||||||
content_tag("i","", class: "ficon ffi1-"+name )
|
content_tag("i","", class: "ficon ffi1-"+name )
|
||||||
end
|
end
|
||||||
@@ -55,11 +54,8 @@ m.save
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fa_stack(icon1, icon2)
|
def fa_stack(icon1, icon2)
|
||||||
h_1 = content_tag("span", content_tag("i","", class: "ficon "+" fa-"+icon1+" fa fa-stack-1x" ) + content_tag("i","", class: "ficon "+" fa-"+icon2+" fa fa-stack-2x" ),class: "fa-stack ")
|
content_tag("span", content_tag("span", content_tag("i","", class: "ficon "+" fa-"+icon1+" fa fa-stack-1x" ) + content_tag("i","", class: "ficon "+" fa-"+icon2+" fa fa-stack-2x" ),class: "fa-stack "),class:"fa-stack-sm")
|
||||||
|
|
||||||
h_2 = content_tag("span", h_1 ,class: "fa-stack-sm")
|
|
||||||
|
|
||||||
h_2
|
|
||||||
end
|
end
|
||||||
def ffi1_list
|
def ffi1_list
|
||||||
y=YAML.load_file("#{::Rails.root.to_s}/config/flatfeticon1.yml")
|
y=YAML.load_file("#{::Rails.root.to_s}/config/flatfeticon1.yml")
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ local=IPAddr.new("127.0.0.1")
|
|||||||
if (user.has_role?("fetuser") || user.has_role?("fetadmin") || tunet.include?(IPAddr.new(request.remote_ip)) || local.include?(IPAddr.new(request.remote_ip)))
|
if (user.has_role?("fetuser") || user.has_role?("fetadmin") || tunet.include?(IPAddr.new(request.remote_ip)) || local.include?(IPAddr.new(request.remote_ip)))
|
||||||
can :infoscreen, User
|
can :infoscreen, User
|
||||||
end
|
end
|
||||||
|
if (user.has_role?("fetuser") || user.has_role?("fetadmin") || tunet.include?(IPAddr.new(request.remote_ip)) || local.include?(IPAddr.new(request.remote_ip)))
|
||||||
|
can :verleihkalender, User
|
||||||
|
end
|
||||||
|
|
||||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||||
can [:show,:answer, :create,:new, :create_from_template, :flag], Survey::Question
|
can [:show,:answer, :create,:new, :create_from_template, :flag], Survey::Question
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ class Gremium < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
belongs_to :thema # Gehört zu einem Thema
|
belongs_to :thema # Gehört zu einem Thema
|
||||||
validates :name, :presence=>true
|
|
||||||
validates :typ, :presence=>true
|
|
||||||
validates :typ, :inclusion =>{ in: Gremium::TYPEN.keys()}
|
|
||||||
scope :tabs, -> { where(:typ => [1,3]).order(:typ).order(:name) } # Gremien die in Tabs angezeigt werden (Alle Anderen nur in der Liste
|
scope :tabs, -> { where(:typ => [1,3]).order(:typ).order(:name) } # Gremien die in Tabs angezeigt werden (Alle Anderen nur in der Liste
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,21 @@
|
|||||||
# typ :string(255)
|
# typ :string(255)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: lvas
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# name :string(255)
|
||||||
|
# desc :text
|
||||||
|
# ects :decimal
|
||||||
|
# lvanr :string(255)
|
||||||
|
# stunden :decimal
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# modul_id :integer
|
||||||
|
# semester_id :integer
|
||||||
|
|
||||||
class Lva < ActiveRecord::Base
|
class Lva < ActiveRecord::Base
|
||||||
ERLAUBTE_TYPEN = ['VO', 'UE', 'VU', 'LU', 'SE', 'PR', 'andere'];
|
ERLAUBTE_TYPEN = ['VO', 'UE', 'VU', 'LU', 'SE', 'PR', 'andere'];
|
||||||
translates :desc,:pruefungsinformation, :fallbacks_for_empty_translations => true, :versioning=> :paper_trail #true #{:gem=>:paper_trail}
|
translates :desc,:pruefungsinformation, :fallbacks_for_empty_translations => true, :versioning=> :paper_trail #true #{:gem=>:paper_trail}
|
||||||
@@ -98,7 +113,7 @@ class Lva < ActiveRecord::Base
|
|||||||
url
|
url
|
||||||
end
|
end
|
||||||
|
|
||||||
# this should be more DRY
|
|
||||||
def load_tissdata
|
def load_tissdata
|
||||||
urlp="https://tiss.tuwien.ac.at/api/course/"+ lvanr.to_s.gsub(".","")+"-"
|
urlp="https://tiss.tuwien.ac.at/api/course/"+ lvanr.to_s.gsub(".","")+"-"
|
||||||
begin
|
begin
|
||||||
@@ -187,8 +202,7 @@ class Lva < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
# Why is this an instance method??
|
|
||||||
# How is it used?
|
|
||||||
def update_multiple(hash)
|
def update_multiple(hash)
|
||||||
newlvas=[]
|
newlvas=[]
|
||||||
params["lvas"].each do |i,l|
|
params["lvas"].each do |i,l|
|
||||||
@@ -223,7 +237,7 @@ class Lva < ActiveRecord::Base
|
|||||||
lecturers.map { |l| l.name }
|
lecturers.map { |l| l.name }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# is this used? in which context?
|
|
||||||
def self.update_multiple_with_modul(hash,modul)
|
def self.update_multiple_with_modul(hash,modul)
|
||||||
newlvas=[]
|
newlvas=[]
|
||||||
hash.each do |i,l|
|
hash.each do |i,l|
|
||||||
@@ -249,7 +263,7 @@ class Lva < ActiveRecord::Base
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# is this used? in which context?
|
|
||||||
def read_et_forum
|
def read_et_forum
|
||||||
lva=self
|
lva=self
|
||||||
url=lva.forumlink
|
url=lva.forumlink
|
||||||
|
|||||||
@@ -1,58 +1,40 @@
|
|||||||
|
|
||||||
# coding: utf-8
|
|
||||||
# This class represents a single meeting of a group or the whole Fachschaft.
|
|
||||||
#
|
|
||||||
class Meeting < ActiveRecord::Base
|
class Meeting < ActiveRecord::Base
|
||||||
|
belongs_to :parent, :polymorphic=>true, touch: true
|
||||||
|
belongs_to :meetingtyp
|
||||||
|
|
||||||
attr_accessible :desc, :intern, :name, :parent_id, :parent_type, :calentry,:calentry_attributes, :meetingtyp_id
|
attr_accessible :desc, :intern, :name, :parent_id, :parent_type, :calentry,:calentry_attributes, :meetingtyp_id
|
||||||
|
|
||||||
# Meeting can belong to different kind of parents e.g. topics
|
|
||||||
belongs_to :parent, :polymorphic=>true, touch: true
|
|
||||||
# Each meeting should have a type, for more information see MeetingTyp
|
|
||||||
belongs_to :meetingtyp
|
|
||||||
# Belongs to a news article, that is usually the Announcement of that meeting
|
|
||||||
belongs_to :neuigkeit, touch: true
|
belongs_to :neuigkeit, touch: true
|
||||||
# has one protocol of type Document, which is of typ=10=protocol
|
|
||||||
has_one :protocol, :class_name=>'Document', :conditions=>{:typ=>10}, :as=>:parent
|
has_one :protocol, :class_name=>'Document', :conditions=>{:typ=>10}, :as=>:parent
|
||||||
# has one agenda of type Document
|
|
||||||
has_one :agenda , :as=>:parent,:conditions=>{:typ=>11}, :class_name=>'Document'
|
has_one :agenda , :as=>:parent,:conditions=>{:typ=>11}, :class_name=>'Document'
|
||||||
# has one calentry which contains the date and time of this meeting
|
|
||||||
has_one :calentry, as: :object, :dependent=> :destroy
|
has_one :calentry, as: :object, :dependent=> :destroy
|
||||||
# has one calendar through the meetingtyp, thus each meeting is put into a calendar
|
|
||||||
has_one :calendar, :through=>:meetingtyp
|
has_one :calendar, :through=>:meetingtyp
|
||||||
# has one rubrik, thus it is associated to a rubrik
|
|
||||||
has_one :rubrik, :through=>:meetingtyp
|
has_one :rubrik, :through=>:meetingtyp
|
||||||
|
|
||||||
# scope upcomming only contains meetings in the future and 1 hour into the past
|
|
||||||
scope :upcomming, includes(:calentry).where("calentries.start>?",1.hour.ago)
|
scope :upcomming, includes(:calentry).where("calentries.start>?",1.hour.ago)
|
||||||
default_scope includes(:calentry).order("calentries.start").reverse_order
|
default_scope includes(:calentry).order("calentries.start").reverse_order
|
||||||
accepts_nested_attributes_for :calentry
|
accepts_nested_attributes_for :calentry
|
||||||
|
# validate :agenda, :presence=>true
|
||||||
# Each meeting is required to have a parent otherwise it will not be shown anywhere on the website
|
# validate :protocol, :presence=>true
|
||||||
validate :parent, :presence=>true
|
validate :parent, :presence=>true
|
||||||
# Each meeting needs a calendar entry
|
|
||||||
validate :calentry, :presence=>true
|
validate :calentry, :presence=>true
|
||||||
|
|
||||||
|
|
||||||
# before each validation fix the calendar entry such that it is always
|
|
||||||
before_validation :fix_calentry
|
before_validation :fix_calentry
|
||||||
|
|
||||||
# title is an alias for text
|
|
||||||
def title
|
def title
|
||||||
self.text
|
self.text
|
||||||
end
|
end
|
||||||
|
|
||||||
# Text is a text representation of the meeting
|
|
||||||
def text
|
def text
|
||||||
t = self.meetingtyp.try(:name) || self.parent.try(:title) || ""
|
unless self.meetingtyp.try(:name).to_s.empty?
|
||||||
t = t + ", " unless t.empty?
|
t = self.meetingtyp.name.to_s+", "
|
||||||
|
else
|
||||||
|
t=""
|
||||||
|
t = parent.title.to_s + ", " if self.name.empty?
|
||||||
|
end
|
||||||
t= t+ self.name.to_s
|
t= t+ self.name.to_s
|
||||||
|
# t = t + " " + I18n.l(self.calentry.start) unless self.calentry.nil?
|
||||||
t = t +" "+ I18n.t("date.am")+" "+ self.calentry.text unless self.calentry.nil?
|
t = t +" "+ I18n.t("date.am")+" "+ self.calentry.text unless self.calentry.nil?
|
||||||
t
|
t
|
||||||
end
|
end
|
||||||
|
|
||||||
# Creante an anouncement with an author
|
|
||||||
# @param user is the author
|
|
||||||
def create_announcement(user)
|
def create_announcement(user)
|
||||||
if self.neuigkeit.nil?
|
if self.neuigkeit.nil?
|
||||||
n = Neuigkeit.new
|
n = Neuigkeit.new
|
||||||
@@ -66,40 +48,32 @@ class Meeting < ActiveRecord::Base
|
|||||||
self.neuigkeit= n
|
self.neuigkeit= n
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Update the title of the announcement to the text of this meeting
|
|
||||||
# @returns [true] if save was successful
|
|
||||||
def update_announcement
|
def update_announcement
|
||||||
n=self.neuigkeit
|
n=self.neuigkeit
|
||||||
n.title=self.text
|
n.title=self.text
|
||||||
n.save
|
n.save
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# fixing the calendar entry and the calendar
|
|
||||||
# most importantly the calendar of the calentry
|
|
||||||
def fix_calentry
|
def fix_calentry
|
||||||
self.calentry.object=self unless self.calentry.nil?
|
self.calentry.object=self unless self.calentry.nil?
|
||||||
self.calentry.calendar = self.meetingtyp.rubrik.calendar
|
self.calentry.calendar = self.meetingtyp.rubrik.calendar
|
||||||
end
|
end
|
||||||
|
|
||||||
def public?
|
def public?
|
||||||
! (self.intern)
|
! (self.intern)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Create a Document that is a protocol for the meeting
|
|
||||||
def create_protocol
|
def create_protocol
|
||||||
if self.protocol.nil? # if no protocol exists
|
if self.protocol.nil?
|
||||||
d=Document.new
|
d=Document.new
|
||||||
d.typ=10
|
d.typ=10
|
||||||
d.name="Protokoll"
|
d.name="Protokoll"
|
||||||
|
unless self.meetingtyp.protocol.nil?
|
||||||
|
d.text=self.meetingtyp.protocol.text
|
||||||
|
end
|
||||||
d.save
|
d.save
|
||||||
self.protocol=d
|
self.protocol=d
|
||||||
end
|
end
|
||||||
# what happens if a protocol already exists?
|
|
||||||
end
|
|
||||||
|
|
||||||
# Create a calender entry for this meeting
|
end
|
||||||
def create_calentry
|
def create_calentry
|
||||||
if self.calentry.nil?
|
if self.calentry.nil?
|
||||||
ce =Calentry.new
|
ce =Calentry.new
|
||||||
@@ -112,6 +86,9 @@ class Meeting < ActiveRecord::Base
|
|||||||
d=Document.new
|
d=Document.new
|
||||||
d.typ=11
|
d.typ=11
|
||||||
d.name="Agenda"
|
d.name="Agenda"
|
||||||
|
unless self.meetingtyp.agenda.nil?
|
||||||
|
d.text=self.meetingtyp.agenda.text
|
||||||
|
end
|
||||||
d.save
|
d.save
|
||||||
self.agenda=d
|
self.agenda=d
|
||||||
end
|
end
|
||||||
@@ -135,16 +112,26 @@ class Meeting < ActiveRecord::Base
|
|||||||
|
|
||||||
def update_time_from_protocol
|
def update_time_from_protocol
|
||||||
st= /Beginn[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s
|
st= /Beginn[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s
|
||||||
st= /Anfang[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s if st.nil? || st.empty?
|
st= /Anfang[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s if st.empty?
|
||||||
self.calentry.start=(self.calentry.start.to_date.to_s + " " +st).to_datetime unless st.nil? || st.empty?
|
self.calentry.start=(self.calentry.start.to_date.to_s + " " +st).to_datetime unless st.empty?
|
||||||
st= /Ende[\s:]*([^<>]*)/.match(self.protocol.text).try(:second).try(:to_s )
|
st= /Ende[\s:]*([^<>]*)/.match(self.protocol.text)[1].to_s
|
||||||
self.calentry.ende=(self.calentry.ende.to_date.to_s + " " +st).to_datetime unless st.nil? || st.empty?
|
self.calentry.ende=(self.calentry.ende.to_date.to_s + " " +st).to_datetime unless st.empty?
|
||||||
end
|
end
|
||||||
def agenda_text
|
def agenda_text
|
||||||
return self.agenda.try(:text) || ""
|
unless self.agenda.nil?
|
||||||
|
t= self.agenda.text
|
||||||
|
else
|
||||||
|
t= ""
|
||||||
|
end
|
||||||
|
t
|
||||||
end
|
end
|
||||||
def protocol_text
|
def protocol_text
|
||||||
return self.protocol.try(:text) || ""
|
unless self.protocol.nil?
|
||||||
|
t= self.protocol.text
|
||||||
|
else
|
||||||
|
t= ""
|
||||||
|
end
|
||||||
|
t
|
||||||
end
|
end
|
||||||
|
|
||||||
searchable do
|
searchable do
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
class Meetingtyp < ActiveRecord::Base
|
class Meetingtyp < ActiveRecord::Base
|
||||||
attr_accessible :agendaintern, :desc, :name, :protocolintern, :rubrik_id, :picture
|
attr_accessible :agendaintern, :desc, :name, :protocolintern, :rubrik_id, :picture
|
||||||
belongs_to :rubrik
|
belongs_to :rubrik
|
||||||
validates :rubrik, :presence=>true
|
validate :rubrik, :presence=>true
|
||||||
validates :name, :presence=>true
|
|
||||||
has_many :meetings
|
has_many :meetings
|
||||||
has_one :calendar, through: :rubrik
|
has_one :calendar, through: :rubrik
|
||||||
has_one :protocol, :class_name=>'Document', :conditions=>{:typ=>10}, :as=>:parent
|
has_one :protocol, :class_name=>'Document', :conditions=>{:typ=>10}, :as=>:parent
|
||||||
|
|||||||
@@ -29,33 +29,12 @@ class User < ActiveRecord::Base
|
|||||||
# Include default devise modules. Others available are:
|
# Include default devise modules. Others available are:
|
||||||
# :token_authenticatable, :confirmable,
|
# :token_authenticatable, :confirmable,
|
||||||
# :lockable, :timeoutable and :omniauthable
|
# :lockable, :timeoutable and :omniauthable
|
||||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable,:omniauthable, :omniauth_providers => [:facebook,:ldap,:developer]
|
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable,:omniauthable, :omniauth_providers => [:facebook,:ldap]
|
||||||
acts_as_voter
|
acts_as_voter
|
||||||
# Setup accessible (or protected) attributes for your model
|
# Setup accessible (or protected) attributes for your model
|
||||||
attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name
|
attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name
|
||||||
belongs_to :fetprofile
|
belongs_to :fetprofile
|
||||||
# attr_accessible :title, :body
|
# attr_accessible :title, :body
|
||||||
|
|
||||||
def self.find_for_developer_oauth(auth, signed_in_resource=nil)
|
|
||||||
# logger.debug("Developer Login started")
|
|
||||||
# logger.debug(auth.info.to_s)
|
|
||||||
|
|
||||||
# logger.debug(auth.extra.raw_info.to_s)
|
|
||||||
email = auth.info.email.to_s
|
|
||||||
logger.debug("Login E-Mail:"+"'"+ email+"'")
|
|
||||||
user= User.where(:provider=>auth.provider,:uid=>email).first
|
|
||||||
unless user
|
|
||||||
user= User.create(name: email,
|
|
||||||
provider: auth.provider,
|
|
||||||
uid: email,
|
|
||||||
email: email,
|
|
||||||
password:Devise.friendly_token[0,20])
|
|
||||||
user.add_role("fetuser")
|
|
||||||
|
|
||||||
end
|
|
||||||
user
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
|
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
|
||||||
logger.debug auth.to_s
|
logger.debug auth.to_s
|
||||||
logger.debug "DDD Username= #{auth.username}"
|
logger.debug "DDD Username= #{auth.username}"
|
||||||
|
|||||||
@@ -1,20 +1,31 @@
|
|||||||
<div id="<%= beispiel.divid %>" class="contentbox">
|
<div id="<%= beispiel.divid %>" class="contentbox">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span5" >
|
<div class="span6" >
|
||||||
<b><%=link_to ffi1_icon("note20")+" " + beispiel.name + " " + I18n.l(beispiel.datum), beispiel.beispieldatei.url, title: beispiel.desc %></b>
|
<b><%=link_to ffi1_icon("note20")+" " + beispiel.name + " " + I18n.l(beispiel.datum), beispiel.beispieldatei.url, title: beispiel.desc %></b>
|
||||||
</div>
|
</div>
|
||||||
<div class="span1" >
|
<div class="span1" >
|
||||||
<%= (beispiel.beispieldatei.size/1024.0).round(2).to_s %>KiB
|
<%= (beispiel.beispieldatei.size/1024.0).round(2).to_s %>KiB
|
||||||
</div>
|
</div>
|
||||||
<div class="span2" >
|
<div class="span5">
|
||||||
<%= beispiel.lecturer.try(:name).to_s %>
|
|
||||||
</div>
|
<%=
|
||||||
<div class="span4">
|
if can?(:like, beispiel)
|
||||||
<%= flag_link(beispiel, "goodquality")%>
|
link_to ffi1_icon("like3")+" like" + "("+beispiel.get_likes.size.to_s+")", like_beispiel_path(beispiel),title: "liked by " + ((current_user.liked?(beispiel)) ? ("you and " + ((beispiel.get_likes.size - 1).to_s + " others")) : beispiel.get_likes.size.to_s), remote: true
|
||||||
<%= flag_link(beispiel, "badquality")%>
|
else
|
||||||
<%= flag_link(beispiel, "delete")%>
|
"liked by " + beispiel.get_likes.size.to_s
|
||||||
<%= like_dislike_for(beispiel) %>
|
end
|
||||||
<%= link_to ff_icon("icon-pencil")+"edit", edit_beispiel_path(beispiel), remote: true if can? :edit, beispiel %>
|
%>
|
||||||
|
|
||||||
|
<%=
|
||||||
|
if can?(:dislike, beispiel)
|
||||||
|
link_to ffi1_icon("dislike")+" dislike" + "("+beispiel.get_dislikes.size.to_s+")", dislike_beispiel_path(beispiel),title:"disliked by " + ((current_user.disliked?(beispiel)) ? ("you and " + ((beispiel.get_dislikes.size - 1).to_s + " others")) : beispiel.get_dislikes.size.to_s) , remote: true
|
||||||
|
else
|
||||||
|
"disliked by " + beispiel.get_dislikes.size.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%= link_to ff_icon("icon-pencil")+"edit", edit_beispiel_path(beispiel) if can? :edit, beispiel%>
|
||||||
<%= link_to fa_icon("trash")+"delete", beispiel_path(beispiel), :method=>:delete, :data=>{:confirm=>I18n.t('beispiel.sure')} if can? :delete, beispiel %>
|
<%= link_to fa_icon("trash")+"delete", beispiel_path(beispiel), :method=>:delete, :data=>{:confirm=>I18n.t('beispiel.sure')} if can? :delete, beispiel %>
|
||||||
<% link_to "Refresh", beispiel_path(beispiel,show_comments: true), remote: true %></br>
|
<% link_to "Refresh", beispiel_path(beispiel,show_comments: true), remote: true %></br>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,5 +39,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render_comments_for(beispiel) %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
<!--<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
|
||||||
<div><%= f.label :email %><br />
|
<div><%= f.label :email %><br />
|
||||||
<%= f.email_field :email, :autofocus => true %></div>
|
<%= f.email_field :email, :autofocus => true %></div>
|
||||||
|
|
||||||
@@ -24,4 +23,6 @@
|
|||||||
<div><%= f.submit "Sign in" %></div>
|
<div><%= f.submit "Sign in" %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
<%= render "devise/shared/links" %>
|
||||||
|
|||||||
@@ -65,13 +65,5 @@ end
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if can?(:edit, @fetprofile) %>
|
<%= render 'layouts/pretty_toolbar' %>
|
||||||
<div>
|
|
||||||
<span>
|
|
||||||
<%= link_to ff_icon("icon-pencil")+I18n.t('common.edit'), edit_fetprofile_path(@fetprofile) if can?(:edit, @fetprofile) %>
|
|
||||||
<%= link_to fa_icon("trash")+I18n.t('common.delete'), fetprofile_path(@fetprofile),method: :delete, data: { confirm: "Are you sure?" } if can?(:delete, @fetprofile) %>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<%#= render 'layouts/pretty_toolbar' %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,61 +7,53 @@
|
|||||||
fjs.parentNode.insertBefore(js, fjs);
|
fjs.parentNode.insertBefore(js, fjs);
|
||||||
}(document, 'script', 'facebook-jssdk'));</script>
|
}(document, 'script', 'facebook-jssdk'));</script>
|
||||||
|
|
||||||
<div class="content-wrap content-column" style="max-width:90em;">
|
<div class="content-wrap content-column" style="max-width:100em;">
|
||||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||||
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
<%= render partial: "themen/small", object: @starttopic %>
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span4">
|
<div class="span5">
|
||||||
|
|
||||||
<ul class="linklist">
|
<ul class="linklist">
|
||||||
<li>
|
|
||||||
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %>
|
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||||
</li>
|
</li>
|
||||||
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox if Studium.count > 0 %></li>
|
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox unless Studium.first.nil? %></li>
|
||||||
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul>
|
||||||
<% cache("stickytopics_startpage_"+cache_array_key(@stickythemen)) do %>
|
|
||||||
<ul class="linklist">
|
|
||||||
<% @stickythemen.each do |t1| %>
|
<% @stickythemen.each do |t1| %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to t1,:class=>:linkbox do %>
|
<%= link_to t1 do %>
|
||||||
<%= render partial: "themen/nlink", object: t1 %>
|
<%= render partial: "themen/nlink", object: t %>
|
||||||
<% end %>
|
<%= end %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
|
||||||
<%= render 'beispiele' %>
|
<%= render 'beispiele' %>
|
||||||
|
<div class="fb-like-box" data-href="https://www.facebook.com/FachschaftET" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="span7">
|
||||||
<div class="span5">
|
<ul class="unstyled linkbox-list" style="margin:5px;">
|
||||||
<ul class="unstyled linkbox-list">
|
|
||||||
<% @neuigkeiten.each do |n| %>
|
<% @neuigkeiten.each do |n| %>
|
||||||
<li><%= render n if can?(:show, n) %> </li>
|
<li><%= render n if can?(:show, n) %> </li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
Verschiedene Styles
|
||||||
|
<ul>
|
||||||
|
<li> <%= link_to "Darkblue", home_index_path({:theme=>"darkblue"}) %></li>
|
||||||
|
<li> <%= link_to "Blue1", home_index_path({:theme=>"blue1"}) %></li>
|
||||||
|
|
||||||
<div class="span3">
|
<li> <%= link_to "2003", home_index_path({:theme=>"2003"}) %></li>
|
||||||
<% cache("calendar_" + cache_array_key(@calentries)+params[:month].to_s+params[:year].to_s) do %>
|
<li> <%= link_to "white_1", home_index_path({:theme=>"white_1"}) %></li>
|
||||||
<%= render 'calendars/calentries', :object=>@calentries %>
|
</ul>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="fb-like-box" data-href="https://www.facebook.com/FachschaftET" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,15 @@
|
|||||||
<h1> FET Intern NEU blue2</h1>
|
<h1> FET Intern NEU </h1>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<div>
|
|
||||||
<ul class="linklist">
|
<ul class="linklist">
|
||||||
<li>
|
<li>
|
||||||
<%= link_to fa_icon("list")+"Adressliste", internlist_fetprofiles_path ,class: :linkbox %>
|
<%= link_to "Adressliste", internlist_fetprofiles_path ,class: :linkbox %></li>
|
||||||
|
<li> <%= link_to "Admin" , admin_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to ff_icon("ffi1-setting")+"Admin" , admin_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
<%= link_to ff_icon("ffi1-setting")+"Neue Oberfläche" , set_preferred_theme_user_path(current_user, params: {theme: "blue2"}), class: :linkbox if can? :set_preferred_theme , current_user %>
|
||||||
</li>
|
</li></ul>
|
||||||
<li>
|
|
||||||
<%= link_to ff_icon("fa fa-folder")+"Treeview" , treeview_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to ff_icon("ffi1-newspaper9")+"Crawler" , crawler_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to ff_icon("ffi1-setting")+"Meetings" , meetingtyps_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to ff_icon("ffi1-setting")+"Alte Oberfläche" , set_preferred_theme_user_path(current_user, params: {theme: "blue1"}), class: :linkbox if can? :set_preferred_theme, current_user %>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul><br>
|
|
||||||
</div>
|
|
||||||
<div>Suche nach Protokollen
|
|
||||||
<%= semantic_form_for :search,:remote=>true, :url=>search_documents_path, :html=>{:id=>"search_form",:class=>"", :method=>'get'} do |f| %>
|
|
||||||
<%= f.input :query, :input_html => { :name => 'query' } , :label=>false, :class=>"search-query" %>
|
|
||||||
<% f.actions do %>
|
|
||||||
<% f.action :submit, :as => :input %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<div id="searchresults">
|
|
||||||
<%= render :partial=>"documents/search_results", :object=>@results %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<ul class="unstyled linkbox-list">
|
<ul class="unstyled linkbox-list">
|
||||||
<li>
|
<li>
|
||||||
<% @themengruppen.each do |themengruppe| %>
|
<% @themengruppen.each do |themengruppe| %>
|
||||||
|
|||||||
18
app/views/home/verleihkalender.html.erb
Normal file
18
app/views/home/verleihkalender.html.erb
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||||
|
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||||
|
<%= stylesheet_link_tag "infoscreenframe.css" %>
|
||||||
|
|
||||||
|
<%= javascript_include_tag "application" %>
|
||||||
|
<%= javascript_include_tag "jmpress" %>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<iframe style="border-width: 0;"
|
||||||
|
src="https://calendar.google.com/calendar/embed?src=f7i0qj89nelp59lq8panbqr2ek%40group.calendar.google.com&src=8gec92r2kpn59jqm4gclg06nrg%40group.calendar.google.com&color=%23853104" width="100%" height="100%" frameborder="0" scrolling="no">
|
||||||
|
</iframe>
|
||||||
|
<script language="javascript" type="text/javascript">setTimeout("location.reload();",60000);</script>
|
||||||
|
<!-- reloads automatically once every 60sec = 1min -->
|
||||||
|
</body>
|
||||||
@@ -1,15 +1,20 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
|
|
||||||
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="https://www.fet.at/logo2014_64.png">
|
<link rel="shortcut icon" href="https://www.fet.at/logo2014_64.png">
|
||||||
|
|
||||||
<link rel="alternate" hreflang="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
<link rel="alternate" hreflang="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
||||||
|
|
||||||
<link rel="alternate" hreflang="en" href="<%= url_for(params.merge(:locale=>:en))%>" />
|
<link rel="alternate" hreflang="en" href="<%= url_for(params.merge(:locale=>:en))%>" />
|
||||||
|
<!--<link rel="shortcut icon" href="http://www.fet.at/favicon.ico">-->
|
||||||
|
<!---->
|
||||||
|
|
||||||
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||||
<%= stylesheet_link_tag "application", :media=>"all" if 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" %>
|
||||||
<%= javascript_include_tag "application" %>
|
<%= javascript_include_tag "application" %>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<% if content_for?(:header) %>
|
<% if content_for?(:header) %>
|
||||||
|
|||||||
@@ -44,20 +44,8 @@
|
|||||||
|
|
||||||
</ul></div>
|
</ul></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<% if not user_signed_in? %>
|
|
||||||
<% if Rails.env.development? %>
|
|
||||||
<%# link_to I18n.t('home.login'), user_omniauth_authorize_path(:developer) %>
|
|
||||||
<%= render 'layouts/login' %>
|
<%= render 'layouts/login' %>
|
||||||
|
</ul>
|
||||||
<% else %>
|
|
||||||
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) %>
|
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<%= render 'layouts/login' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</li></ul>
|
|
||||||
|
|
||||||
<!--<span class="pull-right"><%if I18n.locale == :en %>
|
<!--<span class="pull-right"><%if I18n.locale == :en %>
|
||||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
<%= content_for :header do %>
|
<%= content_for :header do %>
|
||||||
<title>Fetsite - <%= @lva.full_name %></title>
|
<title>Fetsite - <%= @lva.full_name %></title>
|
||||||
<% set_meta_tags :og => {
|
<% set_meta_tags :og => {
|
||||||
:url=>lva_path(:theme=>nil) }
|
:url=>lva_path(:theme=>nil)
|
||||||
|
}
|
||||||
%>
|
%>
|
||||||
<%= display_meta_tags %>
|
<%= display_meta_tags %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div itemscope itemtype="schema.org/Article" >
|
<div itemscope itemtype="schema.org/Article" >
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<%= render 'studien/tabs'%>
|
<%= render 'studien/tabs'%>
|
||||||
@@ -15,7 +17,6 @@
|
|||||||
<%= render 'layouts/pretty_toolbar' %>
|
<%= render 'layouts/pretty_toolbar' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
<h1 itemprop="name"><%= @lva.full_name %></h1>
|
<h1 itemprop="name"><%= @lva.full_name %></h1>
|
||||||
@@ -44,7 +45,6 @@
|
|||||||
<%= @lva.desc.to_s.html_safe %>
|
<%= @lva.desc.to_s.html_safe %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<div class="contentbox">
|
<div class="contentbox">
|
||||||
@@ -59,12 +59,10 @@
|
|||||||
<li><b><%= link_to modul.name , modul_path(modul)%></b>
|
<li><b><%= link_to modul.name , modul_path(modul)%></b>
|
||||||
<ul>
|
<ul>
|
||||||
<% modul.modulgruppen.each do |g| %>
|
<% modul.modulgruppen.each do |g| %>
|
||||||
|
|
||||||
<li><%= link_to g.studium.title_context , studium_path(g.studium)%> (<%=link_to g.name, modulgruppe_path(g)%>)</li>
|
<li><%= link_to g.studium.title_context , studium_path(g.studium)%> (<%=link_to g.name, modulgruppe_path(g)%>)</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,68 +70,34 @@
|
|||||||
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
|
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
|
||||||
<% @lva.lecturers.each do |lec| %>
|
<% @lva.lecturers.each do |lec| %>
|
||||||
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
|
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<%= new_question_for(@lva) %>
|
|
||||||
<% unless @questions.nil? %>
|
|
||||||
<% @questions.each do |q| %>
|
|
||||||
<%= render q if can? :show, q %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
|
||||||
<h2><%= I18n.t("lva.bspe") %></h2>
|
<h2><%= I18n.t("lva.bspe") %></h2>
|
||||||
<p>
|
<p><%= I18n.t("lva.ratebsp")%> <%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||||
<%= I18n.t("lva.ratebsp")%>
|
|
||||||
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
|
||||||
</p>
|
</p>
|
||||||
<%= link_to t("beispiel.zip") , beispiel_sammlung_lva_path(@lva), class: :linkbox %>
|
<%= link_to t("beispiel.zip") , beispiel_sammlung_lva_path(@lva), class: :linkbox %>
|
||||||
<% @beispiele.each do |b| %>
|
<% @beispiele_all.each do |b| %>
|
||||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s+ can?(:comment, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||||
<%= render b%>
|
<%= render b%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @beispiele_badQ.count > 0 %>
|
|
||||||
<h3> Bad Quality or Outdated</h3>
|
|
||||||
<% @beispiele_badQ.each do |b| %>
|
|
||||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
|
||||||
<%= render b%>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% if @beispiele_deleted.count > 0 %>
|
|
||||||
<h3> Trash</h3>
|
|
||||||
<% @beispiele_deleted.each do |b| %>
|
|
||||||
|
|
||||||
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
|
||||||
<%= render b%>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid"> <div class="span12">
|
||||||
<div class="span12">
|
|
||||||
|
|
||||||
<% unless @lva.nlinks.empty? %>
|
<% unless @lva.nlinks.empty? %>
|
||||||
<h2><%= I18n.t("rubrik.title") %></h2>
|
<h2><%= I18n.t("rubrik.title") %></h2>
|
||||||
<% @lva.nlinks.each do |l| %>
|
<% @lva.nlinks.each do |l| %>
|
||||||
<%= render l.neuigkeit %>
|
<%= render l.neuigkeit %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div></div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% cache("lva_beispiel_form_bulk_"+@lva.id.to_s+I18n.locale.to_s+@lva.updated_at.to_i.to_s) do %>
|
<% cache("lva_beispiel_form_bulk_"+@lva.id.to_s+I18n.locale.to_s+@lva.updated_at.to_i.to_s) do %>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
@@ -142,7 +106,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @crawlobjects.nil? %>
|
<% unless @crawlobjects.nil? %>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
|
|||||||
@@ -1,21 +1,8 @@
|
|||||||
<% if neuigkeit_view.nil?
|
|
||||||
neuigkeit_view=@neuigkeit
|
|
||||||
end
|
|
||||||
%>
|
|
||||||
<div id="neuigkeit_<%= neuigkeit_view.id %>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
<div id="neuigkeit_<%= neuigkeit_view.id %>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||||
<%= meta_itemprop("about", neuigkeit_view.text_first_words) %>
|
<meta itemprop="about" content="<%= neuigkeit_view.text_first_words %>"/>
|
||||||
<%= meta_itemprop("sameAs", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
<meta itemprop="sameAs" content="<%= neuigkeit_url(neuigkeit_view,:theme=>nil)%>"/>
|
||||||
<%= meta_itemprop("url", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
<meta itemprop="url" content="<%= neuigkeit_url(neuigkeit_view,:theme=>nil)%>"/>
|
||||||
|
|
||||||
<div>
|
|
||||||
<% cache("menu_neuigkeit"+ neuigkeit_view.id.to_s + can?(:edit,neuigkeit_view).to_s + can?(:find_link, neuigkeit_view).to_s + can?(:new, Survey::Question).to_s + can?(:publish, neuigkeit_view).to_s + can?(:unpublish, neuigkeit_view).to_s + neuigkeit_view.published?.to_s + neuigkeit_view.flag_important.to_s + neuigkeit_view.flag_infoscreen.to_s) do %>
|
|
||||||
<%= render partial: "menu" , object: neuigkeit_view%>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<%#= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
|
||||||
</div>
|
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<span itemprop="articleSection">
|
<span itemprop="articleSection">
|
||||||
<%= ff_icon(neuigkeit_view.rubrik.icon) unless neuigkeit_view.rubrik.icon.nil? or neuigkeit_view.rubrik.icon.empty? %> <%= neuigkeit_view.rubrik.name %>
|
<%= ff_icon(neuigkeit_view.rubrik.icon) unless neuigkeit_view.rubrik.icon.nil? or neuigkeit_view.rubrik.icon.empty? %> <%= neuigkeit_view.rubrik.name %>
|
||||||
@@ -28,7 +15,6 @@ end
|
|||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% unless neuigkeit_view.published? %>
|
<% unless neuigkeit_view.published? %>
|
||||||
<div class="sticker sticker-red"> Not Published <%= link_to "Publish", publish_rubrik_neuigkeit_path(neuigkeit_view.rubrik,neuigkeit_view),remote:true, class: :btn if can? :publish, neuigkeit_view %></div>
|
<div class="sticker sticker-red"> Not Published <%= link_to "Publish", publish_rubrik_neuigkeit_path(neuigkeit_view.rubrik,neuigkeit_view),remote:true, class: :btn if can? :publish, neuigkeit_view %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -45,7 +31,7 @@ end
|
|||||||
<% end %>
|
<% end %>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h1 itemprop="name">
|
<h1 itemprop="name">
|
||||||
<%= raw(neuigkeit_view.title) %> <%#= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(neuigkeit_view.rubrik, neuigkeit_view), remote: true if can? :edit, neuigkeit_view %>
|
<%= raw(neuigkeit_view.title) %> <%= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(neuigkeit_view.rubrik, neuigkeit_view), remote: true if can? :edit, neuigkeit_view %>
|
||||||
</h1>
|
</h1>
|
||||||
<div itemprop="articleBody">
|
<div itemprop="articleBody">
|
||||||
<%= raw(neuigkeit_view.text) %>
|
<%= raw(neuigkeit_view.text) %>
|
||||||
@@ -54,19 +40,14 @@ end
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render_calentries_for(neuigkeit_view)%>
|
<%= render_calentries_for(neuigkeit_view)%>
|
||||||
<%= new_calentry_div(neuigkeit_view) %>
|
|
||||||
<% unless neuigkeit_view.meeting.nil? %>
|
<% unless neuigkeit_view.meeting.nil? %>
|
||||||
<%= render neuigkeit_view.meeting %>
|
<%= render neuigkeit_view.meeting %>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%= render_attachments_list_for(neuigkeit_view) %>
|
<%= render_attachments_for(neuigkeit_view) %>
|
||||||
|
|
||||||
|
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% @questions.each do |q| %>
|
|
||||||
<%= render q if can? :show, q %>
|
|
||||||
<% end %>
|
|
||||||
|
|||||||
@@ -38,13 +38,17 @@
|
|||||||
</p>
|
</p>
|
||||||
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
|
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
|
||||||
|
|
||||||
|
<%= new_question_for(@neuigkeit) if can? :new, Survey::Question %>
|
||||||
|
<% @questions.each do |q| %>
|
||||||
|
<%= render q if can? :show, q %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit,{themes: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
|
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit,{themes: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
|
||||||
|
|
||||||
<%= render_comments_for(@neuigkeit) %>
|
|
||||||
|
|
||||||
<%# link_to fa_icon("link") + "Neue Verknüpfung" , "#", id: "findlink-open" if can? :find_link, @neuigkeit %>
|
|
||||||
|
|
||||||
|
<%= link_to fa_icon("link") + "Neue Verknüpfung" , "#", id: "findlink-open" if can? :find_link, @neuigkeit %>
|
||||||
<% cache(cache_array_key(@neuigkeit.nlinks, "NLinks")) do %>
|
<% cache(cache_array_key(@neuigkeit.nlinks, "NLinks")) do %>
|
||||||
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -58,7 +62,6 @@
|
|||||||
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
dialog = $( "#findlink-body" ).dialog({
|
dialog = $( "#findlink-body" ).dialog({
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<% unless @calentries.nil? or @calentries.empty? or true%>
|
<% unless @calentries.nil? or @calentries.empty? or True%>
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<% unless @calentries.nil? or @calentries.empty? %>
|
<% unless @calentries.nil? or @calentries.empty? %>
|
||||||
<% cache("calendar_" + @calentries.map{|c| c.id}.join('') + @calentries.max{|c|c.updated_at.to_i}.updated_at.to_i.to_s+"_"+I18n.locale.to_s+params[:month].to_s+params[:year].to_s) do %>
|
<% cache("calendar_" + @calentries.map{|c| c.id}.join('') + @calentries.max{|c|c.updated_at.to_i}.updated_at.to_i.to_s+"_"+I18n.locale.to_s+params[:month].to_s+params[:year].to_s) do %>
|
||||||
|
|||||||
32
app/views/themes/blue2/beispiele/_beispiel.html.erb
Normal file
32
app/views/themes/blue2/beispiele/_beispiel.html.erb
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<div id="<%= beispiel.divid %>" class="contentbox">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span5" >
|
||||||
|
<b><%=link_to ffi1_icon("note20")+" " + beispiel.name + " " + I18n.l(beispiel.datum), beispiel.beispieldatei.url, title: beispiel.desc %></b>
|
||||||
|
</div>
|
||||||
|
<div class="span1" >
|
||||||
|
<%= (beispiel.beispieldatei.size/1024.0).round(2).to_s %>KiB
|
||||||
|
</div>
|
||||||
|
<div class="span2" >
|
||||||
|
<%= beispiel.lecturer.try(:name).to_s %>
|
||||||
|
</div>
|
||||||
|
<div class="span4">
|
||||||
|
<%= flag_link(beispiel, "goodquality")%>
|
||||||
|
<%= flag_link(beispiel, "badquality")%>
|
||||||
|
<%= flag_link(beispiel, "delete")%>
|
||||||
|
<%= like_dislike_for(beispiel) %>
|
||||||
|
<%= link_to ff_icon("icon-pencil")+"edit", edit_beispiel_path(beispiel), remote: true if can? :edit, beispiel %>
|
||||||
|
<%= link_to fa_icon("trash")+"delete", beispiel_path(beispiel), :method=>:delete, :data=>{:confirm=>I18n.t('beispiel.sure')} if can? :delete, beispiel %>
|
||||||
|
<% link_to "Refresh", beispiel_path(beispiel,show_comments: true), remote: true %></br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% unless beispiel.desc.nil? || beispiel.desc.empty? %>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
|
||||||
|
<%= beispiel.desc %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= render_comments_for(beispiel) %>
|
||||||
|
</div>
|
||||||
77
app/views/themes/blue2/fetprofiles/show.html.erb
Normal file
77
app/views/themes/blue2/fetprofiles/show.html.erb
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<%= content_for :header do %>
|
||||||
|
<title>FET - <%= @fetprofile.name %></title>
|
||||||
|
<% unless @fetprofile.picture.url.nil?
|
||||||
|
picture_url=URI(root_url)
|
||||||
|
picture_url.path=@fetprofile.picture.portrait.url
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
|
||||||
|
<% set_meta_tags :og => {
|
||||||
|
:image => picture_url.to_s,
|
||||||
|
:title => @fetprofile.name.to_s ,
|
||||||
|
:type => "profile",
|
||||||
|
:url=>fetprofile_url(@fetprofile,:theme=>nil),
|
||||||
|
:profile=> {
|
||||||
|
:first_name=>@fetprofile.vorname,
|
||||||
|
:last_name=>@fetprofile.nachname
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<% set_meta_tags :og=>{:article=> {:published_time=>I18n.l(@neuigkeit.try(:datum).try(:to_date)) }} unless @neuigkeit.try(:datum).try(:to_date).nil? %>
|
||||||
|
|
||||||
|
<%= display_meta_tags %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<%= render 'fetprofiles/tabs' %>
|
||||||
|
|
||||||
|
<div class="content-wrap content-column">
|
||||||
|
|
||||||
|
<p id="notice"><%= notice %></p>
|
||||||
|
<div style="max-width:70em" itemtype="http://schema.org/Person" itemscope>
|
||||||
|
<meta itemprop="sameAs" content="<%= fetprofile_path(@fetprofile, theme: nil) %>"/>
|
||||||
|
<meta itemprop="url" content="<%= fetprofile_path(@fetprofile, theme: nil) %>"/>
|
||||||
|
<div class="media">
|
||||||
|
<span class="pull-left" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
|
||||||
|
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
|
||||||
|
<%= image_tag @fetprofile.picture.portrait.url %>
|
||||||
|
<meta itemprop="url" content="<%= @fetprofile.picture.portrait.url%>" />
|
||||||
|
</span>
|
||||||
|
<meta itemprop="url" content="<%= @fetprofile.picture.url%>" />
|
||||||
|
<meta itemprop="representativeOfPage" content="true" />
|
||||||
|
</span>
|
||||||
|
<div class="media-body">
|
||||||
|
<h2><span itemprop="givenName"><%= @fetprofile.vorname %></span><span itemprop="familyName"> <%= @fetprofile.nachname %></span><% unless @fetprofile.short.empty? %><span itemprop=""> <%= @fetprofile.short %> </span><% end %></h2>
|
||||||
|
<meta itemprop="name" content="<%= @fetprofile.name %>" />
|
||||||
|
|
||||||
|
<p itemprop="email">
|
||||||
|
<%= @fetprofile.fetmail %>
|
||||||
|
</p>
|
||||||
|
<p itemprop="description">
|
||||||
|
<%= @fetprofile.desc %>
|
||||||
|
</p>
|
||||||
|
<%= render partial: "interninfo", object: @fetprofile if can?(:seeintern, @fetprofile) %>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<% @memberships.each do |m| %>
|
||||||
|
<li>
|
||||||
|
<%= link_to gremium_path(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.delete'), [@fetprofile, m], method: :delete, data: {confirm: I18n.t('common.sure_del')} if params["verwalten"] && can?(:delete, m ) %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% if can?(:edit, @fetprofile) %>
|
||||||
|
<div>
|
||||||
|
<span>
|
||||||
|
<%= link_to ff_icon("icon-pencil")+I18n.t('common.edit'), edit_fetprofile_path(@fetprofile) if can?(:edit, @fetprofile) %>
|
||||||
|
<%= link_to fa_icon("trash")+I18n.t('common.delete'), fetprofile_path(@fetprofile),method: :delete, data: { confirm: "Are you sure?" } if can?(:delete, @fetprofile) %>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<%#= render 'layouts/pretty_toolbar' %>
|
||||||
|
</div>
|
||||||
67
app/views/themes/blue2/home/index.html.erb
Normal file
67
app/views/themes/blue2/home/index.html.erb
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<div id="fb-root"></div>
|
||||||
|
<script>(function(d, s, id) {
|
||||||
|
var js, fjs = d.getElementsByTagName(s)[0];
|
||||||
|
if (d.getElementById(id)) return;
|
||||||
|
js = d.createElement(s); js.id = id;
|
||||||
|
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0";
|
||||||
|
fjs.parentNode.insertBefore(js, fjs);
|
||||||
|
}(document, 'script', 'facebook-jssdk'));</script>
|
||||||
|
|
||||||
|
<div class="content-wrap content-column" style="max-width:90em;">
|
||||||
|
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||||
|
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4">
|
||||||
|
|
||||||
|
<ul class="linklist">
|
||||||
|
<li>
|
||||||
|
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to ffi1_icon("academic") + I18n.t('home.login'), user_omniauth_authorize_path(:ldap) ,class: :linkbox %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to ffi1_icon("quiz")+ I18n.t("themengruppe.faqs"), faqs_themengruppen_path,class: :linkbox %>
|
||||||
|
</li>
|
||||||
|
<li><%= link_to ffi1_icon("books19")+"Beispielsammlung", studium_path(Studium.first, {:ansicht=>'semesteransicht'}) ,class: :btn ,class: :linkbox if Studium.count > 0 %></li>
|
||||||
|
<li><%= link_to "Alte Beispielsammlung", "http://www.fet.at/alt/bin/view/Beispielsammlung/WebHome" ,class: :btn ,class: :linkbox %></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<% cache("stickytopics_startpage_"+cache_array_key(@stickythemen)) do %>
|
||||||
|
<ul class="linklist">
|
||||||
|
<% @stickythemen.each do |t1| %>
|
||||||
|
<li>
|
||||||
|
<%= link_to t1,:class=>:linkbox do %>
|
||||||
|
<%= render partial: "themen/nlink", object: t1 %>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<%= render 'beispiele' %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span5">
|
||||||
|
<ul class="unstyled linkbox-list">
|
||||||
|
<% @neuigkeiten.each do |n| %>
|
||||||
|
<li><%= render n if can?(:show, n) %> </li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span3">
|
||||||
|
<% cache("calendar_" + cache_array_key(@calentries)+params[:month].to_s+params[:year].to_s) do %>
|
||||||
|
<%= render 'calendars/calentries', :object=>@calentries %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="fb-like-box" data-href="https://www.facebook.com/FachschaftET" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
62
app/views/themes/blue2/home/intern.html.erb
Normal file
62
app/views/themes/blue2/home/intern.html.erb
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<h1> FET Intern NEU blue2</h1>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span6">
|
||||||
|
<div>
|
||||||
|
<ul class="linklist">
|
||||||
|
<li>
|
||||||
|
<%= link_to fa_icon("list")+"Adressliste", internlist_fetprofiles_path ,class: :linkbox %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to ff_icon("ffi1-setting")+"Admin" , admin_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to ff_icon("fa fa-folder")+"Treeview" , treeview_home_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to ff_icon("ffi1-newspaper9")+"Crawler" , crawler_index_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to ff_icon("ffi1-setting")+"Meetings" , meetingtyps_path, class: :linkbox if current_user.has_role?(:fetadmin) %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to ff_icon("ffi1-setting")+"Alte Oberfläche" , set_preferred_theme_user_path(current_user, params: {theme: "blue1"}), class: :linkbox if can? :set_preferred_theme, current_user %>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul><br>
|
||||||
|
</div>
|
||||||
|
<div>Suche nach Protokollen
|
||||||
|
<%= semantic_form_for :search,:remote=>true, :url=>search_documents_path, :html=>{:id=>"search_form",:class=>"", :method=>'get'} do |f| %>
|
||||||
|
<%= f.input :query, :input_html => { :name => 'query' } , :label=>false, :class=>"search-query" %>
|
||||||
|
<% f.actions do %>
|
||||||
|
<% f.action :submit, :as => :input %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<div id="searchresults">
|
||||||
|
<%= render :partial=>"documents/search_results", :object=>@results %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="unstyled linkbox-list">
|
||||||
|
<li>
|
||||||
|
<% @themengruppen.each do |themengruppe| %>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<%= render themengruppe if can?(:show,themengruppe)%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<%= link_to "Users", users_path %>
|
||||||
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
<h2>Neuigkeiten</h2>
|
||||||
|
<ul class="unstyled linkbox-list">
|
||||||
|
<% @neuigkeiten.each do |n| %>
|
||||||
|
<li><%= render n if can?(:show, n) %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2></h2>
|
||||||
66
app/views/themes/blue2/layouts/application.html.erb
Executable file
66
app/views/themes/blue2/layouts/application.html.erb
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="shortcut icon" href="https://www.fet.at/logo2014_64.png">
|
||||||
|
|
||||||
|
<link rel="alternate" hreflang="de" href="<%= url_for(params.merge(:locale=>:de))%>" />
|
||||||
|
<link rel="alternate" hreflang="en" href="<%= url_for(params.merge(:locale=>:en))%>" />
|
||||||
|
|
||||||
|
<%= stylesheet_link_tag "themes/"+theme_name+"/application", :media => "all" unless theme_name.empty? %>
|
||||||
|
<%= stylesheet_link_tag "application", :media=>"all" if theme_name.empty? %>
|
||||||
|
<%= javascript_include_tag "application" %>
|
||||||
|
<%= csrf_meta_tags %>
|
||||||
|
<% if content_for?(:header) %>
|
||||||
|
<%= yield :header %>
|
||||||
|
<% else %>
|
||||||
|
<title>Fetsite</title>
|
||||||
|
<% end %>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="maincontainer" class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span10 offset1 header_span">
|
||||||
|
<% cache("menu_u"+user_signed_in?.to_s+current_user.try(:id).to_s+"l"+I18n.locale.to_s+ can?(:seeintern, User).to_s+ can?(:index,Gallery).to_s+params[:theme].to_s, expires_in: 24.hours) do %>
|
||||||
|
<div class="header_wrap">
|
||||||
|
<div class="header hidden-print">
|
||||||
|
<%= link_to home_index_path do %>
|
||||||
|
<!-- <span class="feticon-fet_logo fa-4x color-1"> </span>-->
|
||||||
|
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="header visible-print">
|
||||||
|
<%= image_tag('/logo2014_64.png',{:style=>"float:left;height:50px",:height=>"50"}) %>
|
||||||
|
</div>
|
||||||
|
<div class="visible-print">
|
||||||
|
Fachschaft Elektrotechnik
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div id="menudiv" style="margin-top:12px" class="hidden-print">
|
||||||
|
<%= render :template => 'layouts/menu' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span10 offset1" id="contentdiv">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$('.dropdown-toggle').click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
setTimeout($.proxy(function() {
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
$(this).siblings('.dropdown-backdrop').off().remove();
|
||||||
|
}
|
||||||
|
}, this), 0);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
62
app/views/themes/blue2/layouts/menu.html.erb
Normal file
62
app/views/themes/blue2/layouts/menu.html.erb
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<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>
|
||||||
|
<% if can? :index, Gallery %>
|
||||||
|
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
|
||||||
|
<% end %>
|
||||||
|
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></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>
|
||||||
|
<% if can?(:seeintern, User) %>
|
||||||
|
<li>
|
||||||
|
<%= link_to 'Intern' , intern_home_index_path %>
|
||||||
|
</li><% end %>
|
||||||
|
</ul>
|
||||||
|
<ul class="nav nav-pills nav-stacked pull-right">
|
||||||
|
<li>
|
||||||
|
<!--<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" > <%= image_tag("/flaggen/png/"+I18n.locale.to_s+".png") + " " +I18n.t('sprache',:scope=>'home')%><b class="caret"></b></a>-->
|
||||||
|
<!-- Split button -->
|
||||||
|
<div class="btn-group navbar-btn">
|
||||||
|
<button type="button" class="btn btn-link dropdown-toggle" data-hover="dropdown" aria-expanded="false">
|
||||||
|
<%= image_tag("/flaggen/png/"+I18n.locale.to_s+".png") + " " +I18n.t('sprache',:scope=>'home')%>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-link dropdown-toggle" data-hover="dropdown" data-toggle="dropdown" >
|
||||||
|
<span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" role="menu">
|
||||||
|
<li><%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%> </li>
|
||||||
|
|
||||||
|
<li><%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%> </li>
|
||||||
|
|
||||||
|
</ul></div>
|
||||||
|
</li>
|
||||||
|
<%= render 'layouts/login' %>
|
||||||
|
</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>
|
||||||
|
|
||||||
158
app/views/themes/blue2/lvas/show.html.erb
Executable file
158
app/views/themes/blue2/lvas/show.html.erb
Executable file
@@ -0,0 +1,158 @@
|
|||||||
|
<%= content_for :header do %>
|
||||||
|
<title>Fetsite - <%= @lva.full_name %></title>
|
||||||
|
<% set_meta_tags :og => {
|
||||||
|
:url=>lva_path(:theme=>nil) }
|
||||||
|
%>
|
||||||
|
<%= display_meta_tags %>
|
||||||
|
<% end %>
|
||||||
|
<div itemscope itemtype="schema.org/Article" >
|
||||||
|
<div class="container-fluid">
|
||||||
|
<%= render 'studien/tabs'%>
|
||||||
|
<p id="notice"><%= notice %></p>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<%= render 'layouts/pretty_toolbar' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span8">
|
||||||
|
<h1 itemprop="name"><%= @lva.full_name %></h1>
|
||||||
|
<meta itemprop="url" content="<%= lva_path(@lva) %>" />
|
||||||
|
<ul class="linklist">
|
||||||
|
<li>
|
||||||
|
<%= link_to ffi1_icon("live2")+"ET-Forum", @lva.forumlink, class: :linkbox, itemprop: "discussionUrl" unless @lva.forumlink.nil? or @lva.forumlink.empty?%>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to "TISS", @lva.tisslink, class: :linkbox %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div itemprop="articleBody">
|
||||||
|
<h2><%= I18n.t('lva.pruefungsinfo')%></h2>
|
||||||
|
<div class="">
|
||||||
|
<%= @lva.pruefungsinformation.to_s.html_safe %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2><%= I18n.t('lva.lernaufwand')%></h2>
|
||||||
|
<div class="">
|
||||||
|
<%= @lva.lernaufwand %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2><%= I18n.t('lva.desc')%></h2>
|
||||||
|
<div class="">
|
||||||
|
<%= @lva.desc.to_s.html_safe %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="span4">
|
||||||
|
<div class="contentbox">
|
||||||
|
<ul>
|
||||||
|
<li><b><%= I18n.t('lva.lvanr')%>:</b> <%=@lva.lvanr %></li>
|
||||||
|
<li><b>ECTS:</b> <%=@lva.ects %></li>
|
||||||
|
<li><b><%= I18n.t('lva.stunden')%>:</b> <%=@lva.stunden %></li>
|
||||||
|
</ul>
|
||||||
|
<h2><%= I18n.t('lva.module')%></h2>
|
||||||
|
<ul>
|
||||||
|
<% @lva.modul.each do |modul| %>
|
||||||
|
<li><b><%= link_to modul.name , modul_path(modul)%></b>
|
||||||
|
<ul>
|
||||||
|
<% modul.modulgruppen.each do |g| %>
|
||||||
|
|
||||||
|
<li><%= link_to g.studium.title_context , studium_path(g.studium)%> (<%=link_to g.name, modulgruppe_path(g)%>)</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="contentbox">
|
||||||
|
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
|
||||||
|
<% @lva.lecturers.each do |lec| %>
|
||||||
|
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<%= new_question_for(@lva) %>
|
||||||
|
<% unless @questions.nil? %>
|
||||||
|
<% @questions.each do |q| %>
|
||||||
|
<%= render q if can? :show, q %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<h2><%= I18n.t("lva.bspe") %></h2>
|
||||||
|
<p>
|
||||||
|
<%= I18n.t("lva.ratebsp")%>
|
||||||
|
<%= link_to ffi1_icon("facebook1") + I18n.t('home.fblogin'), user_omniauth_authorize_path(:facebook) ,class: :linkbox %>
|
||||||
|
</p>
|
||||||
|
<%= link_to t("beispiel.zip") , beispiel_sammlung_lva_path(@lva), class: :linkbox %>
|
||||||
|
<% @beispiele.each do |b| %>
|
||||||
|
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||||
|
<%= render b%>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if @beispiele_badQ.count > 0 %>
|
||||||
|
<h3> Bad Quality or Outdated</h3>
|
||||||
|
<% @beispiele_badQ.each do |b| %>
|
||||||
|
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||||
|
<%= render b%>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% if @beispiele_deleted.count > 0 %>
|
||||||
|
<h3> Trash</h3>
|
||||||
|
<% @beispiele_deleted.each do |b| %>
|
||||||
|
|
||||||
|
<% cache("beispiel_" +I18n.locale.to_s+b.id.to_s+can?(:delete,b).to_s+"_"+can?(:edit,b).to_s + "_" + can?(:flag, b).to_s + "_" + can?(:like, b).to_s + "_" + b.updated_at.try(:utc).try(:to_s) + get_theme_help(current_user).to_s) do %>
|
||||||
|
<%= render b%>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
|
||||||
|
<% unless @lva.nlinks.empty? %>
|
||||||
|
<h2><%= I18n.t("rubrik.title") %></h2>
|
||||||
|
<% @lva.nlinks.each do |l| %>
|
||||||
|
<%= render l.neuigkeit %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% cache("lva_beispiel_form_bulk_"+@lva.id.to_s+I18n.locale.to_s+@lva.updated_at.to_i.to_s) do %>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<%= render 'beispiele/form_bulk' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% unless @crawlobjects.nil? %>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<% @crawlobjects.each do |co| %>
|
||||||
|
<%= render co %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
72
app/views/themes/blue2/neuigkeiten/_neuigkeit_view.html.erb
Normal file
72
app/views/themes/blue2/neuigkeiten/_neuigkeit_view.html.erb
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<% if neuigkeit_view.nil?
|
||||||
|
neuigkeit_view=@neuigkeit
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
<div id="neuigkeit_<%= neuigkeit_view.id %>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||||
|
<%= meta_itemprop("about", neuigkeit_view.text_first_words) %>
|
||||||
|
<%= meta_itemprop("sameAs", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
||||||
|
<%= meta_itemprop("url", neuigkeit_url(neuigkeit_view,:theme=>nil)) %>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<% cache("menu_neuigkeit"+ neuigkeit_view.id.to_s + can?(:edit,neuigkeit_view).to_s + can?(:find_link, neuigkeit_view).to_s + can?(:new, Survey::Question).to_s + can?(:publish, neuigkeit_view).to_s + can?(:unpublish, neuigkeit_view).to_s + neuigkeit_view.published?.to_s + neuigkeit_view.flag_important.to_s + neuigkeit_view.flag_infoscreen.to_s) do %>
|
||||||
|
<%= render partial: "menu" , object: neuigkeit_view%>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<%#= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||||
|
</div>
|
||||||
|
<div class="media">
|
||||||
|
<span itemprop="articleSection">
|
||||||
|
<%= ff_icon(neuigkeit_view.rubrik.icon) unless neuigkeit_view.rubrik.icon.nil? or neuigkeit_view.rubrik.icon.empty? %> <%= neuigkeit_view.rubrik.name %>
|
||||||
|
</span>
|
||||||
|
<span class="pull-right">
|
||||||
|
<span itemprop="author"><%= neuigkeit_view.author.email.to_s unless neuigkeit_view.try(:author).try(:email).to_s %>
|
||||||
|
<%= neuigkeit_view.author.text %></span>
|
||||||
|
<% unless neuigkeit_view.try(:datum).try(:to_date).nil? %>
|
||||||
|
<%= " "+ I18n.t("neuigkeit.am")+" " %><span itemprop="datePublished"><%= I18n.l(neuigkeit_view.try(:datum).try(:to_date)) %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% unless neuigkeit_view.published? %>
|
||||||
|
<div class="sticker sticker-red"> Not Published <%= link_to "Publish", publish_rubrik_neuigkeit_path(neuigkeit_view.rubrik,neuigkeit_view),remote:true, class: :btn if can? :publish, neuigkeit_view %></div>
|
||||||
|
<% end %>
|
||||||
|
<% unless neuigkeit_view.origurl.nil? || neuigkeit_view.origurl.empty? %>
|
||||||
|
<div class="alert"><%= link_to "Zitiert von "+ neuigkeit_view.origurl, neuigkeit_view.origurl %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="media">
|
||||||
|
<% unless neuigkeit_view.picture_robust.big_thumb.to_s.empty? %>
|
||||||
|
<div class="pull-left" href="#">
|
||||||
|
<p><br><%= link_to image_tag(neuigkeit_view.picture_robust.big_thumb),neuigkeit_view.picture_robust.try(:url) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="media-body">
|
||||||
|
<h1 itemprop="name">
|
||||||
|
<%= raw(neuigkeit_view.title) %> <%#= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(neuigkeit_view.rubrik, neuigkeit_view), remote: true if can? :edit, neuigkeit_view %>
|
||||||
|
</h1>
|
||||||
|
<div itemprop="articleBody">
|
||||||
|
<%= raw(neuigkeit_view.text) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= render_calentries_for(neuigkeit_view)%>
|
||||||
|
<%= new_calentry_div(neuigkeit_view) %>
|
||||||
|
<% unless neuigkeit_view.meeting.nil? %>
|
||||||
|
<%= render neuigkeit_view.meeting %>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%= render_attachments_list_for(neuigkeit_view) %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<% @questions.each do |q| %>
|
||||||
|
<%= render q if can? :show, q %>
|
||||||
|
<% end %>
|
||||||
77
app/views/themes/blue2/neuigkeiten/show.html.erb
Executable file
77
app/views/themes/blue2/neuigkeiten/show.html.erb
Executable file
@@ -0,0 +1,77 @@
|
|||||||
|
<%= content_for :header do %>
|
||||||
|
<title>Fetsite - <%= @neuigkeit.title %> (<%= @neuigkeit.rubrik.name %>)</title>
|
||||||
|
<% set_meta_tags :author => fetprofile_path(@neuigkeit.author.fetprofile) unless @neuigkeit.author.fetprofile.nil? %>
|
||||||
|
<% unless @neuigkeit.picture_robust.url.nil? %>
|
||||||
|
<%
|
||||||
|
picture_url=URI(root_url)
|
||||||
|
picture_url.path=@neuigkeit.picture_robust.url(:locale=>nil, :theme=>nil)
|
||||||
|
%>
|
||||||
|
<% end %>
|
||||||
|
<% set_meta_tags :og =>
|
||||||
|
{
|
||||||
|
:image => picture_url.to_s,
|
||||||
|
:title => @neuigkeit.title.to_s + " (" + @neuigkeit.rubrik.name.to_s + ")",
|
||||||
|
:type => "article",
|
||||||
|
:description =>@neuigkeit.text_first_words,
|
||||||
|
:url=>neuigkeit_url(:theme=>nil)
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<%= display_meta_tags %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= render 'rubriken/tabs' %>
|
||||||
|
|
||||||
|
<div id="fb-root"></div>
|
||||||
|
|
||||||
|
<script>(function(d, s, id) {
|
||||||
|
var js, fjs = d.getElementsByTagName(s)[0];
|
||||||
|
if (d.getElementById(id)) return;
|
||||||
|
js = d.createElement(s); js.id = id;
|
||||||
|
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=120379864660921&version=v2.0";
|
||||||
|
fjs.parentNode.insertBefore(js, fjs);
|
||||||
|
}(document, 'script', 'facebook-jssdk'));</script>
|
||||||
|
|
||||||
|
<div class="content-column content-wrap">
|
||||||
|
<%= link_to "Refresh", neuigkeit_path(@neuigkeit), remote: true %>
|
||||||
|
<p id="notice">
|
||||||
|
<%= notice %>
|
||||||
|
</p>
|
||||||
|
<%= render partial: "neuigkeit_view", object: @neuigkeit %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="fb-like" data-href"<%= rubrik_neuigkeit_url(@rubrik,@neuigkeit,{themes: nil, locale: nil})%>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
|
||||||
|
|
||||||
|
<%= render_comments_for(@neuigkeit) %>
|
||||||
|
|
||||||
|
<%# link_to fa_icon("link") + "Neue Verknüpfung" , "#", id: "findlink-open" if can? :find_link, @neuigkeit %>
|
||||||
|
|
||||||
|
<% cache(cache_array_key(@neuigkeit.nlinks, "NLinks")) do %>
|
||||||
|
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div id="findlink-body" class="ui-dialog" style="">
|
||||||
|
<% if can? :find_link, @neuigkeit %>
|
||||||
|
Nach Element suchen:
|
||||||
|
<%= semantic_form_for :find_link, :url=>find_link_rubrik_neuigkeit_path(@rubrik,@neuigkeit), :html=>{:id=>"search_form", :method=>'get'} , :remote=> true do |f| %>
|
||||||
|
<%= f.input :query, :input_html => { :name => 'query' },:label=>false %>
|
||||||
|
<% end %>
|
||||||
|
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
dialog = $( "#findlink-body" ).dialog({
|
||||||
|
autoOpen: false,
|
||||||
|
width: 350,
|
||||||
|
modal: true,
|
||||||
|
title: "Neue Verknüpfung hinzufügen",
|
||||||
|
buttons: {
|
||||||
|
"Fertig": function() {
|
||||||
|
dialog.dialog( "close" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#findlink-open").on("click",function(){dialog.dialog("open")})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -225,7 +225,6 @@ Devise.setup do |config|
|
|||||||
# up on your models and hooks.
|
# up on your models and hooks.
|
||||||
#config.omniauth :facebook, 'appid', 'secret'
|
#config.omniauth :facebook, 'appid', 'secret'
|
||||||
secrets = YAML.load_file("#{::Rails.root.to_s}/config/omniauth_secrets.yml")
|
secrets = YAML.load_file("#{::Rails.root.to_s}/config/omniauth_secrets.yml")
|
||||||
config.omniauth :developer,:title => "Developer" unless Rails.env.production?
|
|
||||||
config.omniauth :facebook, secrets["facebook"]["appid"], secrets["facebook"]["secret"]
|
config.omniauth :facebook, secrets["facebook"]["appid"], secrets["facebook"]["secret"]
|
||||||
config.omniauth :ldap, :title => "My LDAP",
|
config.omniauth :ldap, :title => "My LDAP",
|
||||||
:host => secrets["ldap"]["host"],
|
:host => secrets["ldap"]["host"],
|
||||||
@@ -237,8 +236,6 @@ Devise.setup do |config|
|
|||||||
:bind_dn =>secrets["ldap"]['bind'],
|
:bind_dn =>secrets["ldap"]['bind'],
|
||||||
:password => secrets["ldap"]['password']
|
:password => secrets["ldap"]['password']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ==> Warden configuration<<
|
# ==> Warden configuration<<
|
||||||
# If you want to use other strategies, that are not supported by Devise, or
|
# If you want to use other strategies, that are not supported by Devise, or
|
||||||
# change the failure app, you can configure them inside the config.warden block.
|
# change the failure app, you can configure them inside the config.warden block.
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ end
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
devise_for :users , :controllers=>{:omniauth_callbacks=> "users/omniauth_callbacks"}
|
devise_for :users , :controllers=>{:omniauth_callbacks=> "users/omniauth_callbacks"}
|
||||||
#match '/auth/:provider/callback', to: "session#new", via: [:get, :post]
|
|
||||||
|
|
||||||
|
|
||||||
scope '(:locale)', constraints: {:locale=>/en|de/i} do
|
scope '(:locale)', constraints: {:locale=>/en|de/i} do
|
||||||
@@ -81,6 +80,7 @@ end
|
|||||||
get "" , controller: :home, action: :index
|
get "" , controller: :home, action: :index
|
||||||
get "intern" , controller: :home, action: :intern
|
get "intern" , controller: :home, action: :intern
|
||||||
get "infoscreen" , controller: :home, action: :infoscreen
|
get "infoscreen" , controller: :home, action: :infoscreen
|
||||||
|
get "verleihkalender" , controller: :home, action: :verleihkalender
|
||||||
get "beispielsammlung", to: redirect('/studien')
|
get "beispielsammlung", to: redirect('/studien')
|
||||||
scope '(:ansicht)' do
|
scope '(:ansicht)' do
|
||||||
resources :studien, :only=>[:new,:edit,:update,:destroy,:show] do
|
resources :studien, :only=>[:new,:edit,:update,:destroy,:show] do
|
||||||
@@ -161,26 +161,8 @@ end
|
|||||||
resources :fragen, :only =>[:new, :edit, :update, :destroy, :create]
|
resources :fragen, :only =>[:new, :edit, :update, :destroy, :create]
|
||||||
|
|
||||||
|
|
||||||
resources :neuigkeiten, :only => [:show] , constraints: {id: /\d+/i} do
|
resources :neuigkeiten, :only => [:show] , constraints: {id: /\d+/i}
|
||||||
member do
|
|
||||||
get 'publish'
|
|
||||||
get 'unpublish'
|
|
||||||
get 'add_calentry'
|
|
||||||
get 'rm_calentry'
|
|
||||||
get 'create_link'
|
|
||||||
get 'delete_link'
|
|
||||||
get 'find_link'
|
|
||||||
get 'publish_to_facebook'
|
|
||||||
get 'mail_to_fet'
|
|
||||||
get 'mail_preview'
|
|
||||||
get 'flag'
|
|
||||||
end
|
|
||||||
collection do
|
|
||||||
get 'newsletter_preview'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
get "neuigkeiten", controller: :rubriken, action: :index, as: "neuigkeiten"
|
get "neuigkeiten", controller: :rubriken, action: :index, as: "neuigkeiten"
|
||||||
|
|
||||||
resources :rubriken do
|
resources :rubriken do
|
||||||
collection do
|
collection do
|
||||||
get 'verwalten' , :action => :alle_verwalten
|
get 'verwalten' , :action => :alle_verwalten
|
||||||
@@ -294,5 +276,3 @@ end
|
|||||||
end
|
end
|
||||||
root :to => 'home#index'
|
root :to => 'home#index'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,22 +2,18 @@ production:
|
|||||||
solr:
|
solr:
|
||||||
hostname: localhost
|
hostname: localhost
|
||||||
port: 8080
|
port: 8080
|
||||||
# log_level: WARNING
|
log_level: WARNING
|
||||||
# min_memory: 32M
|
path: /solr/#/default #production #ollection1 #production
|
||||||
# max_memory: 1G
|
|
||||||
# path: /solr-4.10.2/default #production #ollection1 #production
|
|
||||||
# solr_home: solr
|
# solr_home: solr
|
||||||
# read_timeout: 2
|
# read_timeout: 2
|
||||||
# open_timeout: 0.5
|
# open_timeout: 0.5
|
||||||
|
|
||||||
development:
|
development:
|
||||||
solr:
|
solr:
|
||||||
hostname: localhost
|
hostname: triton-amp.local
|
||||||
port: 8983
|
port: 8080
|
||||||
log_level: INFO
|
log_level: INFO
|
||||||
path: /solr/fetsite_test
|
path: /solr/mycore
|
||||||
# min_memory: 32M
|
|
||||||
# max_memory: 1G
|
|
||||||
# solr:
|
# solr:
|
||||||
# hostname: localhost
|
# hostname: localhost
|
||||||
# port: 8983
|
# port: 8983
|
||||||
|
|||||||
@@ -1,176 +0,0 @@
|
|||||||
#require 'rails_helper'
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
RSpec.describe NeuigkeitenController, :type => :controller do
|
|
||||||
|
|
||||||
let(:neuigkeit) {(FactoryGirl.create(:neuigkeit, :with_rubrik))}
|
|
||||||
let(:intern_neuigkeit) {(FactoryGirl.create(:neuigkeit,:with_intern_rubrik))}
|
|
||||||
|
|
||||||
let(:valid_session) {{}}
|
|
||||||
|
|
||||||
# setting up shared examples
|
|
||||||
let(:object_class) {Neuigkeit}
|
|
||||||
let(:object_variable) {:neuigkeit}
|
|
||||||
let(:assigned_object_variable){neuigkeit}
|
|
||||||
|
|
||||||
#let(:allow_fet_user) {allow(@controller).to receive(:current_user).and_return(fet_user)}
|
|
||||||
let(:object_url) {rubrik_neuigkeit_url(neuigkeit.rubrik,neuigkeit)}
|
|
||||||
|
|
||||||
|
|
||||||
describe "GET #show" do
|
|
||||||
let(:action) { get :show, {id: neuigkeit.id, rubrik_id: neuigkeit.rubrik.id}}
|
|
||||||
|
|
||||||
it_behaves_like "it is success"
|
|
||||||
it_behaves_like "it assigns object"
|
|
||||||
|
|
||||||
context "with internal news" do
|
|
||||||
let(:action) { get :show, {id: intern_neuigkeit.id, rubrik_id: intern_neuigkeit.rubrik.id}}
|
|
||||||
it_behaves_like "it is restricted"
|
|
||||||
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it_behaves_like "it is success"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
it "denys access to unpublished news" do
|
|
||||||
neuigkeit=FactoryGirl.create(:neuigkeit, :with_rubrik, :unpublished)
|
|
||||||
get :show, {id: neuigkeit.id}, valid_session
|
|
||||||
expect(response).to have_http_status(302)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
context "with rendered views" do
|
|
||||||
render_views
|
|
||||||
before do
|
|
||||||
neuigkeit.rubrik
|
|
||||||
intern_neuigkeit
|
|
||||||
end
|
|
||||||
|
|
||||||
it "shows the name" do
|
|
||||||
action
|
|
||||||
expect(response.body).to match neuigkeit.name
|
|
||||||
end
|
|
||||||
it "has only links to external rubrik" do
|
|
||||||
get :show, {id: neuigkeit.id}, valid_session
|
|
||||||
expect(response.body).to match neuigkeit.rubrik.name
|
|
||||||
expect(response.body).not_to match intern_neuigkeit.rubrik.name
|
|
||||||
end
|
|
||||||
|
|
||||||
context "and fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it "has all links to internal and external rubriken" do
|
|
||||||
action
|
|
||||||
expect(response.body).to match intern_neuigkeit.rubrik.name
|
|
||||||
expect(response.body).to match neuigkeit.rubrik.name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
it "shows datum in response" do
|
|
||||||
action
|
|
||||||
expect(response.body).to match I18n.l(neuigkeit.datum.to_date)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
describe "GET#edit" do
|
|
||||||
let(:action) { get :edit, {id: neuigkeit.id, rubrik_id: neuigkeit.rubrik.id}}
|
|
||||||
it_behaves_like "default edit action"
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "GET #new" do
|
|
||||||
let(:action) { get :new, {rubrik_id: neuigkeit.rubrik.id}}
|
|
||||||
it_behaves_like "default new action"
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "GET add_calentry" do
|
|
||||||
let(:action) { get :add_calentry, {id: neuigkeit.id, rubrik_id: neuigkeit.rubrik.id}}
|
|
||||||
|
|
||||||
it_behaves_like "it is restricted"
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it_behaves_like "it is success"
|
|
||||||
it "renders edit template" do
|
|
||||||
expect(action).to render_template(:edit)
|
|
||||||
end
|
|
||||||
|
|
||||||
it "adds calentry to neuigkeit" do
|
|
||||||
action
|
|
||||||
expect(assigns(:neuigkeit).calentries).not_to be_empty
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "GET unpublish" do
|
|
||||||
let(:action) {get :unpublish, {id: neuigkeit.id, rubrik_id: neuigkeit.rubrik.id}}
|
|
||||||
it_behaves_like "it is restricted"
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it "redirects to neuigkeit" do
|
|
||||||
expect(action).to redirect_to(rubrik_neuigkeit_url(neuigkeit.rubrik,neuigkeit))
|
|
||||||
end
|
|
||||||
it "assignes unpublished neuigkeit" do
|
|
||||||
action
|
|
||||||
expect(assigns(:neuigkeit)).not_to be_published
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "GET publish" do
|
|
||||||
let(:action) {get :publish, {id: neuigkeit.id, rubrik_id: neuigkeit.rubrik.id}}
|
|
||||||
it_behaves_like "it is restricted"
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it "redirects to neuigkeit" do
|
|
||||||
expect(action).to redirect_to(rubrik_neuigkeit_url(neuigkeit.rubrik,neuigkeit))
|
|
||||||
end
|
|
||||||
it "assignes published neuigkeit" do
|
|
||||||
action
|
|
||||||
expect(assigns(:neuigkeit)).to be_published
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
describe "POST create" do
|
|
||||||
let(:action) {post :create, {rubrik_id: neuigkeit.rubrik.id, neuigkeit: FactoryGirl.attributes_for(:neuigkeit)}}
|
|
||||||
|
|
||||||
it_behaves_like "it is restricted"
|
|
||||||
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it_behaves_like "it is success"
|
|
||||||
it "adds 1 Neuigkeit" do
|
|
||||||
expect{action}.to change { Neuigkeit.count}.by(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "PUT update" do
|
|
||||||
let(:action) {put :update, {id: neuigkeit.id, rubrik_id: neuigkeit.rubrik.id}}
|
|
||||||
it_behaves_like "it is a restricted action"
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it_behaves_like "it assigns persisted object"
|
|
||||||
it "redirects to neuigkeit" do
|
|
||||||
expect(action).to redirect_to rubrik_neuigkeit_url(neuigkeit.rubrik, neuigkeit)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pending "destroy"
|
|
||||||
pending "load_toolbar_elements"
|
|
||||||
|
|
||||||
|
|
||||||
pending "publish_to_facebook"
|
|
||||||
pending "mail_to_fet"
|
|
||||||
pending "mail_preview"
|
|
||||||
pending "newsletter_preview"
|
|
||||||
pending "find_link"
|
|
||||||
pending "create_link"
|
|
||||||
pending "delete_link"
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
shared_examples "public show action" do
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples "it is a restricted action" do
|
|
||||||
it_behaves_like "it is restricted"
|
|
||||||
it_behaves_like "it assigns object"
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it "redirects to object url" do
|
|
||||||
expect(action).to redirect_to(object_url)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples "default edit action" do
|
|
||||||
it_behaves_like "it is restricted"
|
|
||||||
it_behaves_like "it assigns object"
|
|
||||||
it_behaves_like "it assigns persisted object"
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it_behaves_like "it is success"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
shared_examples "default new action" do
|
|
||||||
include_examples "it assigns new object"
|
|
||||||
include_examples "it is restricted"
|
|
||||||
context "with fet user" do
|
|
||||||
with_fet_user
|
|
||||||
it_behaves_like "it is success"
|
|
||||||
it_behaves_like "it assigns new object"
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -4,6 +4,5 @@ FactoryGirl.define do
|
|||||||
factory :calendar do
|
factory :calendar do
|
||||||
name "MyString"
|
name "MyString"
|
||||||
public false
|
public false
|
||||||
association :rubrik, factory: :rubrik
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,12 +2,9 @@
|
|||||||
|
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :calentry do
|
factory :calentry do
|
||||||
start 1.hours.ago
|
start "2013-08-05 21:17:10"
|
||||||
ende "2013-08-05 21:17:10"
|
ende "2013-08-05 21:17:10"
|
||||||
summary "MyString"
|
summary "MyString"
|
||||||
typ 1
|
typ 1
|
||||||
|
|
||||||
association :calendar, factory: :calendar
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -5,19 +5,6 @@ FactoryGirl.define do
|
|||||||
parent nil
|
parent nil
|
||||||
intern false
|
intern false
|
||||||
meetingtyp nil
|
meetingtyp nil
|
||||||
# association :calentry, factory: :calentry
|
|
||||||
|
|
||||||
after(:build) do |c|
|
|
||||||
c.calentry=FactoryGirl.build(:calentry, typ: 2)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
trait :with_meetingtyp do
|
|
||||||
association :meetingtyp, factory: :meetingtyp
|
|
||||||
end
|
|
||||||
# trait :without_calentry do
|
|
||||||
# calentry nil
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ FactoryGirl.define do
|
|||||||
desc "MyText"
|
desc "MyText"
|
||||||
agendaintern false
|
agendaintern false
|
||||||
protocolintern false
|
protocolintern false
|
||||||
association :rubrik, factory: :rubrik
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,29 +1,7 @@
|
|||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
sequence (:title) {|n| "Wichtige Neuigkeit #{n}"}
|
|
||||||
sequence (:text) {|n| "Wichtiger text #{n}"}
|
|
||||||
factory :neuigkeit do
|
factory :neuigkeit do
|
||||||
title
|
title "WIChtige Neuigkeit"
|
||||||
text
|
text "<p> Das ist eine wichtige Information </p>"
|
||||||
datum 1.days.ago
|
datum 1.days.ago
|
||||||
association :author, factory: :user
|
|
||||||
|
|
||||||
trait :with_rubrik do
|
|
||||||
association :rubrik, factory: :rubrik, public: true
|
|
||||||
end
|
|
||||||
trait :with_intern_rubrik do
|
|
||||||
association :rubrik, factory: :rubrik, public: false, name: "InterneRubrik"
|
|
||||||
end
|
|
||||||
trait :with_meeting do
|
|
||||||
after(:build) do |n|
|
|
||||||
n.meeting=FactoryGirl.build(:meeting, :with_meetingtyp)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
trait :unpublished do
|
|
||||||
datum nil
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,6 +2,5 @@ FactoryGirl.define do
|
|||||||
factory :rubrik do
|
factory :rubrik do
|
||||||
name "Allgemeine"
|
name "Allgemeine"
|
||||||
desc "Allgemeine Test News"
|
desc "Allgemeine Test News"
|
||||||
public true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
FactoryGirl.define do
|
|
||||||
factory :semester do
|
|
||||||
nummer 2
|
|
||||||
|
|
||||||
factory :zero_semester do
|
|
||||||
|
|
||||||
nummer 0
|
|
||||||
end
|
|
||||||
factory :first_semester do
|
|
||||||
|
|
||||||
nummer 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -10,7 +10,7 @@ FactoryGirl.define do
|
|||||||
|
|
||||||
factory :other_studium do
|
factory :other_studium do
|
||||||
name "Telecommunication"
|
name "Telecommunication"
|
||||||
desc "frueher Telekommunikation"
|
desc "frueher Telekommungikation"
|
||||||
zahl "066507"
|
zahl "066507"
|
||||||
typ "Master"
|
typ "Master"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,11 @@
|
|||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
sequence (:email) {|n| "testuser#{n}@fet.at"}
|
|
||||||
factory :user do
|
factory :user do
|
||||||
email
|
email "testuser@test.at"
|
||||||
password "password"
|
password "password"
|
||||||
password_confirmation "password"
|
password_confirmation "password"
|
||||||
factory :other_user do
|
factory :other_user do
|
||||||
email "othertest@test.at"
|
email "othertest@test.at"
|
||||||
end
|
end
|
||||||
trait :fetuser do
|
|
||||||
after(:create) do |user|
|
|
||||||
user.add_role("fetuser")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,4 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe Calendar do
|
describe Calendar do
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
let(:rubrik) {FactoryGirl.create(:rubrik)}
|
|
||||||
let(:calendar) {FactoryGirl.build(:calendar, rubrik_id: rubrik.id)}
|
|
||||||
it "should be valid" do
|
|
||||||
expect(calendar).to be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should be created" do
|
|
||||||
expect(calendar.save).to be true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,35 +1,27 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Gremium do
|
describe Gremium do
|
||||||
let(:gremium) {FactoryGirl.build(:gremium)}
|
it "can be created" do
|
||||||
let(:object_variable){gremium}
|
g=FactoryGirl.build(:gremium)
|
||||||
it_behaves_like "a valid object"
|
expect(g.save).to be true
|
||||||
|
end
|
||||||
|
it "is valid with all attributes" do
|
||||||
|
g = FactoryGirl.build(:gremium)
|
||||||
|
g.should be_valid
|
||||||
|
end
|
||||||
[:name,:typ].each do |attr|
|
[:name,:typ].each do |attr|
|
||||||
it "is not valid without #{attr}" do
|
it "should not be valid without #{attr}" do
|
||||||
g = FactoryGirl.build(:gremium,attr.to_sym => nil)
|
g = FactoryGirl.build(:gremium)
|
||||||
|
g.send("#{attr}=".to_sym,nil)
|
||||||
expect(g).not_to be_valid
|
expect(g).not_to be_valid
|
||||||
expect(g.errors[attr]).to have_at_least(1).items
|
expect(g.errors[attr]).to have_at_least(1).items
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
pending "only accepts valid types"
|
|
||||||
pending "only accepts valid geschlecht"
|
|
||||||
|
|
||||||
it "is not valid with wrong typ" do
|
|
||||||
((-5..30).to_a-Gremium::TYPEN.keys()).each do |i|
|
|
||||||
g = FactoryGirl.build(:gremium, typ: i)
|
|
||||||
expect(g).not_to be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
it "is in tabs if typ is 1" do
|
it "is in tabs if typ is 1 or 3" do
|
||||||
g = FactoryGirl.create(:gremium, typ: 1)
|
g = FactoryGirl.create(:gremium, typ: 1)
|
||||||
expect(Gremium.tabs).to eq([g])
|
expect(Gremium.tabs).to eq([g])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
it "is not in tabs if typ is not 1 or 3" do
|
it "is not in tabs if typ is not 1 or 3" do
|
||||||
g = FactoryGirl.create(:gremium, typ: 2)
|
g = FactoryGirl.create(:gremium, typ: 2)
|
||||||
expect(Gremium.tabs).to eq([])
|
expect(Gremium.tabs).to eq([])
|
||||||
|
|||||||
@@ -3,53 +3,9 @@ require 'spec_helper'
|
|||||||
describe Lva, :type=>:model do
|
describe Lva, :type=>:model do
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
let_studium_lva
|
let_studium_lva
|
||||||
|
before(:each) do
|
||||||
it "should be valid" do
|
@l = FactoryGirl.build(:lva)
|
||||||
expect(lva).to be_valid
|
|
||||||
end
|
end
|
||||||
it "should respond to semesters" do
|
|
||||||
expect(lva.respond_to?(:semester)).to be true
|
|
||||||
end
|
|
||||||
it "should be give empty string for typ_n if typ is andere" do
|
|
||||||
lva.typ="andere"
|
|
||||||
expect(lva.typ_n).to eq("")
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should have title as an alias for name" do
|
|
||||||
lva.name="sdfWER"
|
|
||||||
expect(lva.title).to eq("sdfWER")
|
|
||||||
end
|
|
||||||
it "should have a full name containing typ and name" do
|
|
||||||
lva.typ="VO"
|
|
||||||
expect(lva.full_name).to match "VO"
|
|
||||||
expect(lva.full_name).to match lva.name
|
|
||||||
end
|
|
||||||
it "should have a semester after fixing" do
|
|
||||||
|
|
||||||
expect(lva.semester).to be_empty
|
|
||||||
|
|
||||||
studium.semester << zerosemester
|
|
||||||
studium.save
|
|
||||||
expect(studium.semester).not_to be_empty
|
|
||||||
lva.add_semesters
|
|
||||||
|
|
||||||
expect(lva.semester).not_to be_empty
|
|
||||||
end
|
|
||||||
it "can create a valid tiss link" do
|
|
||||||
lva.lvanr="101.679"
|
|
||||||
tl=lva.tisslink
|
|
||||||
expect(tl).to match "101679"
|
|
||||||
expect(tl).to match "tiss.tuwien.ac.at"
|
|
||||||
end
|
|
||||||
it "should be able to load tissdata" do
|
|
||||||
lva.lvanr="101.679"
|
|
||||||
n=lva.name
|
|
||||||
expect(lva.name).to eq(n)
|
|
||||||
lva.load_tissdata
|
|
||||||
expect(lva.name).not_to eq(n)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "if bare" do
|
describe "if bare" do
|
||||||
let(:lva) {FactoryGirl.build(:lva)}
|
let(:lva) {FactoryGirl.build(:lva)}
|
||||||
it "should be created" do
|
it "should be created" do
|
||||||
@@ -63,9 +19,9 @@ describe Lva, :type=>:model do
|
|||||||
expect(l.errors[:modul].size).to be(1)
|
expect(l.errors[:modul].size).to be(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
it "should respond to semesters" do
|
||||||
pending "should not be valid if it doesn't have a Semester for a studium"
|
expect(lva.respond_to?(:semester)).to be true
|
||||||
|
end
|
||||||
pending "should not be valid without modul"
|
pending "should not be valid without modul"
|
||||||
pending "should have beispiele"
|
pending "should have beispiele"
|
||||||
pending "should be flagable"
|
pending "should be flagable"
|
||||||
|
|||||||
@@ -1,159 +1,5 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
RSpec.describe Meeting, :type => :model do
|
RSpec.describe Meeting, :type => :model do
|
||||||
let(:user){FactoryGirl.create(:user)}
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
let(:rubrik) {FactoryGirl.create(:rubrik)}
|
|
||||||
let(:calendar){FactoryGirl.create(:calendar, rubrik_id: rubrik.id)}
|
|
||||||
let(:calentry){FactoryGirl.build(:calentry, calendar_id: calendar.id, typ: 2)}
|
|
||||||
let(:meetingtyp){FactoryGirl.create(:meetingtyp, rubrik_id: rubrik.id)}
|
|
||||||
let(:meeting){FactoryGirl.build(:meeting, meetingtyp_id: meetingtyp.id)}
|
|
||||||
let(:object_variable) {meeting}
|
|
||||||
|
|
||||||
it_behaves_like "a valid object"
|
|
||||||
|
|
||||||
it "should be created" do
|
|
||||||
meeting.calentry=calentry
|
|
||||||
expect(meeting).to be_valid
|
|
||||||
expect(meeting.save).to be true
|
|
||||||
end
|
end
|
||||||
it "should have a calendar" do
|
|
||||||
meeting.calentry=calentry
|
|
||||||
expect(meeting.calendar).not_to be_nil
|
|
||||||
end
|
|
||||||
it "should be able to create a calentry" do
|
|
||||||
meeting.create_calentry
|
|
||||||
meeting.calentry.start=1.hour.ago
|
|
||||||
meeting.calentry.dauer=7
|
|
||||||
expect(meeting).to be_valid
|
|
||||||
end
|
|
||||||
context "without calentry" do
|
|
||||||
# let(:meeting){FactoryGirl.build(:meeting, :without_calentry, meetingtyp_id: meetingtyp.id)}
|
|
||||||
|
|
||||||
it "should be creating a calentry typ 2" do
|
|
||||||
meeting.create_calentry
|
|
||||||
expect(meeting.calentry.typ).to be 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
it "should be having an alias title for text" do
|
|
||||||
expect(meeting.title).to eq(meeting.text)
|
|
||||||
end
|
|
||||||
it "should have a text that includes the name" do
|
|
||||||
expect(meeting.title).to match meeting.name
|
|
||||||
end
|
|
||||||
it " creates a neuigkeit that is valid" do
|
|
||||||
expect(meeting.neuigkeit).to be_nil
|
|
||||||
meeting.create_announcement(user)
|
|
||||||
expect(meeting.neuigkeit.class).to eq(Neuigkeit)
|
|
||||||
expect(meeting.neuigkeit).to be_valid
|
|
||||||
end
|
|
||||||
it "fixes calentry before validation" do
|
|
||||||
calentry.calendar=nil
|
|
||||||
meeting.calentry=calentry
|
|
||||||
meeting.valid?
|
|
||||||
expect(meeting.calentry.calendar).to be meeting.meetingtyp.rubrik.calendar
|
|
||||||
end
|
|
||||||
it "updates the announcement if there is one" do
|
|
||||||
meeting.calentry=calentry
|
|
||||||
|
|
||||||
expect(meeting.neuigkeit).to be_nil
|
|
||||||
meeting.create_announcement(user)
|
|
||||||
meeting.name="asdflkjhasdflkj"
|
|
||||||
meeting.save
|
|
||||||
meeting.update_announcement
|
|
||||||
expect(meeting.neuigkeit.title).to match meeting.name
|
|
||||||
end
|
|
||||||
it "doesn't create an announcement by changing the name" do
|
|
||||||
meeting.calentry=calentry
|
|
||||||
expect(meeting.neuigkeit).to be_nil
|
|
||||||
meeting.name="asdflkjhasdflkj"
|
|
||||||
meeting.save
|
|
||||||
expect(meeting.neuigkeit).to be_nil
|
|
||||||
end
|
|
||||||
it "can create a protocol" do
|
|
||||||
expect(meeting.protocol).to be_nil
|
|
||||||
meeting.create_protocol
|
|
||||||
expect(meeting.protocol).not_to be_nil
|
|
||||||
end
|
|
||||||
it "creates a protocol only once" do
|
|
||||||
meeting.create_protocol
|
|
||||||
p=meeting.protocol
|
|
||||||
meeting.protocol.text="TestTextTestTextForProtocol"
|
|
||||||
meeting.create_protocol
|
|
||||||
expect(meeting.protocol).to be p
|
|
||||||
expect(meeting.protocol.text).to match "TestTextTestTextForProtocol"
|
|
||||||
end
|
|
||||||
it "can create a calendar entry" do
|
|
||||||
expect(meeting.calentry).to be_nil
|
|
||||||
meeting.create_calentry
|
|
||||||
expect(meeting.calentry).not_to be_nil
|
|
||||||
|
|
||||||
end
|
|
||||||
it "can create an agenda" do
|
|
||||||
meeting.calentry=calentry
|
|
||||||
|
|
||||||
meeting.create_agenda
|
|
||||||
a=meeting.agenda
|
|
||||||
meeting.agenda.text="TestTextTestTextForProtocol"
|
|
||||||
meeting.create_agenda
|
|
||||||
expect(meeting.agenda).to be a
|
|
||||||
expect(meeting.agenda.text).to match "TestTextTestTextForProtocol"
|
|
||||||
end
|
|
||||||
it "can be created with date and typ" do
|
|
||||||
meeting2=Meeting.new_with_date_and_typ(nil, Date.today, meetingtyp)
|
|
||||||
expect(meeting2.calentry).not_to be_nil
|
|
||||||
expect(meeting2.meetingtyp).to be meetingtyp
|
|
||||||
end
|
|
||||||
it "gets empty text for nil protocol" do
|
|
||||||
expect(meeting.protocol_text).to eq("")
|
|
||||||
end
|
|
||||||
it "gets empty text for nil agenda" do
|
|
||||||
expect(meeting.agenda_text).to eq("")
|
|
||||||
end
|
|
||||||
|
|
||||||
it "can safly access protocol text" do
|
|
||||||
meeting.create_protocol
|
|
||||||
meeting.protocol.text="TestTextTest TextForProtocol"
|
|
||||||
expect(meeting.protocol_text).to eq("TestTextTest TextForProtocol")
|
|
||||||
end
|
|
||||||
it "can safly access agenda text" do
|
|
||||||
meeting.create_agenda
|
|
||||||
meeting.agenda.text="TestTextTest TextForProtocol"
|
|
||||||
expect(meeting.agenda_text).to eq("TestTextTest TextForProtocol")
|
|
||||||
end
|
|
||||||
it "is public by default" do
|
|
||||||
expect(meeting).to be_public
|
|
||||||
end
|
|
||||||
it "is not public if intern" do
|
|
||||||
meeting.intern=true
|
|
||||||
expect(meeting).not_to be_public
|
|
||||||
end
|
|
||||||
it "has a divid" do
|
|
||||||
meeting.calentry=calentry
|
|
||||||
meeting.save
|
|
||||||
expect(meeting.divid).to match "meeting"
|
|
||||||
expect(meeting.divid).to match meeting.id.to_s
|
|
||||||
end
|
|
||||||
it "can find start and end of a meeting by 'Beginn' und 'Ende'" do
|
|
||||||
meeting.calentry=calentry
|
|
||||||
calentry.start=2.hours.ago
|
|
||||||
meeting.create_protocol
|
|
||||||
meeting.protocol.text="Beginn: " + 1.hours.ago.to_s
|
|
||||||
meeting.update_time_from_protocol
|
|
||||||
expect(calentry.start).to be_within(1.minute).of 1.hours.ago
|
|
||||||
|
|
||||||
end
|
|
||||||
it "has a text even without meetingtyp" do
|
|
||||||
meeting.meetingtyp=nil
|
|
||||||
meeting.parent=nil
|
|
||||||
meeting.name="sdf"
|
|
||||||
expect(meeting.text).to match("sdf")
|
|
||||||
end
|
|
||||||
it "has an empty text without meetingtyp, parent, calentry or name" do
|
|
||||||
meeting.meetingtyp=nil
|
|
||||||
meeting.parent=nil
|
|
||||||
meeting.calentry=nil
|
|
||||||
meeting.name=""
|
|
||||||
expect(meeting.text).to eq("")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,27 +2,4 @@ require 'spec_helper'
|
|||||||
|
|
||||||
RSpec.describe Meetingtyp, :type => :model do
|
RSpec.describe Meetingtyp, :type => :model do
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
let(:rubrik) {FactoryGirl.create(:rubrik)}
|
|
||||||
let(:meetingtyp){FactoryGirl.build(:meetingtyp, rubrik_id: rubrik.id)}
|
|
||||||
it "should be created" do
|
|
||||||
expect(meetingtyp).to be_valid
|
|
||||||
expect(meetingtyp.save).to be true
|
|
||||||
end
|
|
||||||
it "should not be valid without rubrik" do
|
|
||||||
meetingtyp.rubrik=nil
|
|
||||||
expect(meetingtyp.rubrik).to be_nil
|
|
||||||
expect(meetingtyp).not_to be_valid
|
|
||||||
expect(meetingtyp.save).to be_falsey
|
|
||||||
end
|
|
||||||
it "should not be valid without a name" do
|
|
||||||
meetingtyp.name=nil
|
|
||||||
expect(meetingtyp).not_to be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should return name for text" do
|
|
||||||
expect(meetingtyp.text).to be meetingtyp.name
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,69 +1,38 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Neuigkeit do
|
describe Neuigkeit do
|
||||||
|
let(:rubrik) {FactoryGirl.create(:rubrik)}
|
||||||
let(:neuigkeit) {(FactoryGirl.build(:neuigkeit, :with_rubrik))}
|
let(:user) {FactoryGirl.create(:user)}
|
||||||
let(:intern_neuigkeit) {FactoryGirl.build(:neuigkeit, :with_intern_rubrik)}
|
let(:neuigkeit) {(FactoryGirl.build(:neuigkeit, rubrik_id: rubrik.id, author_id: user.id))}
|
||||||
let(:unpublished_neuigkeit){FactoryGirl.build(:neuigkeit, :unpublished,:with_rubrik)}
|
|
||||||
let(:attachment) {FactoryGirl.build_stubbed(:attachment)}
|
let(:attachment) {FactoryGirl.build_stubbed(:attachment)}
|
||||||
|
|
||||||
let(:calentry) {
|
[:title,:text, :rubrik, :author].each do |attr|
|
||||||
FactoryGirl.build(:calentry, start: 1.hour.ago, ende: 5.minutes.ago)
|
|
||||||
}
|
|
||||||
|
|
||||||
let(:object_variable) {neuigkeit}
|
|
||||||
|
|
||||||
it_behaves_like "a valid object"
|
|
||||||
|
|
||||||
it "is published" do expect(neuigkeit).to be_published end
|
|
||||||
it "is public" do expect(neuigkeit).to be_public end
|
|
||||||
it "has no meeting" do expect(neuigkeit).not_to be_is_annoncement end
|
|
||||||
|
|
||||||
# it "failes" do expect(true).to be_falsey end
|
|
||||||
|
|
||||||
it "is published if datum is in the past" do
|
|
||||||
neuigkeit.datum=5.hours.ago
|
|
||||||
expect(neuigkeit).to be_published
|
|
||||||
end
|
|
||||||
it "is unpublished if datum is in the future" do
|
|
||||||
neuigkeit.datum=5.hours.from_now
|
|
||||||
expect(neuigkeit).not_to be_published
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
[ :rubrik, :author].each do |attr| # :title,:text to be discussed
|
|
||||||
it "should not be valid without #{attr}" do
|
it "should not be valid without #{attr}" do
|
||||||
neuigkeit.send("#{attr}=".to_sym,nil)
|
neuigkeit.send("#{attr}=".to_sym,nil)
|
||||||
expect(neuigkeit).not_to be_valid
|
expect(neuigkeit).not_to be_valid
|
||||||
expect(neuigkeit.errors[attr]).to have_at_least(1).items
|
expect(neuigkeit.errors[attr]).to have_at_least(1).items
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
it "should be created" do
|
||||||
|
expect(neuigkeit).to be_valid
|
||||||
|
expect(neuigkeit.save).to be true
|
||||||
|
end
|
||||||
|
|
||||||
context "with meeting" do
|
it "should be valid" do
|
||||||
let(:neuigkeit) {(FactoryGirl.build(:neuigkeit, :with_rubrik, :with_meeting))}
|
fp = FactoryGirl.build(:neuigkeit, rubrik_id: rubrik.id, author_id: user.id)
|
||||||
let(:object_variable) {neuigkeit}
|
expect(fp).to be_valid
|
||||||
it_behaves_like "a valid object"
|
|
||||||
it "has meeting" do expect(neuigkeit.meeting).to be_truthy end
|
|
||||||
it "is annoncement" do expect(neuigkeit).to be_is_annoncement end
|
|
||||||
end
|
end
|
||||||
it "responds to attachments" do
|
it "responds to attachments" do
|
||||||
expect(neuigkeit.respond_to?(:attachments)).to be true
|
expect(neuigkeit.respond_to?(:attachments)).to be true
|
||||||
end
|
end
|
||||||
|
it "uses titlepic attachments as picture" do
|
||||||
|
|
||||||
|
|
||||||
pending "uses titlepic attachments as picture" do # this test seems broken
|
|
||||||
expect(neuigkeit.respond_to?(:picture_robust)).to be true
|
expect(neuigkeit.respond_to?(:picture_robust)).to be true
|
||||||
attachment.flag_titlepic = true
|
attachment.flag_titlepic = true
|
||||||
expect { neuigkeit.attachments << attachment }.to change {neuigkeit.picture_robust}
|
expect { neuigkeit.attachments << attachment }.to change {neuigkeit.picture_robust}
|
||||||
end
|
end
|
||||||
it "is an event if it has a calentry" do
|
it "is an event if it has a calentry" do
|
||||||
expect(neuigkeit).not_to be_is_event
|
expect(neuigkeit.event?).to be false
|
||||||
neuigkeit.calentries << calentry
|
expect{neuigkeit.calentries << calentry}.to change(neuigkeit, :event?)
|
||||||
expect(neuigkeit).to be_is_event
|
|
||||||
|
|
||||||
end
|
|
||||||
it "" do
|
|
||||||
end
|
end
|
||||||
|
|
||||||
pending "has questions"
|
pending "has questions"
|
||||||
|
|||||||
@@ -2,11 +2,5 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe Rubrik do
|
describe Rubrik do
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
let(:rubrik){FactoryGirl.create(:rubrik)}
|
|
||||||
it "should be valid" do
|
|
||||||
expect(rubrik).to be_valid
|
|
||||||
end
|
|
||||||
it "should be created" do
|
|
||||||
expect(rubrik.save).to be true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
shared_examples "a valid object" do
|
|
||||||
it "is valid" do
|
|
||||||
expect(object_variable).to be_valid
|
|
||||||
end
|
|
||||||
it "can be saved" do
|
|
||||||
expect(object_variable.save).to be_truthy
|
|
||||||
end
|
|
||||||
# it "failes" do
|
|
||||||
# expect(true).to be_falsey
|
|
||||||
# end
|
|
||||||
end
|
|
||||||
@@ -2,18 +2,12 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe Studium do
|
describe Studium do
|
||||||
# test if it is invalid if certain attributes are missing
|
# test if it is invalid if certain attributes are missing
|
||||||
let(:studium) { FactoryGirl.build(:studium)}
|
|
||||||
let(:object_variable) {studium}
|
|
||||||
|
|
||||||
[:name, :zahl].each do |attr|
|
[:name, :zahl].each do |attr|
|
||||||
it "should not be valid without #{attr}" do
|
it "should not be valid without #{attr}" do
|
||||||
s = FactoryGirl.build(:studium, attr=>nil)
|
s = FactoryGirl.build(:studium, attr=>nil)
|
||||||
expect(s).not_to be_valid
|
s.should_not be_valid
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like "a valid object"
|
|
||||||
|
|
||||||
it "should create studium with valid data" do
|
it "should create studium with valid data" do
|
||||||
s=FactoryGirl.build(:studium)
|
s=FactoryGirl.build(:studium)
|
||||||
lambda {
|
lambda {
|
||||||
@@ -21,26 +15,16 @@ describe Studium do
|
|||||||
end
|
end
|
||||||
it "should not accept double entrys" do
|
it "should not accept double entrys" do
|
||||||
FactoryGirl.create(:studium)
|
FactoryGirl.create(:studium)
|
||||||
expect(studium).not_to be_valid
|
Sunspot.commit
|
||||||
|
s=FactoryGirl.build(:studium)
|
||||||
|
s.should_not be_valid
|
||||||
expect(studium).to have_at_least(1).error_on(:name)
|
s.should have_at_least(1).error_on(:name)
|
||||||
expect(studium).to have_at_least(1).error_on(:zahl)
|
s.should have_at_least(1).error_on(:zahl)
|
||||||
end
|
end
|
||||||
it "expect zahl to be 000.000" do
|
it "should expect zahl to be 000.000" do
|
||||||
s=FactoryGirl.build(:studium, :zahl=>"000.000")
|
s=FactoryGirl.build(:studium, :zahl=>"000.000")
|
||||||
#Sunspot.commit
|
Sunspot.commit
|
||||||
s.should_not be_valid
|
s.should_not be_valid
|
||||||
expect(s.errors.size).to be > 0
|
expect(s.errors.size).to be > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
it "is not valid with a short zahl" do
|
|
||||||
s=FactoryGirl.build(:studium, :zahl=>"123")
|
|
||||||
expect(s).not_to be_valid
|
|
||||||
end
|
|
||||||
|
|
||||||
it "has a alias title for name" do
|
|
||||||
expect(studium.title).to eq(studium.name)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||||
require 'simplecov'
|
|
||||||
SimpleCov.start
|
|
||||||
ENV["RAILS_ENV"] ||= 'test'
|
ENV["RAILS_ENV"] ||= 'test'
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
|
|
||||||
@@ -16,8 +14,6 @@ require 'devise'
|
|||||||
# in spec/support/ and its subdirectories.
|
# in spec/support/ and its subdirectories.
|
||||||
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
||||||
Dir[Rails.root.join("spec/models/shared_examples/**/*.rb")].each {|f| require f}
|
Dir[Rails.root.join("spec/models/shared_examples/**/*.rb")].each {|f| require f}
|
||||||
Dir[Rails.root.join("spec/models/shared_examples/*.rb")].each {|f| require f}
|
|
||||||
#require 'models/shared_examples/basic.rb'
|
|
||||||
Dir[Rails.root.join("spec/controllers/shared_examples/**/*.rb")].each {|f| require f}
|
Dir[Rails.root.join("spec/controllers/shared_examples/**/*.rb")].each {|f| require f}
|
||||||
|
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
|
|||||||
@@ -1,31 +1,9 @@
|
|||||||
module ControllerMacros
|
module ControllerMacros
|
||||||
# include Devise::TestHelpers, :type=>:controller
|
# include Devise::TestHelpers, :type=>:controller
|
||||||
def with_fet_user
|
|
||||||
|
|
||||||
let(:fet_user) {FactoryGirl.create(:other_user, :fetuser)}
|
|
||||||
|
|
||||||
before(:each) do
|
|
||||||
allow(@controller).to receive(:current_user).and_return(fet_user)
|
|
||||||
allow(@controller).to receive(:current_ability).and_return(Ability.new(fet_user))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
def with_fet_admin
|
|
||||||
|
|
||||||
let(:fet_user)do
|
|
||||||
fet_user=FactoryGirl.create(:other_user)
|
|
||||||
fet_user.add_role("fetadmin")
|
|
||||||
fet_user
|
|
||||||
end
|
|
||||||
before(:each) do
|
|
||||||
allow(@controller).to receive(:current_user).and_return(fet_user)
|
|
||||||
allow(@controller).to receive(:current_ability).and_return(Ability.new(fet_user))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def login_fet_user
|
def login_fet_user
|
||||||
before(:each) do
|
before(:each) do
|
||||||
@request.env["devise.mapping"] = Devise.mappings[:user]
|
@request.env["devise.mapping"] = Devise.mappings[:user]
|
||||||
user = FactoryGirl.build(:other_user)
|
user = FactoryGirl.build(:user)
|
||||||
user = User.find_by_email(user.email) || user
|
user = User.find_by_email(user.email) || user
|
||||||
user.save
|
user.save
|
||||||
user.add_role(:fetuser)
|
user.add_role(:fetuser)
|
||||||
@@ -43,7 +21,6 @@ module ControllerMacros
|
|||||||
sign_in user
|
sign_in user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def logout_user
|
def logout_user
|
||||||
before(:each) do
|
before(:each) do
|
||||||
sign_out :user
|
sign_out :user
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
module ModelMacros
|
module ModelMacros
|
||||||
def let_studium_lva
|
def let_studium_lva
|
||||||
let(:studium) {FactoryGirl.create(:studium)}
|
let(:studium) {FactoryGirl.create(:studium)}
|
||||||
|
|
||||||
let(:zerosemester) {FactoryGirl.create(:zero_semester,studium_id: studium.id)}
|
|
||||||
let(:firstsemester) {FactoryGirl.create(:first_semester)}
|
|
||||||
let(:modulgruppe){FactoryGirl.create(:modulgruppe,studium_id: studium.id)}
|
let(:modulgruppe){FactoryGirl.create(:modulgruppe,studium_id: studium.id)}
|
||||||
let(:modul) do
|
let(:modul) do
|
||||||
m=FactoryGirl.build(:other_modul)
|
m=FactoryGirl.build(:other_modul);
|
||||||
m.modulgruppen << modulgruppe
|
m.modulgruppen << modulgruppe
|
||||||
m.save!
|
m.save!
|
||||||
m
|
m
|
||||||
@@ -14,8 +11,8 @@ module ModelMacros
|
|||||||
let(:lva) do
|
let(:lva) do
|
||||||
l=FactoryGirl.build(:lva)
|
l=FactoryGirl.build(:lva)
|
||||||
l.modul << modul
|
l.modul << modul
|
||||||
|
l.save!
|
||||||
l
|
l
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user