forked from bofh/fetsite
Compare commits
229 Commits
new_branch
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52ffe0c701 | ||
|
|
52fcabf2dc | ||
|
|
c03a60c236 | ||
| 2e732561e8 | |||
| a8f353f213 | |||
| 6ba20206ab | |||
|
|
2ae99b4b9e | ||
|
|
f61681c5d0 | ||
| 1b91d99b24 | |||
| 28906eb5fb | |||
| 745c4413f4 | |||
| ac7e7f3462 | |||
| e55a71e77d | |||
| 502aae5c27 | |||
| c2ebdcbefc | |||
| 734a137563 | |||
| 9f1de3d9d0 | |||
|
|
0f683ac974 | ||
|
|
5ffecf7087 | ||
|
|
965db4dec0 | ||
|
|
6aecb4b4a8 | ||
|
|
b1616a6d6d | ||
|
|
122bf6c6d4 | ||
|
|
829bdb97be | ||
|
|
6c91513ff8 | ||
|
|
d1a496a017 | ||
|
|
eb95f7a5e4 | ||
|
|
de225627b1 | ||
|
|
08aa459f57 | ||
|
|
2b6890a6e6 | ||
|
|
04ce26754a | ||
|
|
163e1adfc2 | ||
|
|
e5a5ec85ef | ||
|
|
256d9f09fb | ||
|
|
e3c6721811 | ||
|
|
e5f0d75b79 | ||
|
|
07bb853501 | ||
|
|
af5b081a3b | ||
|
|
24f3e90235 | ||
|
|
ef1135962e | ||
|
|
22cf26f76c | ||
|
|
0c7614b41d | ||
|
|
0fedeb2bde | ||
|
|
146885abae | ||
|
|
c38139d6f1 | ||
|
|
8cb6ec785c | ||
|
|
b8903c6d9a | ||
|
|
242d05f4fa | ||
|
|
070e0dfedb | ||
|
|
610e6ae3dd | ||
|
|
6c4873d869 | ||
|
|
09d5e7b880 | ||
|
|
6b37d44c9a | ||
|
|
20088b868f | ||
|
|
f1fbd3bef3 | ||
|
|
17a43097e7 | ||
|
|
3498535d8c | ||
|
|
d313e712f1 | ||
|
|
bb4adf2eb7 | ||
|
|
09532fc74c | ||
|
|
29d5c8dac7 | ||
|
|
926431c0a2 | ||
|
|
d95e1a3399 | ||
|
|
d6fa4e1dc7 | ||
|
|
6528e8a320 | ||
|
|
18beead785 | ||
|
|
3baf44c057 | ||
|
|
9ec7a76d4a | ||
|
|
3b6590f369 | ||
|
|
708911ba4e | ||
|
|
797d2a1d31 | ||
|
|
7ad484cdd7 | ||
|
|
aca92e1107 | ||
|
|
f13fbafaae | ||
|
|
f6738a5226 | ||
|
|
2f4a9e4f10 | ||
|
|
dff490163e | ||
|
|
20a7091800 | ||
|
|
ff49499204 | ||
|
|
8b3e1ee225 | ||
|
|
dc4f161ce4 | ||
|
|
5c5236062b | ||
|
|
43af1114e8 | ||
|
|
0772d51c71 | ||
|
|
f2293513c1 | ||
|
|
87cad802d7 | ||
|
|
2e4a0680df | ||
|
|
4ca664a091 | ||
|
|
02c766f428 | ||
|
|
75e5b8e267 | ||
|
|
7d008cb599 | ||
|
|
b1fc24af80 | ||
|
|
7477b028c5 | ||
|
|
fddaa0dcb6 | ||
|
|
4ed7e92385 | ||
|
|
82876f34a8 | ||
|
|
3d97153fa5 | ||
|
|
6e10830b83 | ||
|
|
8ad15aafd2 | ||
|
|
d4948fff5e | ||
|
|
8ea2109b27 | ||
|
|
f72466f1cd | ||
|
|
cba94e926c | ||
|
|
f522a83813 | ||
|
|
94d67463a9 | ||
|
|
38656a1e75 | ||
|
|
503b9eb732 | ||
|
|
ffee3b8dfb | ||
|
|
978f617131 | ||
|
|
cf2a8adf49 | ||
|
|
14e563ef95 | ||
|
|
5660cd7748 | ||
|
|
af5d055014 | ||
|
|
453dd7867d | ||
|
|
bbfb5e6a1d | ||
|
|
4ed35f184c | ||
|
|
37aab0ef59 | ||
|
|
c53d34191a | ||
|
|
61c5624b16 | ||
|
|
a1ef7028fd | ||
|
|
b5f1ae9e69 | ||
|
|
6a9fe8243b | ||
|
|
1f581ab819 | ||
|
|
e73315bd41 | ||
|
|
491e360141 | ||
|
|
28226df76c | ||
|
|
dfef3721dc | ||
|
|
14598fbbd9 | ||
|
|
ffaa57c914 | ||
|
|
cd439ecf02 | ||
|
|
328adfe3a5 | ||
|
|
e0312386e7 | ||
| ee451cdd9b | |||
| cfdbeeaf46 | |||
|
|
5542777216 | ||
| e341384493 | |||
|
|
0337131472 | ||
| e4a100823f | |||
|
|
e15526865d | ||
| f052940d6c | |||
| 7c6e04ca2e | |||
|
|
1d8bae3aee | ||
|
|
168b4d9e4c | ||
|
|
a47c6fea7a | ||
|
|
10949e9708 | ||
|
|
a9c9b22a94 | ||
|
|
b073a1a098 | ||
|
|
d85a01c810 | ||
|
|
4a8e5d393e | ||
|
|
97d5427f6d | ||
|
|
92667b92e9 | ||
|
|
ff70c31c40 | ||
|
|
3d87ce6fd2 | ||
|
|
cfb42584e1 | ||
|
|
52dac513f7 | ||
|
|
514bdc1ef0 | ||
|
|
e486ab02fd | ||
|
|
0dc83df98c | ||
|
|
9a9c7f74f9 | ||
|
|
68e2d4a5a7 | ||
|
|
edaf154549 | ||
|
|
f59f0cb05a | ||
|
|
b7abbb8a77 | ||
|
|
9521f04c72 | ||
|
|
01c6fedaee | ||
|
|
1e48881830 | ||
|
|
0da3ee8ed9 | ||
|
|
5531eb089e | ||
|
|
8fa549ae23 | ||
|
|
8c2efffff4 | ||
|
|
b9079c0525 | ||
|
|
d509884aa1 | ||
|
|
13f852cf48 | ||
|
|
a96e48fa36 | ||
|
|
a84332d09f | ||
|
|
4b1d11751d | ||
|
|
eccb090d5c | ||
|
|
c7d12e9a42 | ||
|
|
f7ad93c398 | ||
|
|
984e5f4b56 | ||
|
|
4835155d06 | ||
|
|
e7c21ad95b | ||
|
|
889d7ac3d0 | ||
|
|
194a8375dd | ||
|
|
7b9b226e59 | ||
|
|
d4964f40fb | ||
|
|
5134dc2e5f | ||
|
|
c37040a74b | ||
|
|
c1a7d9b7c2 | ||
|
|
576b763d82 | ||
|
|
c02ee30013 | ||
|
|
1cea790324 | ||
|
|
3bcd8389d4 | ||
|
|
221bd95cbf | ||
|
|
8c1e430bb2 | ||
|
|
589597509a | ||
|
|
93dbdedf53 | ||
|
|
1bc9d65a44 | ||
|
|
f61231accc | ||
|
|
cec9939144 | ||
|
|
6b324ded44 | ||
|
|
18a6821029 | ||
|
|
2d9944dfc3 | ||
|
|
9dd9c3cc48 | ||
|
|
8bfd96d0af | ||
|
|
4a671f5cff | ||
|
|
5bf63421a6 | ||
|
|
723d7be980 | ||
|
|
e098c0cd36 | ||
|
|
bffb978fc7 | ||
|
|
8e1e19d3ab | ||
|
|
7c2f1f9753 | ||
|
|
370c439c29 | ||
|
|
1047851b47 | ||
|
|
94cad06e31 | ||
| 8ed5b7287e | |||
|
|
934e004416 | ||
|
|
af39f21595 | ||
|
|
82b71f045f | ||
|
|
37c2d893b6 | ||
|
|
58fd356f00 | ||
| 909cefb85b | |||
| 07549c6f0e | |||
| c356c3c128 | |||
| c7902423b5 | |||
| dd94a1b47b | |||
| 48f8c975cd | |||
| 6b0314af7a | |||
| f718567722 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -51,4 +51,5 @@ Gemfile.lock
|
||||
/config/contact_topic.yml
|
||||
.#*
|
||||
.*
|
||||
!/.gitignore
|
||||
!/.gitignore
|
||||
*.pid
|
||||
44
Gemfile
44
Gemfile
@@ -1,11 +1,11 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rake', '~>10.0'
|
||||
gem 'rails', '3.2.13'
|
||||
gem 'sprockets', '2.2.2'
|
||||
gem 'webrick', '1.3.1'
|
||||
# Bundle edge Rails instead:
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
gem 'mysql2'
|
||||
gem 'mysql2', '~>0.3.10'
|
||||
gem 'sqlite3'
|
||||
gem 'execjs', '~>1.4.0'
|
||||
|
||||
@@ -13,8 +13,8 @@ gem 'webrick', '1.3.1'
|
||||
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
gem 'sass-rails', '~> 3.2'
|
||||
gem 'coffee-rails', '~> 3.2.1'
|
||||
gem 'sass-rails', '~> 3.0'
|
||||
gem 'coffee-rails', '~> 3.0'
|
||||
gem 'bootstrap-sass','~> 2.3.2.1'
|
||||
|
||||
group :assets do
|
||||
@@ -33,7 +33,7 @@ gem 'jquery-rails'
|
||||
# gem 'jbuilder'
|
||||
|
||||
# Use unicorn as the app server
|
||||
gem 'unicorn'
|
||||
gem 'unicorn', '~>4.8.0'
|
||||
|
||||
# Deploy with Capistran
|
||||
# gem 'capistrano'
|
||||
@@ -60,16 +60,17 @@ gem "paper_trail" , '~>3.0.5'#, :git=>'git://github.com/airblade/paper_trail.git
|
||||
|
||||
# User management
|
||||
gem "devise" ,'~>2.2.3'
|
||||
gem "omniauth"
|
||||
gem "omniauth-facebook"
|
||||
gem "omniauth-ldap"
|
||||
gem "omniauth", '~>1.2.2'
|
||||
gem "omniauth-facebook", '~>2.0.0'
|
||||
gem "omniauth-ldap", '~>1.0.4'
|
||||
|
||||
gem "fb_graph"
|
||||
gem "fb_graph",'~>2.7.17'
|
||||
gem "meta-tags"
|
||||
# Roles for users
|
||||
gem "rolify"
|
||||
gem "rolify", '~>4.0.0'
|
||||
# Abilities
|
||||
gem "cancan"
|
||||
gem "cancan", '~>1.6.0'
|
||||
|
||||
|
||||
# Fileupload
|
||||
|
||||
@@ -81,11 +82,20 @@ gem 'haml'
|
||||
#gem 'wikicloth'
|
||||
#gem 'gollum-lib'
|
||||
gem 'awesome_nested_set'
|
||||
gem 'annotate', ">=2.5.0"
|
||||
gem 'annotate', "~>2.6.0"
|
||||
gem 'carrierwave', "~>0.9.0"
|
||||
group :development, :test do
|
||||
gem 'factory_girl_rails'
|
||||
gem 'rspec-rails'
|
||||
gem 'factory_girl_rails',"~>4.5.0"
|
||||
gem 'minitest', "~>4.7.5"
|
||||
gem 'progress_bar'
|
||||
gem 'rspec-core', '~>3.3.0'
|
||||
gem 'rspec-support', '~>3.3.0'
|
||||
gem 'rspec-rails', '~>3.3.0'
|
||||
gem 'rspec-collection_matchers', '~>1.1.2'
|
||||
gem 'rspec-activemodel-mocks', '~>1.0.1'
|
||||
gem 'rspec-html-matchers', '~>0.7.0'
|
||||
gem 'rspec-expectations', '~>3.3.1'
|
||||
gem 'capybara', '~>2.5.0'
|
||||
end
|
||||
|
||||
gem "simple_calendar", "~> 0.1.9"
|
||||
@@ -93,7 +103,7 @@ gem 'rmagick'
|
||||
|
||||
gem 'bootstrap-addons-rails'
|
||||
gem "jquery-fileupload-rails", "0.4.1"
|
||||
gem "jquery-ui-rails","~> 4.1.1"
|
||||
gem "jquery-ui-rails","~> 4.1.0"
|
||||
gem "font-awesome-rails"
|
||||
gem "jquery-datetimepicker-rails"
|
||||
# gem "jquery-sortable-rails"
|
||||
@@ -124,4 +134,6 @@ gem 'opengraph_parser'
|
||||
gem 'blueimp-gallery'
|
||||
gem 'blueimp-gallery-rails'
|
||||
|
||||
gem 'shareable'
|
||||
gem 'shareable'
|
||||
|
||||
gem 'sunspot_test'
|
||||
|
||||
25
README
Normal file
25
README
Normal file
@@ -0,0 +1,25 @@
|
||||
SETUP:
|
||||
|
||||
install ruby 2.1.10
|
||||
|
||||
install requirements
|
||||
apt-get ...
|
||||
|
||||
|
||||
mkdir /srv/fetsite
|
||||
cd /srv/fetsite
|
||||
|
||||
copy / fetch Gemfile
|
||||
|
||||
make User fetsite
|
||||
|
||||
|
||||
bundle install
|
||||
|
||||
# Config Files kopieren:
|
||||
cp /srv/fetsite/config/omniout_secrets.yml.example /srv/fetsite/config/omniout_secrets.yml
|
||||
cp /srv/fetsite/config/omniout_secrets.yml.example /srv/fetsite/config/omniout_secrets.yml
|
||||
touch crawler_config.yml
|
||||
|
||||
# Datenbank erstellen
|
||||
rake db:migrate
|
||||
2659
app/assets/javascripts/jmpress.js
Normal file
2659
app/assets/javascripts/jmpress.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,149 +1,123 @@
|
||||
|
||||
/*
|
||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||
* listed below.
|
||||
*
|
||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
||||
*
|
||||
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
||||
* compiled file, but it's generally better to create a new file per style scope.
|
||||
*= require_self
|
||||
* require_tree .
|
||||
*= require 'calendars'
|
||||
*= require jquery.fileupload-ui
|
||||
* require 'bootstrap'
|
||||
*= require 'tinymce'
|
||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||
* listed below.
|
||||
*
|
||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
||||
*
|
||||
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
||||
* compiled file, but it's generally better to create a new file per style scope.
|
||||
*
|
||||
*= require_self
|
||||
* require_tree .
|
||||
*= require blueimp-gallery-all
|
||||
*= require jquery.fileupload-ui
|
||||
*= require jquery.datetimepicker
|
||||
*= require jquery.ui.dialog
|
||||
*= require jquery.ui.autocomplete
|
||||
*= require jquery.ui.progressbar
|
||||
*= require jquery.ui.tabs
|
||||
* require 'bootstrap'
|
||||
* require 'neuigkeiten'
|
||||
*/
|
||||
|
||||
*/
|
||||
// Colorshema #0A64A4
|
||||
$color_prim: #0A64A4;
|
||||
$color_prim_light: #0B65A5;
|
||||
$color_prim_vlight: #2B85C5;
|
||||
$color_cont: FFDB73;
|
||||
$color_cont_light:FFDB73;
|
||||
$linkColor: #03006E;
|
||||
$color_schema_1: #006599;
|
||||
$color_schema_2: #630CE8;
|
||||
$color_schema_3: #FF0021;
|
||||
$color_schema_4: #E8820C;
|
||||
$color_schema_5: #FFF30D;
|
||||
|
||||
$color_schema_1_dark: darken($color_schema_1, 10%);
|
||||
$color_schema_2_dark: darken($color_schema_2, 10%);
|
||||
$color_schema_3_dark: darken($color_schema_3, 10%);
|
||||
$color_schema_4_dark: darken($color_schema_4, 10%);
|
||||
$color_schema_5_dark: darken($color_schema_5, 10%);
|
||||
|
||||
$color_prim: $color_schema_1_dark; // #006599; //071672;
|
||||
|
||||
$color_prim_light: lighten($color_prim ,10%);
|
||||
$color_prim_vlight: lighten($color_prim ,30%);
|
||||
$color_prim_dark: darken($color_prim ,10%);
|
||||
$color_prim_vdark: darken($color_prim ,30%);
|
||||
|
||||
$color_cont: $color_schema_3;
|
||||
$color_cont_light:lighten($color_cont ,10%);
|
||||
$linkColor: $color_prim;
|
||||
$linkColorHover: $color_schema_1;
|
||||
$white: #FFFFFF;
|
||||
|
||||
$bodyBackground: $white;
|
||||
$navbarBackground: $color_cont;
|
||||
$navbarBackground: #FFFFFF;
|
||||
$bodyBackground: #EEE;
|
||||
|
||||
$navbarBackgroundHighlight:lighten($navbarBackground,30%);
|
||||
|
||||
|
||||
|
||||
$navbarBackground: #EEE;//$color_prim;
|
||||
$navbarText: $color_prim;
|
||||
$navbarLinkColor: $color_prim;
|
||||
$navbarLinkColorHover: $color_schema_1;
|
||||
$dropdownLinkColor: black;
|
||||
$navbar-default-brand-color: black;
|
||||
$navbarBrandColor:black;
|
||||
|
||||
|
||||
$navbarBackgroundHighlight: #EEE;
|
||||
//$navbarBackgroundHighlight:#FFFFFF;
|
||||
|
||||
$navbarLinkBackgroundHover:#FFBE00;
|
||||
$navbarLinkBackgroundHover: lighten(#cccccc,10%);
|
||||
|
||||
$navbarLinkBackgroundHover: darken($navbarBackground,10%);
|
||||
|
||||
|
||||
$infoBackground:#65A5D1;
|
||||
$infoText:#03406A;
|
||||
$sansFontFamily: Helvetica, Arial;
|
||||
|
||||
@import 'bootstrap';
|
||||
@import 'bootstrap-responsive';
|
||||
@import 'bootstrap/image-gallery';
|
||||
|
||||
@import 'font-awesome';
|
||||
|
||||
h1 {
|
||||
font-size: 23px
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 19px
|
||||
}
|
||||
|
||||
body,html {
|
||||
padding:0;
|
||||
margin:0;
|
||||
|
||||
}
|
||||
a:hover {
|
||||
text-decoration:none;
|
||||
}
|
||||
@import 'neuigkeiten';
|
||||
@import 'themengruppen';
|
||||
|
||||
div.header {
|
||||
display: block;
|
||||
// background: url('/header1.png') no-repeat;
|
||||
background-color: #FFF;
|
||||
background-position: right;
|
||||
border-bottom:1px solid black;
|
||||
height:41px;
|
||||
color:#000;
|
||||
padding-left:87px;
|
||||
padding-top:0px;
|
||||
overflow:hidden;
|
||||
margin-bottom: 20px
|
||||
display: block;
|
||||
// background: url('../../../../header1.png') no-repeat;
|
||||
// background-color:white;// $color_prim;
|
||||
// background-position: right;
|
||||
vertical-align:middle;
|
||||
float:left;
|
||||
color:#000;
|
||||
padding-top:0px;
|
||||
overflow:visible;
|
||||
height:45px;
|
||||
margin-bottom: 0 px
|
||||
}
|
||||
div.header h1 {
|
||||
padding:0;
|
||||
margin:4px;
|
||||
font-size:20px;
|
||||
line-height:32px;
|
||||
padding:0;
|
||||
margin:4px;
|
||||
font-size:20px;
|
||||
line-height:32px;
|
||||
}
|
||||
#menudiv {
|
||||
width:100%;
|
||||
div.header img {
|
||||
//top:2px;
|
||||
//position:relative;
|
||||
}
|
||||
div.navbar {
|
||||
border-bottom: $color_prim solid 3px;
|
||||
}
|
||||
div.headerrow {
|
||||
}
|
||||
|
||||
|
||||
.navbar .nav li {
|
||||
min-width:100%;
|
||||
}
|
||||
.navbar .nav .divider {
|
||||
border-style: solid;
|
||||
border-width: 1px 0px 0px 0px;
|
||||
border-color: grey;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.navbar .navbar-inner
|
||||
{
|
||||
border:none;
|
||||
box-shadow:none;
|
||||
}
|
||||
#contentdiv
|
||||
{
|
||||
background: #FFFFFF
|
||||
}
|
||||
#contentdiv .container-fluid
|
||||
{
|
||||
padding:0;
|
||||
}
|
||||
|
||||
a.linkbox, div.contentbox
|
||||
{
|
||||
display:block;
|
||||
padding:5px;
|
||||
border-radius: 10px;
|
||||
border: lightgray solid 1px;
|
||||
|
||||
}
|
||||
|
||||
a.linkbox:hover
|
||||
{
|
||||
box-shadow: 1px 1px 2px 2px lightgray;
|
||||
}
|
||||
|
||||
a.linkbox li
|
||||
{
|
||||
}
|
||||
ul.linkbox-list li
|
||||
{
|
||||
margin-bottom:10px;
|
||||
}
|
||||
ul.linkbox-list
|
||||
{
|
||||
max-width:70em;
|
||||
}
|
||||
|
||||
div.contentbox
|
||||
{
|
||||
margin: 5px;
|
||||
}
|
||||
$contentdiv-background:none;
|
||||
$navbar-li-minwidth: 0;
|
||||
|
||||
|
||||
.navbar .nav li {
|
||||
min-width:100%;
|
||||
background:44F;
|
||||
}
|
||||
|
||||
@import 'galleries';
|
||||
@import 'tinymce';
|
||||
$box-border: #ccc solid 1px;
|
||||
$box-border-radius:0px;
|
||||
$box-background: white;
|
||||
|
||||
@import 'layout';
|
||||
@import 'linkboxes';
|
||||
@import 'calendars';
|
||||
@import 'formtastic-bootstrap'
|
||||
134
app/assets/stylesheets/infoscreenframe.css
Normal file
134
app/assets/stylesheets/infoscreenframe.css
Normal file
@@ -0,0 +1,134 @@
|
||||
html {
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
height: 100vh;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 200px;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
svg {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
.impulsPath {
|
||||
fill: none;
|
||||
stroke: #04669c;
|
||||
stroke-miterlimit: 1;
|
||||
stroke-width: 6px;
|
||||
stroke-dasharray: 1946.243;
|
||||
stroke-dashoffset: 0;
|
||||
stroke-linejoin: round;
|
||||
stroke-linecap: round;
|
||||
animation: dash 10s ease-out infinite;
|
||||
animation-direction: normal;
|
||||
}
|
||||
|
||||
.FET-logotext-stroke {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
#FET-logotext {
|
||||
opacity: 0;
|
||||
animation: logotext 10s ease-in infinite;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.content-area {
|
||||
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
background-color: #04669c;
|
||||
padding-bottom: 10px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
color: #fff;
|
||||
flex-basis: bottom;
|
||||
}
|
||||
|
||||
.footer h3,
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
font-family: Helvetica, Arial;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.footer h3 {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.footer .adress {
|
||||
margin: auto;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.footer .contact {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer .servicecontainer{
|
||||
display: inline-flex;
|
||||
margin: auto;
|
||||
|
||||
}
|
||||
.footer .servicecontainer .servicetime {
|
||||
margin: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.footer .servicecontainer .servicetime #time {
|
||||
font-size: 0.7em
|
||||
}
|
||||
|
||||
.footer .servicecontainer .servicestatus{
|
||||
margin: auto;
|
||||
width:20px;
|
||||
height: 100vh; /* height: 100%;*/
|
||||
padding-right: 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*K E Y F R A M E S*/
|
||||
|
||||
@keyframes dash {
|
||||
from {
|
||||
stroke-dashoffset: 1946.243;
|
||||
opacity: 0;
|
||||
stroke-width: 0.5;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
stroke-dashoffset: 0;
|
||||
stroke-width: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes logotext {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@@ -44,98 +44,6 @@ a:hover {
|
||||
|
||||
|
||||
|
||||
ul.linkbox-list
|
||||
{
|
||||
max-width:70em;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
a.linkbox, div.contentbox
|
||||
{
|
||||
display:block;
|
||||
padding:5px;
|
||||
border-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
}
|
||||
|
||||
|
||||
a.linkbox:hover
|
||||
{
|
||||
box-shadow: 1px 1px 2px 2px lightgray;
|
||||
}
|
||||
|
||||
a.linkbox.color-1
|
||||
{
|
||||
color:$color_schema_1;
|
||||
}
|
||||
a.linkbox.color-2
|
||||
{
|
||||
color:$color_schema_2;
|
||||
}
|
||||
a.linkbox.color-3
|
||||
{
|
||||
color:$color_schema_3;
|
||||
}
|
||||
a.linkbox.color-4
|
||||
{
|
||||
color:$color_schema_4;
|
||||
}
|
||||
a.linkbox.color-5
|
||||
{
|
||||
color:$color_schema_5;
|
||||
}
|
||||
|
||||
a.color-1-dark
|
||||
{
|
||||
color:$color_schema_1_dark;
|
||||
}
|
||||
a.color-2-dark
|
||||
{
|
||||
color:$color_schema_2_dark;
|
||||
}
|
||||
a.color-3-dark
|
||||
{
|
||||
color:$color_schema_3_dark;
|
||||
}
|
||||
a.color-4-dark
|
||||
{
|
||||
color:$color_schema_4_dark;
|
||||
}
|
||||
a.color-5-dark
|
||||
{
|
||||
color:$color_schema_5_dark;
|
||||
}
|
||||
a.color-1-dark:hover
|
||||
{
|
||||
color:$color_schema_1;
|
||||
}
|
||||
a.color-2-dark:hover
|
||||
{
|
||||
color:$color_schema_2;
|
||||
}
|
||||
a.color-3-dark:hover
|
||||
{
|
||||
color:$color_schema_3;
|
||||
}
|
||||
a.color-4-dark:hover
|
||||
{
|
||||
color:$color_schema_4;
|
||||
}
|
||||
a.color-5-dark:hover
|
||||
{
|
||||
color:$color_schema_5;
|
||||
}
|
||||
|
||||
|
||||
a.linkbox li
|
||||
{
|
||||
}
|
||||
ul.linkbox-list li
|
||||
{
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
div.contentbox
|
||||
{
|
||||
margin: 5px;
|
||||
@@ -175,28 +83,6 @@ div.smallspan {
|
||||
min-height:0;
|
||||
}
|
||||
|
||||
ul.linklist
|
||||
{max-width:100%;
|
||||
padding:0;
|
||||
margin:5px;
|
||||
}
|
||||
ul.linklist li{
|
||||
list-style:none;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
ul.linklist li a i{
|
||||
vertical-align:middle;
|
||||
margin-right:6px;
|
||||
font-size:2em;}
|
||||
span.linklist a {
|
||||
padding:5px;
|
||||
border-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
display:block;
|
||||
float:left;
|
||||
|
||||
}
|
||||
|
||||
form.inline div {
|
||||
float:left;}
|
||||
|
||||
61
app/assets/stylesheets/linkboxes.css.scss
Normal file
61
app/assets/stylesheets/linkboxes.css.scss
Normal file
@@ -0,0 +1,61 @@
|
||||
ul.linkbox-list
|
||||
{
|
||||
max-width:70em;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
a.linkbox, div.contentbox
|
||||
{
|
||||
display:block;
|
||||
padding:5px;
|
||||
border-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
}
|
||||
|
||||
a.linkbox:hover{ box-shadow: 1px 1px 2px 2px lightgray; }
|
||||
|
||||
a.linkbox.color-1 { color:$color_schema_1; }
|
||||
a.linkbox.color-2 { color:$color_schema_2; }
|
||||
a.linkbox.color-3 { color:$color_schema_3; }
|
||||
a.linkbox.color-4 { color:$color_schema_4;}
|
||||
a.linkbox.color-5 { color:$color_schema_5;}
|
||||
|
||||
a.color-1-dark { color:$color_schema_1_dark; }
|
||||
a.color-2-dark { color:$color_schema_2_dark; }
|
||||
a.color-3-dark { color:$color_schema_3_dark;}
|
||||
a.color-4-dark { color:$color_schema_4_dark;}
|
||||
a.color-5-dark { color:$color_schema_5_dark;}
|
||||
a.color-1-dark:hover { color:$color_schema_1; }
|
||||
a.color-2-dark:hover { color:$color_schema_2; }
|
||||
a.color-3-dark:hover { color:$color_schema_3; }
|
||||
a.color-4-dark:hover { color:$color_schema_4; }
|
||||
a.color-5-dark:hover { color:$color_schema_5; }
|
||||
|
||||
a.linkbox li { }
|
||||
ul.linkbox-list li {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
ul.linklist {
|
||||
max-width:100%;
|
||||
padding:0;
|
||||
margin:5px;
|
||||
}
|
||||
ul.linklist li {
|
||||
list-style:none;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
ul.linklist li a i{
|
||||
vertical-align:middle;
|
||||
margin-right:6px;
|
||||
font-size:2em;}
|
||||
span.linklist a {
|
||||
padding:5px;
|
||||
border-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
display:block;
|
||||
float:left;
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*= require jquery.datetimepicker
|
||||
*= require jquery.ui.dialog
|
||||
*= require jquery.ui.autocomplete
|
||||
*= require jquery.ui.progressbar
|
||||
*= require jquery.ui.tabs
|
||||
* require 'bootstrap'
|
||||
* require 'neuigkeiten'
|
||||
@@ -117,5 +118,6 @@ $box-border-radius:0px;
|
||||
$box-background: white;
|
||||
|
||||
@import 'layout';
|
||||
@import 'linkboxes';
|
||||
@import 'calendars';
|
||||
@import 'formtastic-bootstrap'
|
||||
61
app/assets/stylesheets/themes/blue1/linkboxes.css.scss
Normal file
61
app/assets/stylesheets/themes/blue1/linkboxes.css.scss
Normal file
@@ -0,0 +1,61 @@
|
||||
ul.linkbox-list
|
||||
{
|
||||
max-width:70em;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
a.linkbox, div.contentbox
|
||||
{
|
||||
display:block;
|
||||
padding:5px;
|
||||
border-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
}
|
||||
|
||||
a.linkbox:hover{ box-shadow: 1px 1px 2px 2px lightgray; }
|
||||
|
||||
a.linkbox.color-1 { color:$color_schema_1; }
|
||||
a.linkbox.color-2 { color:$color_schema_2; }
|
||||
a.linkbox.color-3 { color:$color_schema_3; }
|
||||
a.linkbox.color-4 { color:$color_schema_4;}
|
||||
a.linkbox.color-5 { color:$color_schema_5;}
|
||||
|
||||
a.color-1-dark { color:$color_schema_1_dark; }
|
||||
a.color-2-dark { color:$color_schema_2_dark; }
|
||||
a.color-3-dark { color:$color_schema_3_dark;}
|
||||
a.color-4-dark { color:$color_schema_4_dark;}
|
||||
a.color-5-dark { color:$color_schema_5_dark;}
|
||||
a.color-1-dark:hover { color:$color_schema_1; }
|
||||
a.color-2-dark:hover { color:$color_schema_2; }
|
||||
a.color-3-dark:hover { color:$color_schema_3; }
|
||||
a.color-4-dark:hover { color:$color_schema_4; }
|
||||
a.color-5-dark:hover { color:$color_schema_5; }
|
||||
|
||||
a.linkbox li { }
|
||||
ul.linkbox-list li {
|
||||
margin-bottom:10px;
|
||||
}
|
||||
ul.linklist {
|
||||
max-width:100%;
|
||||
padding:0;
|
||||
margin:5px;
|
||||
}
|
||||
ul.linklist li {
|
||||
list-style:none;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
ul.linklist li a i{
|
||||
vertical-align:middle;
|
||||
margin-right:6px;
|
||||
font-size:2em;}
|
||||
span.linklist a {
|
||||
padding:5px;
|
||||
border-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
display:block;
|
||||
float:left;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* This is the main file for theme "blue2"
|
||||
|
||||
*/
|
||||
/*
|
||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||
* listed below.
|
||||
@@ -15,6 +17,8 @@
|
||||
*= require jquery.datetimepicker
|
||||
*= require jquery.ui.dialog
|
||||
*= require jquery.ui.tabs
|
||||
*= require jquery.ui.progressbar
|
||||
|
||||
* require 'bootstrap'
|
||||
|
||||
* require 'neuigkeiten'
|
||||
@@ -89,9 +93,11 @@ div.header {
|
||||
height:45px;
|
||||
margin-bottom: 0 px
|
||||
}
|
||||
|
||||
div.header_span {
|
||||
background:white
|
||||
}
|
||||
|
||||
div.header h1 {
|
||||
padding:0;
|
||||
margin:4px;
|
||||
@@ -117,16 +123,16 @@ $navbar-li-minwidth: 0;
|
||||
|
||||
|
||||
$box-border: lightgray solid 1px;
|
||||
$box-border-radius:4px;
|
||||
$box-border-radius:6px;
|
||||
$box-background: white;
|
||||
|
||||
@import 'layout';
|
||||
@import 'calendars';
|
||||
@import 'formtastic-bootstrap';
|
||||
|
||||
@import 'linkboxes';
|
||||
@import 'extra';
|
||||
body {
|
||||
background: #FFF; //#EFEFEF;
|
||||
background: #FCFCFC; //#EFEFEF;
|
||||
background-size:100%;
|
||||
}
|
||||
|
||||
|
||||
142
app/assets/stylesheets/themes/blue2/linkboxes.css.scss
Normal file
142
app/assets/stylesheets/themes/blue2/linkboxes.css.scss
Normal file
@@ -0,0 +1,142 @@
|
||||
ul.linkbox-list
|
||||
{
|
||||
max-width:70em;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
|
||||
ul.linkbox-list > li {
|
||||
margin-bottom:0px;
|
||||
}
|
||||
|
||||
ul.linkbox-list > li:first-child a.linkbox {
|
||||
border-top-left-radius:$box-border-radius;
|
||||
border-top-right-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
|
||||
}
|
||||
|
||||
ul.linkbox-list > li:last-child a.linkbox {
|
||||
border-bottom-left-radius:$box-border-radius;
|
||||
border-bottom-right-radius:$box-border-radius;
|
||||
}
|
||||
|
||||
ul.linkbox-list > li a.linkbox {
|
||||
border-radius: 0;
|
||||
border-top: none;
|
||||
|
||||
}
|
||||
|
||||
ul.linkbox-list > li a.linkbox:hover {
|
||||
z-index:2000
|
||||
}
|
||||
a.linkbox, div.contentbox
|
||||
{
|
||||
display:block;
|
||||
padding:5px;
|
||||
border-radius:$box-border-radius;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
}
|
||||
|
||||
a.linkbox:hover{ box-shadow: 1px 1px 2px 2px lightgray; }
|
||||
|
||||
a.linkbox.color-1 { color:$color_schema_1; }
|
||||
a.linkbox.color-2 { color:$color_schema_2; }
|
||||
a.linkbox.color-3 { color:$color_schema_3; }
|
||||
a.linkbox.color-4 { color:$color_schema_4;}
|
||||
a.linkbox.color-5 { color:$color_schema_5;}
|
||||
|
||||
a.color-1-dark { color:$color_schema_1_dark; }
|
||||
a.color-2-dark { color:$color_schema_2_dark; }
|
||||
a.color-3-dark { color:$color_schema_3_dark;}
|
||||
a.color-4-dark { color:$color_schema_4_dark;}
|
||||
a.color-5-dark { color:$color_schema_5_dark;}
|
||||
a.color-1-dark:hover { color:$color_schema_1; }
|
||||
a.color-2-dark:hover { color:$color_schema_2; }
|
||||
a.color-3-dark:hover { color:$color_schema_3; }
|
||||
a.color-4-dark:hover { color:$color_schema_4; }
|
||||
a.color-5-dark:hover { color:$color_schema_5; }
|
||||
|
||||
|
||||
a.linkbox li { }
|
||||
|
||||
|
||||
ul.linklist {
|
||||
max-width:100%;
|
||||
padding:0;
|
||||
margin:5px;
|
||||
}
|
||||
ul.linklist li {
|
||||
list-style:none;
|
||||
|
||||
}
|
||||
ul.linklist li a i{
|
||||
vertical-align:middle;
|
||||
margin-right:6px;
|
||||
font-size:2em;}
|
||||
|
||||
ul.linklist > li a.linkbox {
|
||||
border-radius: 0;
|
||||
border: $box-border;
|
||||
/* border-color:white;*/
|
||||
padding-top: 7px;
|
||||
margin-bottom:0px;
|
||||
margin-top:0px;
|
||||
|
||||
/* border-bottom: $box-border;
|
||||
border-top: $box-border;
|
||||
*/
|
||||
border-color:white;
|
||||
/* border-bottom-color:white; */
|
||||
|
||||
}
|
||||
ul.linklist > li a.linkbox:hover {
|
||||
|
||||
border: $box-border;
|
||||
border-top: $box-border;
|
||||
box-shadow: none;
|
||||
border-color: black;
|
||||
background: #FCFCFC;
|
||||
/* margin: 0;
|
||||
margin-bottom:0px;*/
|
||||
}
|
||||
|
||||
|
||||
ul.linklist > li:first-child a.linkbox {}
|
||||
|
||||
ul.linklist > li:last-child a.linkbox {
|
||||
}
|
||||
|
||||
ul.linklist > li:first-child a.linkbox {
|
||||
border-top-left-radius:$box-border-radius;
|
||||
border-top-right-radius:$box-border-radius;
|
||||
/* border-top:$box-border; */
|
||||
margin-top:0px;
|
||||
}
|
||||
|
||||
ul.linklist > li:last-child a.linkbox {
|
||||
border-bottom-left-radius:$box-border-radius;
|
||||
border-bottom-right-radius:$box-border-radius;
|
||||
/* border-bottom:$box-border;*/
|
||||
margin-bottom:0px;
|
||||
}
|
||||
|
||||
ul.linklist {
|
||||
border-radius: $box-border-radius;
|
||||
border: $box-border;
|
||||
/* box-shadow: 0px 0px 1px 1px lightgray;*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
span.linklist li a {
|
||||
padding:5px;
|
||||
border: $box-border;
|
||||
background: $box-background;
|
||||
display:block;
|
||||
float:left;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,15 +9,19 @@
|
||||
if params[:locale]
|
||||
if I18n.available_locales.include?(params[:locale].to_sym)
|
||||
session[:locale] = params[:locale]
|
||||
|
||||
else
|
||||
flash.now[:notice]= "#{params[:locale]} translation not available"
|
||||
logger.error flash.now[:notice]
|
||||
|
||||
end
|
||||
end
|
||||
I18n.locale = session[:locale] || request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^de|en/).first || I18n.default_locale
|
||||
|
||||
http_header=request.env['HTTP_ACCEPT_LANGUAGE']
|
||||
unless http_header.nil?
|
||||
ht= http_header.scan(/^de|en/).first
|
||||
else
|
||||
ht=nil
|
||||
end
|
||||
I18n.locale = session[:locale] || I18n.default_locale
|
||||
# removed ht from selection add || ht to check http header
|
||||
|
||||
session[:locale] = I18n.locale
|
||||
end
|
||||
@@ -46,7 +50,8 @@
|
||||
else
|
||||
flash[:error] = "You must first login to view this page"
|
||||
session[:user_return_to] = request.url
|
||||
redirect_to "/users/sign_in"
|
||||
return redirect_to "/users/sign_in"
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -55,7 +60,7 @@ u=current_user
|
||||
if ! u.try(:preferredtheme).nil? and ThemesForRails.available_theme_names.include?(u.preferredtheme)
|
||||
u.preferredtheme
|
||||
else
|
||||
"blue1"
|
||||
"blue2"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -32,6 +32,7 @@ class BeispieleController < ApplicationController
|
||||
def new
|
||||
@beispiel = Beispiel.new
|
||||
@beispiel.lva = Lva.find_by_id(params[:lva_id])
|
||||
@beispiel.flag_delete=false
|
||||
@backlink = @beispiel.lva.nil? ? root_url : lva_path(@beispiel.lva)
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
@@ -43,6 +44,7 @@ class BeispieleController < ApplicationController
|
||||
@beispiel = Beispiel.find(params[:id])
|
||||
@beispiel.lecturer = Lecturer.find(params[:beispiel][:lecturer_id])
|
||||
@beispiel.save
|
||||
|
||||
if @beispiel.save
|
||||
format.html { redirect_to @backlink, notice: 'Beispiel was successfully updated.' }
|
||||
format.js {render text: "alert(\"updated\");"}
|
||||
@@ -66,8 +68,9 @@ class BeispieleController < ApplicationController
|
||||
logger.info "Creating Beispiel..."
|
||||
@lva = Lva.find_by_id(params[:lva_id])
|
||||
params.delete(:lva_id)
|
||||
params[:beispiel][:flag_delete]=false
|
||||
@beispiel = Beispiel.new(params[:beispiel])
|
||||
|
||||
@beispiel.flag_delete=false
|
||||
logger.info "New Beispiel: #{params.inspect}"
|
||||
|
||||
@beispiel.name=@beispiel.beispieldatei.filename
|
||||
|
||||
@@ -157,7 +157,7 @@ class DocumentsController < ApplicationController
|
||||
@results = Document.search do
|
||||
fulltext params['query'] do
|
||||
fields :name, :text, :meeting
|
||||
highlight :text
|
||||
highlight :text,:name,:meeting
|
||||
end
|
||||
end
|
||||
@res=[]
|
||||
|
||||
22
app/controllers/emails_controller.rb
Normal file
22
app/controllers/emails_controller.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
class EmailsController < ApplicationController
|
||||
before_filter :authorize
|
||||
|
||||
def index
|
||||
|
||||
end
|
||||
def daily_reminder
|
||||
ActionMailer::Base.default_url_options[:host] = request.host_with_port
|
||||
@mail =NewsMailer.daily_reminder(current_user.id)
|
||||
if params[:send]
|
||||
usr=User.where(:flag_getemails => true)
|
||||
usr.each do |u|
|
||||
NewsMailer.daily_reminder(current_user.id).deliver
|
||||
end
|
||||
end
|
||||
render layout: false
|
||||
end
|
||||
protected
|
||||
def authorize
|
||||
authorize! :emails, User
|
||||
end
|
||||
end
|
||||
@@ -9,18 +9,17 @@ class FetprofilesController < ApplicationController
|
||||
@fetprofiles = Fetprofile.order(:vorname,:nachname) if params[:filter]== "all"
|
||||
@fetprofiles = Fetprofile.where(:active=>false).order(:nachname,:vorname) if params[:filter]== "notactive"
|
||||
|
||||
|
||||
@gremientabs = Gremium.tabs
|
||||
@toolbar_elements << {:hicon=>'icon-plus', :text=> I18n.t('profile.new_profile'),:path => new_fetprofile_path(@fetprofile) } if can? :new, @fetprofile
|
||||
@toolbar_elements << {:hicon=>'icon-plus', :text=> I18n.t('profile.new_profile'),:path => new_fetprofile_path(@fetprofile) } if can? :new, @fetprofile
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def internlist
|
||||
@fetprofiles = Fetprofile.order(:vorname,:nachname)
|
||||
end
|
||||
end
|
||||
|
||||
# GET /fetprofiles/1
|
||||
# GET /fetprofiles/1.json
|
||||
|
||||
@@ -8,7 +8,7 @@ class HomeController < ApplicationController
|
||||
|
||||
params[:month]= Date.today.month if params[:month].nil?
|
||||
params[:year]= Date.today.year if params[:year].nil?
|
||||
|
||||
|
||||
@calentries= (@rubriken.map {|r| r.calendar}).collect(&:calentries).flatten.select {|c| c.object !=nil}
|
||||
|
||||
@starttopic= @themen = Thema.where(:id=>t).first
|
||||
@@ -19,12 +19,17 @@ class HomeController < ApplicationController
|
||||
end
|
||||
def dev
|
||||
|
||||
end
|
||||
def infoscreen
|
||||
authorize! :infoscreen, User
|
||||
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :show).where(flag_infoscreen: true)
|
||||
render layout: false
|
||||
end
|
||||
def kontakt
|
||||
t=YAML.load_file("#{::Rails.root.to_s}/config/contact_topic.yml")
|
||||
@themen = Thema.where(:id=>t)
|
||||
end
|
||||
def treeview
|
||||
def treeview
|
||||
authorize! :doadmin, User
|
||||
@themengruppen = Themengruppe.order(:priority).reverse
|
||||
@themengruppen += Themengruppe.intern.order(:priority).reverse
|
||||
@@ -49,7 +54,7 @@ class HomeController < ApplicationController
|
||||
else
|
||||
@logs = `tail -n #{lines} log/development.log | grep -v 'actionpack\\|railties\\|activesupport\\|::Translation'`
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
def startdev
|
||||
render 'setup_fetsite_dev'
|
||||
@@ -59,7 +64,7 @@ class HomeController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
|
||||
|
||||
unless params['query'].nil? || params['query'].empty?
|
||||
@results = Sunspot.search Neuigkeit,Rubrik, Fetprofile, Thema, Themengruppe, Lva, Studium, Modul, Modulgruppe, Gremium, Document do
|
||||
fulltext params['query']
|
||||
@@ -83,7 +88,7 @@ class HomeController < ApplicationController
|
||||
# @themen=Thema.search(params['query']).public
|
||||
# end
|
||||
@themen=[]
|
||||
|
||||
|
||||
else
|
||||
@neuigkeiten=[]
|
||||
@fetprofiles=[]
|
||||
@@ -105,10 +110,10 @@ class HomeController < ApplicationController
|
||||
unless params[:themen].nil?
|
||||
t=([t].flatten+params[:themen]).uniq
|
||||
end
|
||||
unless params[:rmthema].nil?
|
||||
unless params[:rmthema].nil?
|
||||
t=t-[params[:rmthema]]
|
||||
end
|
||||
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
|
||||
end
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ class NeuigkeitenController < ApplicationController
|
||||
|
||||
before_filter :load_toolbar_elements, :only=>[:show,:find_link]
|
||||
before_filter :load_toolbar_elements_edit, :only=>[:edit]
|
||||
acts_as_flagable
|
||||
|
||||
|
||||
|
||||
@@ -119,12 +120,15 @@ end
|
||||
end
|
||||
end
|
||||
def mail_preview
|
||||
ActionMailer::Base.default_url_options[:host] = request.host_with_port
|
||||
|
||||
@neuigkeit = Neuigkeit.find(params[:id])
|
||||
@user=current_user
|
||||
@user=current_user
|
||||
@ability=Ability.new(@user)
|
||||
@mail = NewsMailer.neuigkeit_mail("all@fet.at", params[:id])
|
||||
|
||||
authorize! :publish, @neuigkeit
|
||||
render template: "news_mailer/neuigkeit_mail", layout: false
|
||||
render layout: false
|
||||
end
|
||||
def newsletter_preview
|
||||
authorize! :publish, Neuigkeit
|
||||
|
||||
@@ -16,7 +16,7 @@ class RubrikenController < ApplicationController
|
||||
@rubriken= Rubrik.accessible_by(current_ability, :show)
|
||||
@neuigkeiten = Neuigkeit.accessible_by(current_ability, :list).page(params[:page]).per(3)
|
||||
|
||||
@calentries= (@rubriken.map {|r| r.calendar}).collect(&:calentries).flatten.select {|c| c.object !=nil}
|
||||
@calentries= (@rubriken.map {|r| r.calendar.calentries.of_month(Date.new(params[:year].to_i,params[:month].to_i,1))}).flatten.select {|c| c.object !=nil}
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js {render action: :show}
|
||||
|
||||
@@ -2,11 +2,23 @@
|
||||
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
skip_before_filter :verify_authenticity_token
|
||||
def failure
|
||||
|
||||
# flash[:notice] = "Failure #{Hash.new(request.env)} #{Hash.new(params)}"
|
||||
#redirect_to new_user_registration_url , :notice=>"Omniauth Login failed"
|
||||
super
|
||||
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
|
||||
# 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)
|
||||
@@ -23,7 +35,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
end
|
||||
|
||||
def ldap
|
||||
logger.debug current_user.to_s
|
||||
logger.debug current_user.to_s
|
||||
@user=User.find_for_ldap_oauth(request.env["omniauth.auth"],current_user)
|
||||
# @user=User.find_for_ldap_oauth(session["devise.ldap_data"],current_user)
|
||||
# @user=User.first
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
class UsersController < ApplicationController
|
||||
def index
|
||||
authorize!(:index,User)
|
||||
@users = User.all
|
||||
end
|
||||
def show
|
||||
@user=User.find(params[:id])
|
||||
authorize!(:show, @user)
|
||||
|
||||
end
|
||||
def set_preferred_theme
|
||||
@user=User.find(params[:id])
|
||||
authorize!(:set_preferred_theme, @user)
|
||||
@user.preferredtheme=params[:theme]
|
||||
@user.save
|
||||
redirect_to root_url
|
||||
end
|
||||
def add_role
|
||||
authorize!(:add_role, User)
|
||||
@user= User.find(params[:id])
|
||||
if (params[:role]=="fetuser" && can?(:addfetuser,User))
|
||||
@user.add_role(params[:role])
|
||||
@@ -13,6 +27,8 @@ class UsersController < ApplicationController
|
||||
redirect_to users_url
|
||||
end
|
||||
def fb_set_default_publish_page
|
||||
authorize!(:doadmin, User)
|
||||
|
||||
if Fetsite::Application.config.facebookconfig_enabled
|
||||
if params["page"].nil? || !(current_user.provider=="facebook")
|
||||
redirect_to intern_home_index_path
|
||||
@@ -27,6 +43,7 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
def all_update
|
||||
authorize! :doadmin,User
|
||||
params[:users].each do |id,u|
|
||||
user=User.find(id)
|
||||
user.fetprofile = Fetprofile.find(u[:fetprofile_id].to_i) if u[:fetprofile_id].to_i>0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CheckboxAutocompleteInput < FormtasticBootstrap::Inputs::CheckboxInput
|
||||
class CheckboxAutocompleteInput < FormtasticBootstrap::Inputs::CheckBoxesInput
|
||||
def input_html_options
|
||||
super
|
||||
#super.merge(:class => "input-append date")
|
||||
|
||||
@@ -1,23 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
class NewsMailer < ActionMailer::Base
|
||||
default from: "salzamt@fet.at"
|
||||
helper :plugins
|
||||
def current_user
|
||||
@user
|
||||
end
|
||||
|
||||
def neuigkeit_mail(email, neuigkeit_id)
|
||||
@neuigkeit= Neuigkeit.find(neuigkeit_id)
|
||||
@user=User.first
|
||||
@ability=Ability.new(@user)
|
||||
subject = @neuigkeit.title
|
||||
subject = subject + " email: " + email if Rails.env=="development"
|
||||
subject = subject.to_s + " email: " + email.to_s if Rails.env=="development"
|
||||
email = "andis@fet.at" if Rails.env=="development"
|
||||
email="andis@fet.at"
|
||||
mail(to: email, subject: subject)
|
||||
render locals: {current_user: User.first}
|
||||
render locals: {current_user: User.first}
|
||||
end
|
||||
def daily_newsletter(user_id)
|
||||
user=User.find(user_id)
|
||||
self.message.perform_deliveries = false unless user.flag_getemails
|
||||
ability= Ability.new(user)
|
||||
|
||||
@neuigkeiten=Neuigkeit.accessible_by(ability).published_scope.where("cache_order<2")
|
||||
end
|
||||
|
||||
def daily_reminder(user_id)
|
||||
user=User.find(user_id)
|
||||
@user=user
|
||||
self.message.perform_deliveries = false unless user.flag_getemails
|
||||
@ability = Ability.new(user)
|
||||
@calentries = Calentry.of_month(Date.today).limit(100)
|
||||
# @neuigkeiten=Neuigkeit.accessiblße_by(ability).published_scope.where("cache_order<2")
|
||||
mail(to: user.email, content_type: "text/html", subject: "sdf")
|
||||
render locals: {c_user: user}
|
||||
end
|
||||
private
|
||||
include CanCan::ControllerAdditions
|
||||
def current_user
|
||||
@user
|
||||
end
|
||||
def current_ability
|
||||
@ability
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
require 'ipaddr'
|
||||
class Ability
|
||||
include CanCan::Ability
|
||||
def initialize(user,request=nil,key=nil)
|
||||
tunet=IPAddr.new("128.131.95.0/24")
|
||||
local=IPAddr.new("127.0.0.1")
|
||||
loggedin=!(user.nil?)
|
||||
unless key.nil?
|
||||
k=Key.find_by_uuid(key)
|
||||
@@ -10,6 +13,9 @@ class Ability
|
||||
end
|
||||
end
|
||||
user ||= User.new # guest user (not logged in)
|
||||
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
|
||||
end
|
||||
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
can [:show,:answer, :create,:new, :create_from_template, :flag], Survey::Question
|
||||
@@ -152,6 +158,7 @@ end
|
||||
can :show, Neuigkeit, :cache_is_published=>true, :rubrik=>{:public=>true}
|
||||
|
||||
if loggedin
|
||||
can :show, :id => user.id
|
||||
end
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
|
||||
@@ -159,6 +166,7 @@ end
|
||||
can :showintern, Neuigkeit
|
||||
can :showintern, Rubrik
|
||||
can :seeintern, User
|
||||
can :set_preferred_theme, user
|
||||
can :list, Neuigkeit
|
||||
can :shownonpublic, Rubrik
|
||||
can :manage, Nlink
|
||||
@@ -169,8 +177,12 @@ end
|
||||
if user.has_role?("fetadmin")
|
||||
can :addfetuser, User
|
||||
can :addfetadmin, User
|
||||
can :add_role, User
|
||||
can :show, User
|
||||
can :index, User
|
||||
can :edit, User
|
||||
can :manage, User
|
||||
can :set_preferred_theme, User
|
||||
end
|
||||
|
||||
if user.has_role?("newsadmin") || user.has_role?( "fetadmin") || user.has_role?( "fetuser")
|
||||
@@ -227,7 +239,8 @@ end
|
||||
can :doadmin, User
|
||||
end
|
||||
|
||||
unless user.has_role?("fetadmin")
|
||||
if user.has_role?("fetadmin")
|
||||
can :emails,User
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
class Calentry < ActiveRecord::Base
|
||||
attr_accessible :ende, :start, :summary, :typ,:calendar_ids, :calendar, :dauer, :object_id, :object_type
|
||||
belongs_to :calendar
|
||||
belongs_to :calendar, touch: true
|
||||
#belongs_to :neuigkeit
|
||||
validates :start, :presence => true
|
||||
validates :object, :presence => true
|
||||
validates :typ, :presence => true
|
||||
before_save :get_public
|
||||
belongs_to :object, polymorphic: true, touch: true # Objekt zu dem der Calentry gehört (derzeit ein Newsartikel)
|
||||
|
||||
scope :of_month, ->(d) {where("start >= ? AND start <= ?", d.beginning_of_month, d.end_of_month)}
|
||||
scope :upcoming, ->{ where("start >= ?", Time.now).order(:start)}
|
||||
scope :recent,-> { where("start <= ?", Time.now).order(:start).reverse_order}
|
||||
validate do |entry|
|
||||
@@ -31,7 +31,10 @@ class Calentry < ActiveRecord::Base
|
||||
end
|
||||
|
||||
resourcify
|
||||
|
||||
def self.updated_at
|
||||
#Calentry.select("MAX(updated_at) as m_updated_at").first.m_updated_at
|
||||
Calentry.all.max_by(&:updated_at).updated_at
|
||||
end
|
||||
def is_upcomming?
|
||||
self.start > Time.now
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ class Document < ActiveRecord::Base
|
||||
has_paper_trail
|
||||
TYPS = { 1=>"fet_docs", 10=>"protocol", 11=> "agenda"}
|
||||
has_many :attachments, :as=>:parent
|
||||
def long_name
|
||||
def long_name
|
||||
if self.parent.class=="Meeting"
|
||||
"<b>"+self.parent.text+ "</b>"+ self.name
|
||||
else
|
||||
@@ -18,20 +18,20 @@ class Document < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
def self.new_divid_for(parent)
|
||||
"document_new_parent_" + parent.class.to_s + "_" + parent.id.to_s
|
||||
"document_new_parent_" + parent.class.to_s + "_" + parent.id.to_s
|
||||
end
|
||||
def divid
|
||||
"document_"+self.id.to_s
|
||||
end
|
||||
def self.ether
|
||||
EtherpadLite.connect('http://www.fet.at/etherpad', File.new('/srv/etherpad/etherpad-lite/APIKEY.txt'))
|
||||
EtherpadLite.connect('https://www.fet.at/etherpad', File.new('config/etherpad/APIKEY.txt'))#https://www.etherpad.fet.at
|
||||
end
|
||||
def create_pdf
|
||||
require "open3"
|
||||
|
||||
|
||||
#url=blank_document_url({id: self.id, host: host, port: port})
|
||||
# url=Rails.application.routes.url_helpers.blank_document_url({id: self.id, host: host, port: port})
|
||||
|
||||
|
||||
file = Tempfile.new(['document', '.pdf'])
|
||||
bin=Rails.application.config.pdf_bin
|
||||
sin,sout,serr=Open3.popen3("#{bin} --header-html \"file://#{Rails.root}/app/views/documents/header.html\" --footer-html \"file://#{Rails.root}/app/views/documents/footer.html\" --replace title1 \"#{self.name}\" - #{file.path}")
|
||||
@@ -70,20 +70,29 @@ class Document < ActiveRecord::Base
|
||||
end
|
||||
def move_to_etherpad
|
||||
unless self.is_etherpad? || self.id.nil?
|
||||
self.etherpadkey="document_"+ self.id.to_s
|
||||
self.ep_pad.html = '<div>'+self.text+'</div>'
|
||||
self.etherpadkey="document_"+ self.id.to_s
|
||||
|
||||
if self.text.nill?
|
||||
self.ep_pad.html = '<div>'+"text"+'</div>'
|
||||
else
|
||||
self.ep_pad.html = '<div>'+self.text+'</div>'
|
||||
end
|
||||
end
|
||||
end
|
||||
def dump_to_etherpad
|
||||
if self.is_etherpad?
|
||||
self.ep_pad.html = '<div>'+self.text+'</div>'
|
||||
if self.text.nill?
|
||||
self.ep_pad.html = '<div>'+"text"+'</div>'
|
||||
else
|
||||
self.ep_pad.html = '<div>'+self.text+'</div>'
|
||||
end
|
||||
else
|
||||
self.move_to_etherpad
|
||||
end
|
||||
end
|
||||
def read_from_etherpad
|
||||
self.text=ApplicationController.helpers.strip_control_chars( self.ep_pad.html)
|
||||
|
||||
|
||||
end
|
||||
def ep_pad
|
||||
self.ep_group.pad(self.etherpadkey)
|
||||
@@ -93,16 +102,16 @@ class Document < ActiveRecord::Base
|
||||
Document.ether.group(Document::TYPS[t])
|
||||
end
|
||||
def text_stripped
|
||||
ApplicationController.helpers.strip_control_chars(ApplicationController.helpers.strip_tags(text.to_s.gsub("<"," <").gsub(">","> ").to_s))
|
||||
|
||||
ApplicationController.helpers.strip_control_chars(ApplicationController.helpers.strip_tags(text.to_s.gsub("<"," <").gsub(">","> ").to_s))
|
||||
|
||||
end
|
||||
searchable do
|
||||
text :text, stored: true do |d|
|
||||
d.text_stripped
|
||||
end
|
||||
text :name, :boost=>4.0, :stored=> true
|
||||
text :meeting, stored: true do |d|
|
||||
(d.parent_type == "Meeting")? d.try(:parent).try(:text).to_s : ""
|
||||
text :name, :boost=>4.0, :stored=> true
|
||||
text :meeting, stored: true do |d|
|
||||
(d.parent.is_a?(Meeting))? d.try(:parent).try(:text).to_s : ""
|
||||
end
|
||||
end
|
||||
def maketoc
|
||||
@@ -116,20 +125,20 @@ class Document < ActiveRecord::Base
|
||||
l=2
|
||||
f=true;
|
||||
s="<ul>"
|
||||
c.each do |h|
|
||||
c.each do |h|
|
||||
s=s+ "</li></ul></li>"*(l-h["level"]) if (h["level"]<l) and !f
|
||||
s=s+" </li>" if (h["level"]==l) and !f
|
||||
s=s+" </li>" if (h["level"]==l) and !f
|
||||
if (h["level"]>l)
|
||||
s=s + "<ul><li>" * (h["level"]-l)
|
||||
s=s + "<ul><li>" * (h["level"]-l)
|
||||
else
|
||||
s=s+"<li>"
|
||||
end
|
||||
end
|
||||
s=s+h["text"]
|
||||
|
||||
|
||||
l = h["level"]
|
||||
f=false
|
||||
end
|
||||
s=s+"</ul>"*(l-2) if (l>2)
|
||||
s=s+"</ul>"*(l-2) if (l>2)
|
||||
s=s+"</ul>"
|
||||
self.toc=s
|
||||
end
|
||||
|
||||
@@ -32,13 +32,13 @@ class Fetprofile < ActiveRecord::Base
|
||||
has_many :nlinks, as: :link
|
||||
def validate_birthday
|
||||
unless birth_month.nil? || birth_day.nil?
|
||||
unless Date.valid_date?((birth_year.nil?) ? Date.today.year : birth_year, birth_month, birth_day)
|
||||
errors.add(:birth_month, "Invalides Datum")
|
||||
errors.add(:birth_day, "Invalides Datum")
|
||||
v= false
|
||||
else
|
||||
v= true
|
||||
end
|
||||
unless Date.valid_date?((birth_year.nil?) ? Date.today.year : birth_year, birth_month, birth_day)
|
||||
errors.add(:birth_month, "Invalides Datum")
|
||||
errors.add(:birth_day, "Invalides Datum")
|
||||
v= false
|
||||
else
|
||||
v= true
|
||||
end
|
||||
else
|
||||
v= false
|
||||
end
|
||||
@@ -78,3 +78,5 @@ class Fetprofile < ActiveRecord::Base
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,10 @@ class Gremium < ActiveRecord::Base
|
||||
has_many :memberships, dependent: :destroy # Mitgliedschaften bei dem Gremium
|
||||
has_many :nlinks, as: :link, dependent: :destroy
|
||||
# scope :search, ->(query) {where("gremien.name like ? or gremien.desc like ?", "%#{query}%", "%#{query}%")}
|
||||
# has_many :members, through: :memberships
|
||||
searchable do
|
||||
text :desc
|
||||
text :name, :boost=>4.0
|
||||
text :name
|
||||
end
|
||||
|
||||
belongs_to :thema # Gehört zu einem Thema
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
#
|
||||
|
||||
class Neuigkeit < ActiveRecord::Base
|
||||
attr_accessible :datum, :text, :title, :rubrik_id, :author_id,:picture, :calentries_attributes, :flag_important
|
||||
attr_accessible :datum, :text, :title, :rubrik_id, :author_id,:picture,:picture_cache, :calentries_attributes, :flag_important
|
||||
belongs_to :author, :class_name =>'User'
|
||||
belongs_to :rubrik, :class_name =>'Rubrik', :foreign_key => "rubrik_id"
|
||||
has_one :calendar, through: :rubrik
|
||||
has_one :calendar, through: :rubrik
|
||||
has_many :calentries, as: :object, :dependent=> :destroy
|
||||
has_many :nlinks, :dependent=> :destroy
|
||||
has_many :nlinks, :dependent=> :destroy
|
||||
has_one :meeting
|
||||
has_many :attachments, :as=>:parent
|
||||
has_one :title_pic, :class_name=>"Attachment", :as=>:parent, :conditions=>["attachments.flag_titlepic =?", true]
|
||||
@@ -30,6 +30,7 @@ class Neuigkeit < ActiveRecord::Base
|
||||
translates :title,:text, :versioning=>{:gem=>:paper_trail, :options=>{:fallbacks_for_empty_translations => true}}
|
||||
globalize_accessors :locales => [:de, :en], :attributes =>[:text,:title]
|
||||
mount_uploader :picture, PictureUploader
|
||||
include IsCommentable
|
||||
|
||||
default_scope order(:cache_order).includes(:calentries).includes(:title_pic)
|
||||
scope :recent, -> { published.limit(10)}
|
||||
@@ -44,6 +45,12 @@ class Neuigkeit < ActiveRecord::Base
|
||||
before_validation :sanitize
|
||||
after_save :update_cache
|
||||
attr_accessor :no_fallbacks
|
||||
|
||||
acts_as_flagable
|
||||
|
||||
FLAG_ICONS={"infoscreen" => "fa fa-desktop", "important"=>"fa fa-exclamation"}
|
||||
FLAG_CONFIRM={"infoscreen" => "Neuigkeit am Infoscreen anzeigen"}
|
||||
|
||||
def globalize_fallbacks(locale)
|
||||
if self.no_fallbacks
|
||||
[locale]
|
||||
@@ -53,11 +60,11 @@ class Neuigkeit < ActiveRecord::Base
|
||||
end
|
||||
def read_attribute(name,options={})
|
||||
if translated?(name)
|
||||
a=super(name,options)
|
||||
a=self.translation_for(options[:locale] || I18n.locale).read_attribute(name) if self.no_fallbacks
|
||||
|
||||
a=super(name,options)
|
||||
a=self.translation_for(options[:locale] || I18n.locale).read_attribute(name) if self.no_fallbacks
|
||||
|
||||
a
|
||||
else
|
||||
else
|
||||
super(name)
|
||||
end
|
||||
end
|
||||
@@ -84,7 +91,7 @@ class Neuigkeit < ActiveRecord::Base
|
||||
!self.meeting.nil?
|
||||
end
|
||||
def self.published
|
||||
where("datum <= ? AND datum IS NOT NULL", Time.now.to_date)
|
||||
where("datum <= ? AND datum IS NOT NULL", Time.now.to_date)
|
||||
end
|
||||
|
||||
def datum_nilsave
|
||||
@@ -125,7 +132,17 @@ class Neuigkeit < ActiveRecord::Base
|
||||
"...."
|
||||
else
|
||||
words[0..100].join(" ")+ " ..." unless words.nil?
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
def text_infoscreen_words
|
||||
md = /<p>(?<text>[^\<\>]*)/.match Sanitize.clean(self.text,:elements=>['p'])
|
||||
words=md[:text].split(" ") unless md.nil?
|
||||
if words.nil? || words.empty?
|
||||
"...."
|
||||
else
|
||||
words[0..1000].join(" ")+ " ..." unless words.nil?
|
||||
|
||||
end
|
||||
end
|
||||
def has_calentries?
|
||||
@@ -136,7 +153,7 @@ class Neuigkeit < ActiveRecord::Base
|
||||
end
|
||||
def relevant_calentry
|
||||
ce = self.calentries.min_by{|c| c.days_to_today * 1.3 * ((c.is_past?)? 2:1)} if self.is_event?
|
||||
ce= self.meeting.calentry if self.has_meeting?
|
||||
ce= self.meeting.calentry if self.has_meeting?
|
||||
ce
|
||||
end
|
||||
def update_cache
|
||||
@@ -144,8 +161,8 @@ class Neuigkeit < ActiveRecord::Base
|
||||
self.update_column(:cache_order, (self.meeting.calentry.start.to_date - Date.today).to_i.abs * 1.3)
|
||||
self.update_column(:cache_relevant_date, self.meeting.calentry.start.to_date)
|
||||
self.touch
|
||||
else
|
||||
if self.is_event?
|
||||
else
|
||||
if self.is_event?
|
||||
c = self.calentries.min_by{|c| c.days_to_today * 1.3 * ((c.is_past?)? 2:1)}
|
||||
self.update_column(:cache_order, c.days_to_today * 1.3 * ((c.is_past?)? 2:1))
|
||||
self.update_column(:cache_relevant_date, (c.is_past?) ? c.ende.to_date : c.start.to_date)
|
||||
@@ -177,8 +194,8 @@ class Neuigkeit < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
searchable do
|
||||
text :text
|
||||
text :text
|
||||
text :datum
|
||||
text :title, :boost=>3.0
|
||||
text :title
|
||||
end
|
||||
end
|
||||
|
||||
@@ -42,7 +42,7 @@ end
|
||||
|
||||
searchable do
|
||||
text :desc
|
||||
text :name, :boost=>4.0
|
||||
text :name
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ class Studium < ActiveRecord::Base
|
||||
has_many :lvas, :through=>:moduls
|
||||
has_many :semester, :dependent => :destroy
|
||||
has_many :attachments, :as=>:parent
|
||||
validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$/}
|
||||
validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$/}
|
||||
validates :typ, :inclusion => {:in => ["Bachelor","Master"] }
|
||||
validates :name, :uniqueness => true, :presence=>true
|
||||
validates :zahl, :presence=>true, :format=>{:with=>/^[0-9A-Z]{4,10}$/}, :uniqueness => true
|
||||
@@ -89,7 +89,7 @@ validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$
|
||||
text :zahl
|
||||
text :typ
|
||||
text :abkuerzung
|
||||
text :name, :boost=>3.0
|
||||
text :name
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Survey::Answer < ActiveRecord::Base
|
||||
belongs_to :choice, class_name: 'Survey::Choice'
|
||||
belongs_to :choice, class_name: 'Survey::Choice', touch: true
|
||||
belongs_to :user
|
||||
# attr_accessible :title, :body
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Survey::Choice < ActiveRecord::Base
|
||||
belongs_to :question, class_name: 'Survey::Question'
|
||||
belongs_to :question, class_name: 'Survey::Question', touch: true
|
||||
attr_accessible :picture, :sort, :text, :icon, :picture_cache, :remove_picture, :question_id
|
||||
has_many :answers, class_name: 'Survey::Answer', dependent: :destroy
|
||||
include ActionView::Helpers::TagHelper
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
class Survey::Question < ActiveRecord::Base
|
||||
attr_accessible :text, :title, :typ, :choice_ids, :parent_type, :parent_id
|
||||
belongs_to :parent, polymorphic: true
|
||||
belongs_to :parent, polymorphic: true, touch: true
|
||||
has_many :choices, dependent: :destroy, class_name: "Survey::Choice"
|
||||
has_many :answers, through: :choices
|
||||
include IsCommentable
|
||||
|
||||
@@ -47,7 +47,7 @@ class Thema < ActiveRecord::Base
|
||||
# make topic searchable
|
||||
searchable do
|
||||
text :text
|
||||
text :title, :boost=>4.0
|
||||
text :title
|
||||
end
|
||||
|
||||
resourcify
|
||||
|
||||
@@ -40,7 +40,7 @@ end
|
||||
|
||||
searchable do
|
||||
text :text
|
||||
text :title, :boost=>4.0
|
||||
text :title
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -29,13 +29,34 @@ class User < ActiveRecord::Base
|
||||
# Include default devise modules. Others available are:
|
||||
# :token_authenticatable, :confirmable,
|
||||
# :lockable, :timeoutable and :omniauthable
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable,:omniauthable, :omniauth_providers => [:facebook,:ldap]
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable,:omniauthable, :omniauth_providers => [:facebook,:ldap,:developer]
|
||||
acts_as_voter
|
||||
# Setup accessible (or protected) attributes for your model
|
||||
attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name
|
||||
belongs_to :fetprofile
|
||||
# attr_accessible :title, :body
|
||||
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
|
||||
|
||||
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)
|
||||
logger.debug auth.to_s
|
||||
logger.debug "DDD Username= #{auth.username}"
|
||||
user = User.where(:provider => auth.provider, :uid => auth.uid).first
|
||||
|
||||
@@ -1,33 +1,22 @@
|
||||
<div id="<%= beispiel.divid %>" class="contentbox">
|
||||
<div class="row-fluid">
|
||||
<div class="span6" >
|
||||
<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="span5">
|
||||
|
||||
<%=
|
||||
if can?(:like, beispiel)
|
||||
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
|
||||
else
|
||||
"liked by " + beispiel.get_likes.size.to_s
|
||||
end
|
||||
%>
|
||||
|
||||
<%=
|
||||
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 "Refresh", beispiel_path(beispiel,show_comments: true), remote: true %></br>
|
||||
<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? %>
|
||||
@@ -39,4 +28,5 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render_comments_for(beispiel) %>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<% f.file_field :beispieldatei, :label => "Neue Datei hochladen:"%>
|
||||
<%= f.file_field :beispieldatei, :label => "Neue Datei hochladen:" if @beispiel.beispieldatei.nil? || @beispiel.beispieldatei.blank? %>
|
||||
</div>
|
||||
<%=f.input :datum , :as => :datetimepicker %>
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
|
||||
<div class="row-fluid">
|
||||
<%= f.input :name %>
|
||||
|
||||
<%= f.input :lva if @beispiel.lva.nil?%>
|
||||
<%= f.input :desc %>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<%= f.input :lecturer, :as=>:select, :collection => @beispiel.lva.lecturers %>
|
||||
<%= f.input :lecturer, :as=>:select, :collection => ((@beispiel.lva.nil?|| @beispiel.lva.lecturers.empty?)? Lecturer.all : @beispiel.lva.lecturers) %>
|
||||
</div>
|
||||
<%= f.hidden_field :beispieldatei_cache %>
|
||||
<%= f.actions do %>
|
||||
|
||||
1
app/views/calentries/_mail.html.erb
Normal file
1
app/views/calentries/_mail.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= mail.icon_text %>
|
||||
@@ -9,6 +9,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<% unless search_results.nil? %>
|
||||
<%= search_results %>
|
||||
<%#= search_results %>
|
||||
|
||||
|
||||
<ul>
|
||||
<% search_results.each_hit_with_result do |hit,result| %>
|
||||
<li> <%= link_to result.parent.title+": " + result.name, document_path(result) %>
|
||||
<% hit.highlights(:name).each do |hlgt| %>
|
||||
<%= raw(hlgt.format{|word|"<b>#{word}</b>" } ) %>
|
||||
<%= (hlgt.format{|word|"<b>#{word}</b>" } ).html_safe%>
|
||||
<% end %>
|
||||
<% %>
|
||||
<% hit.highlights(:text).each do |hlgt| %>
|
||||
<%= "text:" + raw(hlgt.format {|word| raw("<b>#{word}</b>") })%>
|
||||
<% hit.highlights(:text).each do |hlgt| %>
|
||||
<%= ("<br>text: " + hlgt.format {|word| "<b>#{word}</b>" }).html_safe%>
|
||||
<% end %>
|
||||
<% hit.highlights(:meeting).each do |hlgt| %>
|
||||
<%= "text:" + raw(hlgt.format {|word| "*#{word}*" })%>
|
||||
<%= "text:" + (hlgt.format {|word| "*#{word}*" }).html_safe%>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
<ul class='breadcrumb hidden-print'>
|
||||
<% @document.versions.each do |v| %>
|
||||
<li>
|
||||
<%= link_to User.find(v.whodunnit).name+": "+ v.event + " (" + I18n.l(v.created_at)+ ") ", write_document_path(@document,:versionid=>v.id) unless v.whodunnit.nil? %>
|
||||
|
||||
<%= link_to User.find(v.whodunnit).try(:name)+": "+ v.event + " (" + I18n.l(v.created_at)+ ") ", write_document_path(@document,:versionid=>v.id) if User.exists?(v.whodunnit) unless v.whodunnit.nil? %>
|
||||
|
||||
<% end %> <span class="divider">/</span></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<%= link_to "weiter" , "http://www.fet.at/etherpad/p/"+@document.ep_pad.id , target: :blank %>
|
||||
<%= link_to "weiter" , "https://www.fet.at/etherpad/p/"+@document.ep_pad.id , target: :blank %>
|
||||
|
||||
3
app/views/emails/daily_reminder.html.erb
Normal file
3
app/views/emails/daily_reminder.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<%=link_to "reminder", daily_reminder_emails_path(params: {send: true}) %>
|
||||
<hr>Subject: <b><%= @mail.subject %></b><br>
|
||||
<%= raw(@mail.body) %>
|
||||
1
app/views/emails/index.html.erb
Normal file
1
app/views/emails/index.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%=link_to "reminder", daily_reminder_emails_path() %>
|
||||
@@ -2,3 +2,4 @@
|
||||
<%= link_to fetprofile, {class: :linkbox} do %>
|
||||
<%= render :partial=>"fetprofiles/compact", :locals=>{:fetprofile=>fetprofile} %>
|
||||
<% end %>
|
||||
<%= root_path() %>
|
||||
|
||||
@@ -51,10 +51,11 @@ end
|
||||
<%= @fetprofile.desc %>
|
||||
</p>
|
||||
<%= render partial: "interninfo", object: @fetprofile if can?(:seeintern, @fetprofile) %>
|
||||
|
||||
<ul>
|
||||
<% @memberships.each do |m| %>
|
||||
<li>
|
||||
<%= link_to m.gremium do %> <%= render m %><% end %>
|
||||
<%= 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>
|
||||
@@ -64,5 +65,13 @@ end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
<% 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>
|
||||
|
||||
@@ -145,7 +145,7 @@ end
|
||||
</div>
|
||||
</div>
|
||||
<%= link_to ff_icon('icon-circle-arrow-down').html_safe, f.datei.url,
|
||||
:class=>"btn-small",title: I18n.t('fotos.download')+': '+f.title, rel: 'tooltip' %>
|
||||
:class=>"btn-small",title: I18n.t('fotos.download')+': '+f.title.to_s, rel: 'tooltip' %>
|
||||
<%= link_to ff_icon('icon-remove-circle').html_safe, gallery_foto_path(@gallery, f),
|
||||
:method => :delete, :class=>"btn-small btn-danger",title: I18n.t('fotos.delete')+': '+f.title, rel: 'tooltip', confirm: I18n.t('fotos.delete')+': '+f.title+', Sicher?' if can?(:delete,f) %>
|
||||
<p></p>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
<p>
|
||||
<%= link_to "user", users_path %>
|
||||
</p>
|
||||
|
||||
<p><%= link_to "emails", emails_path %></p>
|
||||
<% if Fetsite::Application.config.facebookconfig_enabled %>
|
||||
<h2>Facebook Konfiguration</h2>
|
||||
<p><%= link_to "Grant extra FB privileges", user_omniauth_authorize_path(:facebook,:params=>{scope:"manage_pages,publish_actions,email"}), :confirm=>"Wirklich?" %>
|
||||
|
||||
@@ -7,12 +7,14 @@
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
|
||||
<div class="content-wrap content-column" style="max-width:100em;">
|
||||
<div class="content-wrap content-column" style="max-width:90em;">
|
||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||
<%= render partial: "themen/small", object: @starttopic %>
|
||||
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span5">
|
||||
<div class="span4">
|
||||
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
@@ -21,41 +23,43 @@
|
||||
<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 %></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>
|
||||
<ul>
|
||||
|
||||
<% cache("stickytopics_startpage_"+cache_array_key(@stickythemen)) do %>
|
||||
<ul class="linklist">
|
||||
<% @stickythemen.each do |t1| %>
|
||||
<li>
|
||||
<%= link_to t1 do %>
|
||||
<%= render partial: "themen/nlink", object: t %>
|
||||
<%= end %>
|
||||
<%= link_to t1,:class=>:linkbox do %>
|
||||
<%= render partial: "themen/nlink", object: t1 %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</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 class="span7">
|
||||
<ul class="unstyled linkbox-list" style="margin:5px;">
|
||||
|
||||
<div class="span5">
|
||||
<ul class="unstyled linkbox-list">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %> </li>
|
||||
<% end %>
|
||||
</ul>
|
||||
Verschiedene Styles
|
||||
<ul>
|
||||
<li> <%= link_to "Darkblue", home_index_path({:theme=>"darkblue"}) %></li>
|
||||
<li> <%= link_to "Blue1", home_index_path({:theme=>"blue1"}) %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<li> <%= link_to "2003", home_index_path({:theme=>"2003"}) %></li>
|
||||
<li> <%= link_to "white_1", home_index_path({:theme=>"white_1"}) %></li>
|
||||
</ul>
|
||||
<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>
|
||||
|
||||
103
app/views/home/infoscreen.html.erb
Normal file
103
app/views/home/infoscreen.html.erb
Normal file
@@ -0,0 +1,103 @@
|
||||
|
||||
<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>
|
||||
|
||||
<%= content_tag(:iframe,'', width: "100%", height: "100%", name: "targetframe", allowTransparency:"true", scrolling:"no", frameborder:"0", src: "/iframe/infoscreenframe.html") %> <%#header picture/animation %>
|
||||
<div id ="jmpress">
|
||||
<% i=1 %>
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
|
||||
<div class="step" id="step-<%=i%>" data-x="<%= i *2000 %>" data-y="<%= Random.rand(0..5)*200 %>" style="position:absolute; height:540px; width:1230px; display: block;" data-duration="10000">
|
||||
<div class="media" style="width:'95%'; height:480px;" >
|
||||
<div class="pull-left" href="#" style="max-width:250px;">
|
||||
<% unless n.picture_robust.big_thumb.to_s.empty? %>
|
||||
<p>
|
||||
<br><%= link_to image_tag(n.picture_robust.big_thumb),n.picture_robust.try(:url) %></p>
|
||||
<% end %>
|
||||
<h3>
|
||||
<% if n.has_calentries? %>
|
||||
<div href="#">
|
||||
<%= fa_icon("calendar 2x") %>
|
||||
<%= n.relevant_calentry.text %>
|
||||
</div>
|
||||
<% elsif n.has_meeting? %>
|
||||
<div href="#">
|
||||
<%= fa_icon("calendar 2x") %>
|
||||
<%= n.meeting.calentry.text unless n.meeting.calentry.nil? %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="media-body">
|
||||
<h1 itemprop="name">
|
||||
<%= raw(n.title) %> <%#= link_to fa_icon("edit"), edit_rubrik_neuigkeit_path(n.rubrik, n), remote: true if can? :edit, n %>
|
||||
</h1>
|
||||
<div itemprop="articleBody" style="font-size:large">
|
||||
<%= raw(n.text_infoscreen_words) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% i = i+1 %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var d = new Date();
|
||||
var n = d.getDay();
|
||||
var now = d.getHours() + "." + d.getMinutes();
|
||||
var weekdays = [
|
||||
["Sunday"],
|
||||
["Monday", 9.00, 14.00],
|
||||
["Tuesday", 9.00, 14.00],
|
||||
["Wednesday", 9.00, 14.00],
|
||||
["Thursday", 9.00, 14.00],
|
||||
["Friday", 9.00, 12.00],
|
||||
["Saturday"] // we are closed, sorry!
|
||||
];
|
||||
var day = weekdays[n];
|
||||
if (now > day[1] && now < day[2]) {
|
||||
document.write("<div id='footer' style='background: green; height:25px; width:50px; margin:10px; position:absolute'>");
|
||||
document.write("OPEN");
|
||||
document.write("</div>");
|
||||
}
|
||||
else {
|
||||
document.write("<div id='footer' style='background: red; height:25px; width:60px; margin:10px; position:absolute'>");
|
||||
document.write("CLOSED");
|
||||
document.write("</div>");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#jmpress').jmpress({
|
||||
initStep: function(element, eventData) {
|
||||
console.log('We\'re changing to step: #' + $(element).attr('id') + '!');
|
||||
}
|
||||
|
||||
});
|
||||
setTimeout(function(){
|
||||
|
||||
window.location.reload();
|
||||
/* or window.location = window.location.href; */
|
||||
|
||||
}, 100000);
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
@@ -1,21 +1,49 @@
|
||||
<h1> FET Intern NEU </h1>
|
||||
<h1> FET Intern NEU blue2</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<ul class="linklist">
|
||||
<li>
|
||||
<%= 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>
|
||||
</ul>
|
||||
<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>
|
||||
<li>
|
||||
<% @themengruppen.each do |themengruppe| %>
|
||||
<div class="container-fluid">
|
||||
<%= render themengruppe if can?(:show,themengruppe)%>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<%= link_to "Users", users_path %>
|
||||
@@ -23,9 +51,9 @@
|
||||
<div class="span6">
|
||||
<h2>Neuigkeiten</h2>
|
||||
<ul class="unstyled linkbox-list">
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %></li>
|
||||
<% end %>
|
||||
<% @neuigkeiten.each do |n| %>
|
||||
<li><%= render n if can?(:show, n) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<%= current_user.email %> is logged in.
|
||||
|
||||
</li>
|
||||
<li><%= link_to('Logout', destroy_user_session_path, :method => :delete) %> </li>
|
||||
<li><%= link_to('Logout', destroy_user_session_path, :method => :delete,:id => "login_link") %> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= link_to('Login', new_user_session_path) %>
|
||||
<%= link_to('Login', new_user_session_path, id:"login_link") %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
@@ -1,71 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="<%= absurl("/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="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 "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" %>
|
||||
<%= csrf_meta_tags %>
|
||||
<% if content_for?(:header) %>
|
||||
<%= yield :header %>
|
||||
<% else %>
|
||||
<title>Fetsite</title>
|
||||
<% end %>
|
||||
|
||||
<%= 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 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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -44,8 +44,20 @@
|
||||
|
||||
</ul></div>
|
||||
</li>
|
||||
<%= render 'layouts/login' %>
|
||||
</ul>
|
||||
<li>
|
||||
<% if not user_signed_in? %>
|
||||
<% if Rails.env.development? %>
|
||||
<%# link_to I18n.t('home.login'), user_omniauth_authorize_path(:developer) %>
|
||||
<%= render 'layouts/login' %>
|
||||
|
||||
<% 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 %>
|
||||
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<%= content_for :header do %>
|
||||
<title>Fetsite - <%= @lva.full_name %></title>
|
||||
<% set_meta_tags :og => {
|
||||
:url=>lva_path(:theme=>nil)
|
||||
}
|
||||
%>
|
||||
<%= display_meta_tags %>
|
||||
<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'%>
|
||||
@@ -14,106 +12,145 @@
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
<%= 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>
|
||||
<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 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="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>
|
||||
<%= 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_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?(: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 %>
|
||||
<% @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 %>
|
||||
</div>
|
||||
<% 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>
|
||||
<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>
|
||||
<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>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<% @crawlobjects.each do |co| %>
|
||||
<%= render co %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
10
app/views/neuigkeiten/_mail.html.erb
Normal file
10
app/views/neuigkeiten/_mail.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<h1>
|
||||
<%= mail.title%>
|
||||
</h1>
|
||||
<%= content_tag(:img,"",src: "http://" + ActionMailer::Base.default_url_options[:host].to_s + mail.picture.big_thumb.url.to_s) %>
|
||||
<%=url_for controller: "neuigkeiten",action: :show, :id=>mail.id, only_path: false %>
|
||||
<%= raw(mail.text) %>
|
||||
<% mail.questions.each do |q| %>
|
||||
<%= render partial:"survey/questions/mail", object: q %>
|
||||
<% end %>
|
||||
<%= link_to "Auf Fet.at weiterlesen", rubrik_neuigkeit_url(mail.rubrik, mail,:locale=>:de, :theme=>nil) %>
|
||||
60
app/views/neuigkeiten/_menu.html.erb
Normal file
60
app/views/neuigkeiten/_menu.html.erb
Normal file
@@ -0,0 +1,60 @@
|
||||
<div class="toolbar-inline">
|
||||
<%= link_to(fa_icon("edit"), edit_rubrik_neuigkeit_path( menu.rubrik, menu), remote: true , class: "btn", title: "Edit") if can? :edit, menu
|
||||
%>
|
||||
<span class="btn-group">
|
||||
<%= link_to(fa_icon("paperclip"), "#", class: "btn", id: "attachments-form-open", title: "Attachments") if can? :edit, menu
|
||||
%>
|
||||
<%= link_to(fa_icon("calendar-o"), new_calentry_path(:object_id=>menu.id, :object_type=>"Neuigkeit"), :remote=>true, class: :btn) if can? :edit, menu
|
||||
%>
|
||||
<%= link_to(fa_icon("link") , "#", id: "findlink-open",title: "Neue Verknüpfung" , class: "btn") if can? :find_link, menu
|
||||
%>
|
||||
|
||||
</span>
|
||||
|
||||
<%= new_question_for(menu, fa_icon("question")) if can? :new, Survey::Question %>
|
||||
|
||||
<span class=" pull-right">
|
||||
<%= flag_link(menu, "important")%>
|
||||
<%= flag_link(menu, "infoscreen")%>
|
||||
|
||||
<%= link_to(fa_icon("globe"), publish_rubrik_neuigkeit_path(menu.rubrik,menu), title: I18n.t('neuigkeit.publish'), class: "btn") if can?(:publish, menu) && !menu.published?
|
||||
%>
|
||||
<%= link_to(fa_stack("globe","ban"), unpublish_rubrik_neuigkeit_path(menu.rubrik,menu), :remote=>true, class: "btn stacked") if can?(:unpublish, menu) && menu.published?
|
||||
%>
|
||||
<% if menu.published? %>
|
||||
<div class="dropdown" style=" display:inline"">
|
||||
<a class="dropdown-toggle btn" data-toggle="dropdown" title="publish" href="#">
|
||||
<%= fa_icon("mail-forward")%><span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<%= li_tag(link_to(fa_icon("facebook-square") + " post on facebook", publish_to_facebook_rubrik_neuigkeit_path(menu.rubrik,menu))) if can?(:publish, menu) && menu.published?
|
||||
%>
|
||||
|
||||
<%= li_tag(link_to(fa_icon("envelope-o") + " send mail", mail_preview_rubrik_neuigkeit_path(menu.rubrik,menu))) if can?(:publish, menu) && menu.published?
|
||||
%>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="ui-dialog" id="attachments-form">
|
||||
<%= render_new_attachments_for(menu, fa_icon("plus"), {class: "btn"}) %>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
dialogatt = $( "#attachments-form" ).dialog({
|
||||
autoOpen: false,
|
||||
width: "90%",
|
||||
modal: true,
|
||||
title: "Neue Attachments",
|
||||
buttons: {
|
||||
"Fertig": function() {
|
||||
dialogatt.dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#attachments-form-open").on("click",function(){dialogatt.dialog("open")})
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -29,13 +29,18 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="media">
|
||||
<% unless @neuigkeit.picture_robust.big_thumb.to_s.empty? %>
|
||||
<div class="pull-left" href="#">
|
||||
<p><br><%= link_to image_tag(@neuigkeit.picture_robust.big_thumb.url),@neuigkeit.picture_robust.try(:url) %>
|
||||
|
||||
<div class="pull-left" href="#" style="width:200px">
|
||||
<p><br>
|
||||
<% unless @neuigkeit.picture_robust.big_thumb.to_s.empty? %><%= link_to image_tag(@neuigkeit.picture_robust.big_thumb.url),@neuigkeit.picture_robust.try(:url) %>
|
||||
<% end %>
|
||||
<%= f.input :picture, as: :uploader %>
|
||||
<%= f.hidden_field :picture_cache %>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="media-body">
|
||||
|
||||
<div class="media-body" style="border: dashed black thin">
|
||||
<h1 itemprop="name" class="editable_simple" data-target="#neuigkeit_title">
|
||||
<%= raw(@neuigkeit.title) %>
|
||||
</h1>
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
<div id="neuigkeit_<%= neuigkeit_view.id %>" class="contentbox" itemscope itemtype="http://schema.org/Article">
|
||||
<meta itemprop="about" content="<%= neuigkeit_view.text_first_words %>"/>
|
||||
<meta itemprop="sameAs" content="<%= neuigkeit_url(neuigkeit_view,:theme=>nil)%>"/>
|
||||
<meta itemprop="url" content="<%= neuigkeit_url(neuigkeit_view,:theme=>nil)%>"/>
|
||||
<% 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 class="media">
|
||||
<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>
|
||||
@@ -15,8 +28,9 @@
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% unless neuigkeit_view.published? %>
|
||||
<div class="sticker sticker-red"> Not Published <%= link_to "Publish", publish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit),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 %>
|
||||
<% unless neuigkeit_view.origurl.nil? || neuigkeit_view.origurl.empty? %>
|
||||
<div class="alert"><%= link_to "Zitiert von "+ neuigkeit_view.origurl, neuigkeit_view.origurl %>
|
||||
@@ -31,7 +45,7 @@
|
||||
<% 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 %>
|
||||
<%= 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) %>
|
||||
@@ -40,14 +54,19 @@
|
||||
</div>
|
||||
|
||||
<%= render_calentries_for(neuigkeit_view)%>
|
||||
|
||||
<%= new_calentry_div(neuigkeit_view) %>
|
||||
<% unless neuigkeit_view.meeting.nil? %>
|
||||
<%= render neuigkeit_view.meeting %>
|
||||
<% end%>
|
||||
|
||||
|
||||
|
||||
<%= render_attachments_for(neuigkeit_view) %>
|
||||
|
||||
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||
</div>
|
||||
<%= render_attachments_list_for(neuigkeit_view) %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<% @questions.each do |q| %>
|
||||
<%= render q if can? :show, q %>
|
||||
<% end %>
|
||||
|
||||
5
app/views/neuigkeiten/mail_preview.html.erb
Normal file
5
app/views/neuigkeiten/mail_preview.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<%= link_to "send", mail_preview_rubrik_neuigkeit_path(@neuigkeit) %>
|
||||
<%= raw(@mail.subject) %>
|
||||
|
||||
<hr />
|
||||
<%= raw(@mail.body) %>
|
||||
@@ -38,19 +38,15 @@
|
||||
</p>
|
||||
<%= 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 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 %>
|
||||
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||
<%= render partial: 'neuigkeiten/nlink_list_whole', :object=>@neuigkeit.nlinks %>
|
||||
<% end %>
|
||||
|
||||
<div id="findlink-body" class="ui-dialog" style="">
|
||||
@@ -62,6 +58,7 @@
|
||||
<%= render partial: 'nlink_list_search_whole', object: @nlink_search %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
dialog = $( "#findlink-body" ).dialog({
|
||||
|
||||
13
app/views/news_mailer/daily_reminder.html.erb
Normal file
13
app/views/news_mailer/daily_reminder.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<%= stylesheet_link_tag "http://"+ActionMailer::Base.default_url_options[:host].to_s + "/assets/themes/blue2/application.css", :media=>"all" %>
|
||||
|
||||
<% @calentries.each do |ce| %>
|
||||
|
||||
<% if can?(:show , ce.object) %>
|
||||
<hr/>
|
||||
<h1> <%= render partial: "calentries/mail", object: ce %>
|
||||
</h1>
|
||||
<%= render partial: "neuigkeiten/mail", object: ce.object if ce.object.kind_of?(Neuigkeit)%>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<hr/>
|
||||
@@ -4,7 +4,7 @@
|
||||
<h1>
|
||||
<%= @neuigkeit.title%>
|
||||
</h1>
|
||||
<%= content_tag(:img,"",src: "http://"+ActionMailer::Base.default_url_options[:host].to_s+@neuigkeit.picture.big_thumb.url) %>
|
||||
<%= content_tag(:img,"",src: "http://"+ActionMailer::Base.default_url_options[:host].to_s+@neuigkeit.picture.big_thumb.url.to_s) %>
|
||||
<%=url_for controller: "neuigkeiten",action: :show, :id=>@neuigkeit.id, only_path: false %>
|
||||
<%= raw(@neuigkeit.text) %>
|
||||
<% @neuigkeit.questions.each do |q| %>
|
||||
|
||||
@@ -33,16 +33,17 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% unless @calentries.nil? or @calentries.empty? or true%>
|
||||
<div class="span3">
|
||||
|
||||
<% 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 %>
|
||||
<%= render 'calendars/calentries', :object=>@calentries %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if !current_user.nil? and current_user.has_role?(:fetuser) %>
|
||||
<%= link_to calendars_url(:format=>:ics, :key=>Key.find_or_create(current_user,1).uuid) , calendars_path(:format=>:ics, :key=>Key.find_or_create(current_user,1).uuid)%>
|
||||
<% end %>
|
||||
</div>
|
||||
</div><% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="content-wrap content-column" style="max-width:90em;">
|
||||
<h1><%= I18n.t('home.willkommen') %></h1>
|
||||
<%= raw(@starttopic.text) %>
|
||||
<%= raw(@starttopic.text) unless @starttopic.nil? %>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
@@ -26,7 +26,7 @@
|
||||
<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 %></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>
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<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>
|
||||
@@ -1,67 +0,0 @@
|
||||
<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) %>
|
||||
|
||||
|
||||
<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 %></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 linklist">
|
||||
<% @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>
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<h1> FET Intern NEU blue2</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<div>
|
||||
<ul class="linklist_block">
|
||||
<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>
|
||||
</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>
|
||||
@@ -1,65 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="shortcut icon" href="<%= absurl("/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>
|
||||
@@ -1,62 +0,0 @@
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<!-- <a class="brand" href="#"><% t 'home.mtitle'%></a>-->
|
||||
<a class ="btn btn-navbar" data-toggle="collapse" data-parent="#menudiv" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_path %>
|
||||
</li>
|
||||
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
||||
|
||||
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
|
||||
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
|
||||
<% 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>
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
<%= 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) %>
|
||||
<% @questions.each do |q| %>
|
||||
<%= render q if can? :show, q %>
|
||||
<% 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>
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
<div class="toolbar-inline">
|
||||
<%= link_to(fa_icon("edit"), edit_rubrik_neuigkeit_path( @neuigkeit.rubrik, @neuigkeit), remote: true , class: "btn", title: "Edit") if can? :edit, @neuigkeit
|
||||
%>
|
||||
<span class="btn-group">
|
||||
<%= link_to(fa_icon("paperclip"), "#", \
|
||||
class: "btn", id: "attachments-form-open", title: "Attachments") \
|
||||
if can? :edit, @neuigkeit
|
||||
%>
|
||||
<%= link_to(fa_icon("calendar-o"), \
|
||||
new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), \
|
||||
:remote=>true, class: :btn) \
|
||||
if can? :edit, @neuigkeit
|
||||
%>
|
||||
<%= link_to(fa_icon("link") , "#", \
|
||||
id: "findlink-open",title: "Neue Verknüpfung" , class: "btn") \
|
||||
if can? :find_link, @neuigkeit
|
||||
%>
|
||||
|
||||
</span>
|
||||
|
||||
<%= new_question_for(@neuigkeit, fa_icon("question")) if can? :new, Survey::Question %>
|
||||
|
||||
<span class=" pull-right">
|
||||
<%= link_to(fa_icon("globe"), \
|
||||
publish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit), \
|
||||
title: I18n.t('neuigkeit.publish'), class: "btn") \
|
||||
if can?(:publish, @neuigkeit) && !@neuigkeit.published?
|
||||
%>
|
||||
<%= link_to (fa_stack("globe","ban"), \
|
||||
unpublish_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit), \
|
||||
:remote=>true, class: "btn stacked") \
|
||||
if can?(:unpublish, @neuigkeit) && @neuigkeit.published?
|
||||
%>
|
||||
<% if @neuigkeit.published? %>
|
||||
<div class="dropdown" style=" display:inline"">
|
||||
<a class="dropdown-toggle btn" data-toggle="dropdown" title="publish" href="#">
|
||||
<%= fa_icon("mail-forward")%><span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<%= li_tag(link_to(fa_icon("facebook-square") + " post on facebook", \
|
||||
publish_to_facebook_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit))) \
|
||||
if can?(:publish, @neuigkeit) && @neuigkeit.published?
|
||||
%>
|
||||
|
||||
<%= li_tag(link_to(fa_icon("envelope-o") + " send mail", \
|
||||
mail_to_fet_rubrik_neuigkeit_path(@neuigkeit.rubrik,@neuigkeit))) \
|
||||
if can?(:publish, @neuigkeit) && @neuigkeit.published?
|
||||
%>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="ui-dialog" id="attachments-form">
|
||||
<%= render_new_attachments_for(@neuigkeit, fa_icon("plus"), {class: "btn"}) %>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
dialogatt = $( "#attachments-form" ).dialog({
|
||||
autoOpen: false,
|
||||
width: "90%",
|
||||
modal: true,
|
||||
title: "Neue Attachments",
|
||||
buttons: {
|
||||
"Fertig": function() {
|
||||
dialogatt.dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#attachments-form-open").on("click",function(){dialogatt.dialog("open")})
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<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() do %>
|
||||
<%= render partial: "menu" %>
|
||||
<% 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.rubrik,@neuigkeit),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 %>
|
||||
@@ -1,76 +0,0 @@
|
||||
<%= 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>
|
||||
|
||||
|
||||
<%= 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>
|
||||
@@ -33,7 +33,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<%= semantic_fields_for "users[#{user.id}]", user do |f|%>
|
||||
<%= f.input :fetprofile ,:label=>false , :as=>:select , :collection=>Fetprofile.all %>
|
||||
<%= f.input :fetprofile ,:label=>false , :as=>:select , :collection=>Fetprofile.order(:vorname,:nachname) %>
|
||||
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@@ -16,7 +16,7 @@ Fetsite::Application.configure do
|
||||
# Don't care if the mailer can't send
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
config.action_mailer.delivery_method =:sendmail
|
||||
config.action_mailer.default_url_options = {}#{:host=> "localhost", :port=>3000} # :host => 'glonass.htu.tuwien.ac.at' }
|
||||
config.action_mailer.default_url_options = {:host=> "localhost", :port=>3000} # :host => 'glonass.htu.tuwien.ac.at' }
|
||||
# Print deprecation notices to the Rails logger
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Fetsite::Application.configure do
|
||||
# config.force_ssl = true
|
||||
|
||||
# See everything in the log (default is :info)
|
||||
config.log_level = :debug
|
||||
config.log_level = :info
|
||||
|
||||
# Prepend all log lines with the following tags
|
||||
config.log_tags = [ :remote_ip , :uuid ]
|
||||
@@ -66,6 +66,6 @@ Fetsite::Application.configure do
|
||||
# with SQLite, MySQL, and PostgreSQL)
|
||||
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
||||
|
||||
config.facebookconfig_enabled=true
|
||||
config.facebookconfig_enabled=false
|
||||
|
||||
end
|
||||
|
||||
0
config/etherpad/APIKEY.txt.example
Normal file
0
config/etherpad/APIKEY.txt.example
Normal file
@@ -1 +1 @@
|
||||
Rails.application.config.assets.precompile += ['blueimp-gallery-all.js']
|
||||
Rails.application.config.assets.precompile += ['blueimp-gallery-all.js', 'jmpress.js']
|
||||
|
||||
@@ -225,6 +225,7 @@ Devise.setup do |config|
|
||||
# up on your models and hooks.
|
||||
#config.omniauth :facebook, 'appid', 'secret'
|
||||
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 :ldap, :title => "My LDAP",
|
||||
:host => secrets["ldap"]["host"],
|
||||
@@ -236,6 +237,8 @@ Devise.setup do |config|
|
||||
:bind_dn =>secrets["ldap"]['bind'],
|
||||
:password => secrets["ldap"]['password']
|
||||
|
||||
|
||||
|
||||
# ==> Warden configuration<<
|
||||
# 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.
|
||||
|
||||
74
config/initializers/sunspot.rb
Normal file
74
config/initializers/sunspot.rb
Normal file
@@ -0,0 +1,74 @@
|
||||
# config/initializers/sunspot.rb
|
||||
module Sunspot
|
||||
#
|
||||
# DataExtractors present an internal API for the indexer to use to extract
|
||||
# field values from models for indexing. They must implement the #value_for
|
||||
# method, which takes an object and returns the value extracted from it.
|
||||
#
|
||||
module DataExtractor #:nodoc: all
|
||||
#
|
||||
# AttributeExtractors extract data by simply calling a method on the block.
|
||||
#
|
||||
class AttributeExtractor
|
||||
def initialize(attribute_name)
|
||||
@attribute_name = attribute_name
|
||||
end
|
||||
|
||||
def value_for(object)
|
||||
Filter.new( object.send(@attribute_name) ).value
|
||||
end
|
||||
end
|
||||
#
|
||||
# BlockExtractors extract data by evaluating a block in the context of the
|
||||
# object instance, or if the block takes an argument, by passing the object
|
||||
# as the argument to the block. Either way, the return value of the block is
|
||||
# the value returned by the extractor.
|
||||
#
|
||||
class BlockExtractor
|
||||
def initialize(&block)
|
||||
@block = block
|
||||
end
|
||||
|
||||
def value_for(object)
|
||||
Filter.new( Util.instance_eval_or_call(object, &@block) ).value
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Constant data extractors simply return the same value for every object.
|
||||
#
|
||||
class Constant
|
||||
def initialize(value)
|
||||
@value = value
|
||||
end
|
||||
|
||||
def value_for(object)
|
||||
Filter.new(@value).value
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# A Filter to allow easy value cleaning
|
||||
#
|
||||
class Filter
|
||||
def initialize(value)
|
||||
@value = value
|
||||
end
|
||||
def value
|
||||
strip_control_characters @value
|
||||
end
|
||||
def strip_control_characters(value)
|
||||
return value unless value.is_a? String
|
||||
|
||||
value.chars.inject("") do |str, char|
|
||||
unless char.ascii_only? and (char.ord < 32 or char.ord == 127)
|
||||
str << char
|
||||
end
|
||||
str
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -16,6 +16,7 @@ de:
|
||||
savecont: "Zwischenspeichern"
|
||||
intern: "Intern"
|
||||
manage: "Verwalten"
|
||||
new: "Neu"
|
||||
home:
|
||||
sprache: "Deutsch"
|
||||
kontakt: "Kontakt"
|
||||
|
||||
@@ -6,6 +6,7 @@ de:
|
||||
active_members: "Aktive Mitglieder"
|
||||
notactive_members: "Pension"
|
||||
new_profile: "Neues Profil anlegen"
|
||||
new: "Neues Profil anlegen"
|
||||
gremium:
|
||||
new: "Neues Gremium"
|
||||
seit: "seit"
|
||||
|
||||
@@ -8,7 +8,20 @@
|
||||
resources :comments, contstraints: {id: /[0-9]+/}, only: :show
|
||||
|
||||
|
||||
|
||||
## Inserted for testing tests
|
||||
resources :members , controller: :fetprofiles , as: :fetprofiles do
|
||||
collection do
|
||||
get 'verwalten'
|
||||
get 'internlist'
|
||||
end
|
||||
end
|
||||
resources :gremien do
|
||||
collection do
|
||||
get 'verwalten'
|
||||
end
|
||||
end
|
||||
#
|
||||
# #-------------------------
|
||||
|
||||
namespace :survey do
|
||||
resources :questions do
|
||||
@@ -26,7 +39,12 @@
|
||||
themes_for_rails
|
||||
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
|
||||
resources :home, :only=>[:index] do
|
||||
end
|
||||
end
|
||||
resources :emails, :only=>[:index] do
|
||||
collection do
|
||||
get :daily_reminder
|
||||
end
|
||||
end
|
||||
get ':locale', constraints: {locale: /en|de/}, action: :language,controller: :home, as: "language"
|
||||
scope '(:locale)/admin' do
|
||||
resources :users, :only=>[] do
|
||||
@@ -35,6 +53,7 @@
|
||||
post :all_update
|
||||
end
|
||||
member do
|
||||
get :set_preferred_theme
|
||||
get :fb_set_default_publish_page
|
||||
end
|
||||
end
|
||||
@@ -53,6 +72,7 @@
|
||||
end
|
||||
end
|
||||
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
|
||||
@@ -60,6 +80,7 @@
|
||||
scope '(t/:theme)' do
|
||||
get "" , controller: :home, action: :index
|
||||
get "intern" , controller: :home, action: :intern
|
||||
get "infoscreen" , controller: :home, action: :infoscreen
|
||||
get "beispielsammlung", to: redirect('/studien')
|
||||
scope '(:ansicht)' do
|
||||
resources :studien, :only=>[:new,:edit,:update,:destroy,:show] do
|
||||
@@ -125,12 +146,12 @@
|
||||
get 'verwalten'
|
||||
end
|
||||
end
|
||||
resources :fetprofiles, as: :fetprofiles_bak do
|
||||
collection do
|
||||
get 'verwalten'
|
||||
get 'internlist'
|
||||
end
|
||||
end
|
||||
# resources :fetprofiles, as: :fetprofiles_bak do
|
||||
# collection do
|
||||
# get 'verwalten'
|
||||
# get 'internlist'
|
||||
# end
|
||||
# end
|
||||
resources :members , controller: :fetprofiles , as: :fetprofiles do
|
||||
collection do
|
||||
get 'verwalten'
|
||||
@@ -165,7 +186,7 @@
|
||||
get 'publish_to_facebook'
|
||||
get 'mail_to_fet'
|
||||
get 'mail_preview'
|
||||
|
||||
get 'flag'
|
||||
end
|
||||
collection do
|
||||
get 'newsletter_preview'
|
||||
|
||||
@@ -10,11 +10,16 @@ production:
|
||||
|
||||
development:
|
||||
solr:
|
||||
hostname: localhost
|
||||
port: 8982
|
||||
hostname: triton-amp.local
|
||||
port: 8080
|
||||
log_level: INFO
|
||||
path: /solr/development
|
||||
|
||||
path: /solr/mycore
|
||||
# solr:
|
||||
# hostname: localhost
|
||||
# port: 8983
|
||||
# log_level: INFO
|
||||
# path: /solr/mycore
|
||||
|
||||
test:
|
||||
solr:
|
||||
hostname: localhost
|
||||
|
||||
45
config/unicorn.rb
Normal file
45
config/unicorn.rb
Normal file
@@ -0,0 +1,45 @@
|
||||
# config/unicorn.rb
|
||||
|
||||
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 5)
|
||||
timeout 60
|
||||
preload_app true
|
||||
listen "/var/run/fetsite.sock"
|
||||
stderr_path "/var/log/unicorn.log"
|
||||
stdout_path "/var/log/unicorn.log"
|
||||
|
||||
before_fork do |server, worker|
|
||||
Signal.trap 'TERM' do
|
||||
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
|
||||
Process.kill 'QUIT', Process.pid
|
||||
end
|
||||
|
||||
defined?(ActiveRecord::Base) and
|
||||
ActiveRecord::Base.connection.disconnect!
|
||||
end
|
||||
|
||||
after_fork do |server, worker|
|
||||
Signal.trap 'TERM' do
|
||||
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
|
||||
end
|
||||
|
||||
defined?(ActiveRecord::Base) and
|
||||
ActiveRecord::Base.establish_connection
|
||||
begin
|
||||
uid, gid = Process.euid, Process.egid
|
||||
user, group = 'fetsite', 'nogroup'
|
||||
target_uid = Etc.getpwnam(user).uid
|
||||
target_gid = Etc.getgrnam(group).gid
|
||||
worker.tmp.chown(target_uid, target_gid)
|
||||
if uid != target_uid || gid != target_gid
|
||||
Process.initgroups(user, target_gid)
|
||||
Process::GID.change_privilege(target_gid)
|
||||
Process::UID.change_privilege(target_uid)
|
||||
end
|
||||
rescue => e
|
||||
if RAILS_ENV == 'development'
|
||||
STDERR.puts "couldn't change user, oh well"
|
||||
else
|
||||
raise e
|
||||
end
|
||||
end
|
||||
end
|
||||
7
db/migrate/20150913090628_add_infoscreen_to_neuigkeit.rb
Normal file
7
db/migrate/20150913090628_add_infoscreen_to_neuigkeit.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class AddInfoscreenToNeuigkeit < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :neuigkeiten, :flag_infoscreen, :boolean, default: false
|
||||
add_column :themen, :flag_infoscreen, :boolean, default: false
|
||||
|
||||
end
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
ruby_command="ruby"
|
||||
rake_command="rake"
|
||||
bundler_command="bundler"
|
||||
bundler_command="bundle"
|
||||
|
||||
# Are the necessary programs installed?
|
||||
command -v $ruby_command >/dev/null 2>&1 || { echo >&2 "The given ruby command does not exist. Please change the command or install ruby"; exit 1; }
|
||||
@@ -14,19 +14,21 @@ echo "Generating base configs..."
|
||||
# Generate clean config files if they don't exist
|
||||
cp -u config/database.yml.example config/database.yml
|
||||
cp -u config/omniauth_secrets.yml.example config/omniauth_secrets.yml
|
||||
|
||||
touch config/crawl_config.yml
|
||||
echo "Bundle install..."
|
||||
# Run Bundler
|
||||
$bundler_command install || {echo "Bundler failed. Please run \"$bundle\_command install\" seperately and debug the errors, before running this script again";exit 1;}
|
||||
$bundler_command install || { echo "Bundler failed. Please run \"$bundle\_command install\" seperately and debug the errors, before running this script again";exit 1; }
|
||||
|
||||
echo "Migrate the database..."
|
||||
# Run the migration
|
||||
$rake_command db:migrate ||{echo "Migration failed. Please run \"$rake\_command db:migrate\" seperately and debug the errors, before running this script again"; exit 1;}
|
||||
$rake_command db:migrate || { echo "Migration failed. Please run \"$rake\_command db:migrate\" seperately and debug the errors, before running this script again"; exit 1; }
|
||||
|
||||
|
||||
echo "Start the sunspot server"
|
||||
# Run Sunspot
|
||||
$rake_command sunspot:solr:stop &> /dev/null
|
||||
$rake_command sunspot:solr:start || exit 1
|
||||
bundle exec sunspot-solr start -p 8982
|
||||
|
||||
# Topic 1 is supposed to be the startpage topic
|
||||
if [ ! -f config/start_topic.yml ]; then
|
||||
@@ -34,7 +36,7 @@ if [ ! -f config/start_topic.yml ]; then
|
||||
echo "1" > config/start_topic.yml
|
||||
fi
|
||||
|
||||
# Generate fetadmin user "admin@fet.at", password: 12345678
|
||||
touch config/crawl_config.yml
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
public/assets/infoscreen_header_provisorisch.png
Normal file
BIN
public/assets/infoscreen_header_provisorisch.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
134
public/assets/infoscreenframe.css
Normal file
134
public/assets/infoscreenframe.css
Normal file
@@ -0,0 +1,134 @@
|
||||
html {
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
height: 100vh;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 200px;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
svg {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
.impulsPath {
|
||||
fill: none;
|
||||
stroke: #04669c;
|
||||
stroke-miterlimit: 1;
|
||||
stroke-width: 6px;
|
||||
stroke-dasharray: 1946.243;
|
||||
stroke-dashoffset: 0;
|
||||
stroke-linejoin: round;
|
||||
stroke-linecap: round;
|
||||
animation: dash 10s ease-out infinite;
|
||||
animation-direction: normal;
|
||||
}
|
||||
|
||||
.FET-logotext-stroke {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
#FET-logotext {
|
||||
opacity: 0;
|
||||
animation: logotext 10s ease-in infinite;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.content-area {
|
||||
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
background-color: #04669c;
|
||||
padding-bottom: 10px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
color: #fff;
|
||||
flex-basis: bottom;
|
||||
}
|
||||
|
||||
.footer h3,
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
font-family: Helvetica, Arial;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.footer h3 {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.footer .adress {
|
||||
margin: auto;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.footer .contact {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer .servicecontainer{
|
||||
display: inline-flex;
|
||||
margin: auto;
|
||||
|
||||
}
|
||||
.footer .servicecontainer .servicetime {
|
||||
margin: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.footer .servicecontainer .servicetime #time {
|
||||
font-size: 0.7em
|
||||
}
|
||||
|
||||
.footer .servicecontainer .servicestatus{
|
||||
margin: auto;
|
||||
width:20px;
|
||||
height: 100%
|
||||
padding-right: 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*K E Y F R A M E S*/
|
||||
|
||||
@keyframes dash {
|
||||
from {
|
||||
stroke-dashoffset: 1946.243;
|
||||
opacity: 0;
|
||||
stroke-width: 0.5;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
stroke-dashoffset: 0;
|
||||
stroke-width: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes logotext {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
134
public/iframe/infoscreenframe.css
Normal file
134
public/iframe/infoscreenframe.css
Normal file
@@ -0,0 +1,134 @@
|
||||
html {
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: wrap;
|
||||
height: 100vh;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.header {
|
||||
height: 200px;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
svg {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
.impulsPath {
|
||||
fill: none;
|
||||
stroke: #04669c;
|
||||
stroke-miterlimit: 1;
|
||||
stroke-width: 6px;
|
||||
stroke-dasharray: 1946.243;
|
||||
stroke-dashoffset: 0;
|
||||
stroke-linejoin: round;
|
||||
stroke-linecap: round;
|
||||
animation: dash 10s ease-out infinite;
|
||||
animation-direction: normal;
|
||||
}
|
||||
|
||||
.FET-logotext-stroke {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
#FET-logotext {
|
||||
opacity: 0;
|
||||
animation: logotext 10s ease-in infinite;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.content-area {
|
||||
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
background-color: #04669c;
|
||||
padding-bottom: 10px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
color: #fff;
|
||||
flex-basis: bottom;
|
||||
}
|
||||
|
||||
.footer h3,
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
font-family: Helvetica, Arial;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.footer h3 {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.footer .adress {
|
||||
margin: auto;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.footer .contact {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer .servicecontainer{
|
||||
display: inline-flex;
|
||||
margin: auto;
|
||||
|
||||
}
|
||||
.footer .servicecontainer .servicetime {
|
||||
margin: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.footer .servicecontainer .servicetime #time {
|
||||
font-size: 0.7em
|
||||
}
|
||||
|
||||
.footer .servicecontainer .servicestatus{
|
||||
margin: auto;
|
||||
width:20px;
|
||||
height: 100%
|
||||
padding-right: 30px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*K E Y F R A M E S*/
|
||||
|
||||
@keyframes dash {
|
||||
from {
|
||||
stroke-dashoffset: 1946.243;
|
||||
opacity: 0;
|
||||
stroke-width: 0.5;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
stroke-dashoffset: 0;
|
||||
stroke-width: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes logotext {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
104
public/iframe/infoscreenframe.html
Normal file
104
public/iframe/infoscreenframe.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Infoscreen</title>
|
||||
<style media="screen">
|
||||
pre.code {
|
||||
-moz-border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
background: #181818;
|
||||
border: solid 2px #181818;
|
||||
}
|
||||
|
||||
#codelines {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#svg {
|
||||
-moz-border-radius: 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
border: solid 2px #ccc;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
font: 1em source-sans-pro, Source Sans Pro, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="./infoscreenframe.css">
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="header">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 200">
|
||||
<path id="impulsPath" class="impulsPath" d="M0,61.43H1018c2.41,0,6.77-2.28,9.12-2.28,2.66,0,8.3,6.58,11.65,6.58,3.16,0,7.47-15.07,10-15.07,4.3,0,10.38,29.62,14.18,29.62s11.89-55.47,13.67-55.47c5.32,0,10.63,86.34,14.18,86.34,4.3,0,10.63-111.15,13.42-111.15,3.54,0,8.86,123.56,13.17,123.56,3.8,0,8.36-116.85,13.55-116.85,3.42,0,8.74,100,13.67,100,3.67,0,9.24-71.15,12.91-71.15,3.42,0,10.51,41.78,12.91,41.78,3.42,0,8.48-24.56,12.41-24.56,4.43,0,7.93,12.91,12.41,12.91,5.7,0,8.3-6.58,11.65-6.58s6.77,2.28,9.12,2.28h64"/>
|
||||
<g id="FET-logotext"><g id="F"><path d="M1042,82.71l12.7-35.9v-.1c.2-.3,3.8-8.5,13.1-9.6h37.9l-4,11.6h-25.8a7.19,7.19,0,0,0-4.8,3.7l-.6,1.6h14.1l-4.1,11.7h-14l-6.1,17Z"/><path class="FET-logotext-stroke" d="M1102.9,39l-2.6,7.6h-24.6a9.18,9.18,0,0,0-6.4,5l-1.6,4.4h14.1l-2.7,7.7h-14l-6.1,17h-14.2l11.7-33.2s3.3-7.5,11.5-8.5h34.9m5.7-4h-40.9c-10.4,1.3-14.5,10.4-14.7,10.8l-.1.1V46L1041,79.31l-1.9,5.3h22.7l.9-2.7,5.1-14.4H1082l.9-2.7,2.7-7.7,1.9-5.3h-13.7a5.48,5.48,0,0,1,2.3-1.4h27.1l.9-2.7,2.6-7.6,1.9-5.1Z"/></g><g id="E"><path d="M1101.3,82.71h-.2a8.59,8.59,0,0,1-6.2-3.8,9.86,9.86,0,0,1-.7-7.9l8.8-24.9.1-.1c.2-.3,4.3-8.1,13.3-9H1154l-4,11.7-26-.1a7.1,7.1,0,0,0-4.6,3.7l-.6,1.7h14.1l-4.1,11.7h-14.2l-1.1,3.1a2.37,2.37,0,0,0,.2,1.6,2.23,2.23,0,0,0,1.2.7h27l-4,11.7h-36.6Z"/><path class="FET-logotext-stroke" d="M1151.2,39l-2.6,7.7-24.8-.1a9.21,9.21,0,0,0-6.2,5l-1.7,4.4H1130l-2.7,7.7h-14.1l-1.6,4.5s-1.1,4.1,3,4.9H1139l-2.6,7.7h-35c-7.8-1.3-5.3-9.1-5.3-9.1l8.7-24.6s3.7-7.1,11.7-7.9l34.7-.2m5.6-4h-40.6c-10.1,1-14.7,9.7-14.9,10l-.1.3-.1.3-8.7,24.6v.2c-.2.5-1.6,5.4.9,9.6a10.41,10.41,0,0,0,7.5,4.7l.3.1h38.2l.9-2.7,2.6-7.7,1.8-5.3h-29l.5-1.4h14.1l.9-2.7,2.7-7.7,1.9-5.3H1122a6.42,6.42,0,0,1,2.2-1.4l24.3.1h2.9l.9-2.7,2.6-7.7,1.9-5.3Z"/></g><g id="T"><path d="M1154.3,82.71l12-34-15.1-.1.9-2.6a14.39,14.39,0,0,1,11.5-9H1204l-4.1,11.7h-15l-12.1,34.1h-18.5Z"/><path class="FET-logotext-stroke" d="M1201.2,38.91l-2.7,7.7h-15l-12.1,34.1h-14.3l12-34-15.1-.1a12.54,12.54,0,0,1,9.9-7.7h37.3m5.7-4h-43.6a16.53,16.53,0,0,0-13.1,10.3l-1.8,5.3h5.6l9.5.1-10.1,28.7-1.9,5.3h22.7l.9-2.7,11.1-31.4h15l.9-2.7,2.7-7.7,2.1-5.2Z"/></g></g>
|
||||
</svg>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="content-area">
|
||||
<!-- Inhaltsbereich -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<div class="adress">
|
||||
<h3>Fachschaft Elektrotechnik</h3><br>
|
||||
<p>Gußhausstraße 25-27<br>Room CD 01 09 (1st floor)<br>1040 Vienna</p>
|
||||
</div>
|
||||
<div class="contact">
|
||||
<h3>Contact</h3><br>
|
||||
<p>E-Mail: service@fet.at<br>Phone: +43-1-58801 49553<br></p>
|
||||
</div>
|
||||
<div class="servicecontainer">
|
||||
<div class="servicetime">
|
||||
<h3>Service times</h3><br>
|
||||
<p style="text-align: right">Mon to Thur: 9am to 02pm<br>Fri: 9am to 12am<br>
|
||||
<span id="time"></span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="servicestatus">
|
||||
<!-- <svg class="servicestatusled">
|
||||
<circle id="servicestatusled" cx="10" cy="15" r="10" style="fill: red" />
|
||||
</svg> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var today = new Date();
|
||||
today = today;
|
||||
document.getElementById('time').innerHTML = today;
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -60,11 +60,17 @@
|
||||
<fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
|
||||
<!-- *** This fieldType is used by Sunspot! *** -->
|
||||
<fieldType name="text" class="solr.TextField" omitNorms="false">
|
||||
<analyzer>
|
||||
<tokenizer class="solr.StandardTokenizerFactory"/>
|
||||
<filter class="solr.StandardFilterFactory"/>
|
||||
<analyzer type="index">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
<filter class="solr.PorterStemFilterFactory"/>
|
||||
<filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="30"/>
|
||||
<filter class="solr.TrimFilterFactory" />
|
||||
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="30"/>
|
||||
</analyzer>
|
||||
<analyzer type="query">
|
||||
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
||||
<filter class="solr.LowerCaseFilterFactory"/>
|
||||
<filter class="solr.TrimFilterFactory" />
|
||||
</analyzer>
|
||||
</fieldType>
|
||||
<!-- *** This fieldType is used by Sunspot! *** -->
|
||||
|
||||
@@ -1,160 +1,185 @@
|
||||
require 'spec_helper'
|
||||
|
||||
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
||||
# It demonstrates how one might use RSpec to specify the controller code that
|
||||
# was generated by Rails when you ran the scaffold generator.
|
||||
#
|
||||
# It assumes that the implementation code is generated by the rails scaffold
|
||||
# generator. If you are using any extension libraries to generate different
|
||||
# controller code, this generated spec may or may not pass.
|
||||
#
|
||||
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
||||
# of tools you can use to make these specs even more expressive, but we're
|
||||
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
||||
#
|
||||
# Compared to earlier versions of this generator, there is very limited use of
|
||||
# stubs and message expectations in this spec. Stubs are only used when there
|
||||
# is no simpler way to get a handle on the object needed for the example.
|
||||
# Message expectations are only used when there is no simpler way to specify
|
||||
# that an instance is receiving a specific message.
|
||||
describe FetprofilesController, :type => :controller do
|
||||
let(:valid_update_attributes) { {"vorname"=>"Neuer Vorname"} }
|
||||
# let(:valid_session) { {locale: :de} }
|
||||
|
||||
describe FetprofilesController do
|
||||
def self.create_fetprofile
|
||||
before(:each) do
|
||||
@fetprofile = FactoryGirl.create(:fetprofile)
|
||||
end
|
||||
end
|
||||
def self.create_active_fetprofile
|
||||
before(:each) do
|
||||
@fetprofile = FactoryGirl.create(:fetprofile, active: true)
|
||||
end
|
||||
end
|
||||
|
||||
# This should return the minimal set of attributes required to create a valid
|
||||
# Fetprofile. As you add validations to Fetprofile, be sure to
|
||||
# adjust the attributes here as well.
|
||||
let(:valid_attributes) { { "vorname" => "MyString" } }
|
||||
|
||||
# This should return the minimal set of values that should be in the session
|
||||
# in order to pass any filters (e.g. authentication) defined in
|
||||
# FetprofilesController. Be sure to keep this updated too.
|
||||
let(:valid_session) { {} }
|
||||
let(:object_variable) {:fetprofile}
|
||||
let(:assigned_object_variable) {@fetprofile}
|
||||
let(:object_class) {Fetprofile}
|
||||
|
||||
describe "GET index" do
|
||||
it "assigns all fetprofiles as @fetprofiles" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
get :index, {}, valid_session
|
||||
assigns(:fetprofiles).should eq([fetprofile])
|
||||
end
|
||||
create_active_fetprofile
|
||||
subject(:action) { get :index, {} }
|
||||
let(:object_variable) {:fetprofiles}
|
||||
let(:assigned_object_variable) {[@fetprofile]}
|
||||
it_behaves_like "it is success"
|
||||
it_behaves_like "it assigns object"
|
||||
end
|
||||
|
||||
describe "GET show" do
|
||||
it "assigns the requested fetprofile as @fetprofile" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
get :show, {:id => fetprofile.to_param}, valid_session
|
||||
assigns(:fetprofile).should eq(fetprofile)
|
||||
end
|
||||
create_fetprofile
|
||||
subject(:action) { get :show, {:id => @fetprofile.to_param}}
|
||||
it_behaves_like "it is success"
|
||||
it_behaves_like "it assigns object"
|
||||
it "renders the 'show' template" do
|
||||
expect(action).to render_template("show")
|
||||
end
|
||||
it "assigns memberships" do
|
||||
action
|
||||
expect(assigns(:memberships)).to be_a(ActiveRecord::Relation)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "GET new" do
|
||||
it "assigns a new fetprofile as @fetprofile" do
|
||||
get :new, {}, valid_session
|
||||
assigns(:fetprofile).should be_a_new(Fetprofile)
|
||||
subject(:action) { get :new, {}}
|
||||
describe "with fetuser" do
|
||||
login_fet_user
|
||||
it_behaves_like "it assigns new object"
|
||||
it_behaves_like "it is success"
|
||||
end
|
||||
describe "without user" do
|
||||
logout_user
|
||||
it_behaves_like "it is restricted"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "GET edit" do
|
||||
|
||||
subject(:action) {get :edit, :id=>@fetprofile.to_param}
|
||||
login_fet_user
|
||||
create_fetprofile
|
||||
it_behaves_like "it is success"
|
||||
it_behaves_like "it assigns object"
|
||||
it "assigns memberships" do
|
||||
action
|
||||
expect(assigns(:memberships)).to be_a(ActiveRecord::Relation)
|
||||
end
|
||||
|
||||
it "assigns the requested fetprofile as @fetprofile" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
get :edit, {:id => fetprofile.to_param}, valid_session
|
||||
assigns(:fetprofile).should eq(fetprofile)
|
||||
expect{action}.to change {assigns(:fetprofile)}.to(@fetprofile)
|
||||
# expect(assigns(:fetprofile)).to eq(@fetprofile)
|
||||
end
|
||||
describe "without user" do
|
||||
logout_user
|
||||
it_behaves_like "it is restricted"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "POST create" do
|
||||
describe "with valid params" do
|
||||
it "creates a new Fetprofile" do
|
||||
expect {
|
||||
post :create, {:fetprofile => valid_attributes}, valid_session
|
||||
}.to change(Fetprofile, :count).by(1)
|
||||
end
|
||||
subject(:action){post :create, {:fetprofile => FactoryGirl.attributes_for(:fetprofile),:format=>:html}}
|
||||
|
||||
it "assigns a newly created fetprofile as @fetprofile" do
|
||||
post :create, {:fetprofile => valid_attributes}, valid_session
|
||||
assigns(:fetprofile).should be_a(Fetprofile)
|
||||
assigns(:fetprofile).should be_persisted
|
||||
login_fet_user
|
||||
describe "with valid params" do
|
||||
|
||||
it "has a 302 status code" do
|
||||
expect(action.status).to eq(302)
|
||||
end
|
||||
it "creates a new Fetprofile" do
|
||||
expect{action}.to change(Fetprofile, :count).by(1)
|
||||
end
|
||||
|
||||
it_behaves_like "it assigns persisted object"
|
||||
|
||||
it "assigns memberships" do
|
||||
action
|
||||
expect(assigns(:memberships)).to be_a(ActiveRecord::Relation)
|
||||
end
|
||||
|
||||
it "redirects to the created fetprofile" do
|
||||
post :create, {:fetprofile => valid_attributes}, valid_session
|
||||
response.should redirect_to(Fetprofile.last)
|
||||
expect(action).to redirect_to assigns(:fetprofile)
|
||||
end
|
||||
end
|
||||
|
||||
describe "with invalid params" do
|
||||
it "assigns a newly created but unsaved fetprofile as @fetprofile" do
|
||||
# Trigger the behavior that occurs when invalid params are submitted
|
||||
Fetprofile.any_instance.stub(:save).and_return(false)
|
||||
post :create, {:fetprofile => { "vorname" => "invalid value" }}, valid_session
|
||||
assigns(:fetprofile).should be_a_new(Fetprofile)
|
||||
has_invalid_params
|
||||
it "assigns memberships" do
|
||||
action
|
||||
expect(assigns(:memberships)).to be_a(ActiveRecord::Relation)
|
||||
end
|
||||
|
||||
it "assigns a newly created but unsaved fetprofile as @fetprofile" do
|
||||
action
|
||||
assigns(:fetprofile).should be_a_new(Fetprofile)
|
||||
expect(assigns(:fetprofile)).not_to be_persisted
|
||||
end
|
||||
it "re-renders the 'new' template" do
|
||||
# Trigger the behavior that occurs when invalid params are submitted
|
||||
Fetprofile.any_instance.stub(:save).and_return(false)
|
||||
post :create, {:fetprofile => { "vorname" => "invalid value" }}, valid_session
|
||||
response.should render_template("new")
|
||||
expect(action).to render_template("new")
|
||||
end
|
||||
end
|
||||
describe "without user" do
|
||||
logout_user
|
||||
it_behaves_like "it is restricted"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "PUT update" do
|
||||
describe "with valid params" do
|
||||
it "updates the requested fetprofile" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
# Assuming there are no other fetprofiles in the database, this
|
||||
# specifies that the Fetprofile created on the previous line
|
||||
# receives the :update_attributes message with whatever params are
|
||||
# submitted in the request.
|
||||
Fetprofile.any_instance.should_receive(:update_attributes).with({ "vorname" => "MyString" })
|
||||
put :update, {:id => fetprofile.to_param, :fetprofile => { "vorname" => "MyString" }}, valid_session
|
||||
end
|
||||
let(:action) { put :update, {:id => @fetprofile.to_param, :fetprofile => {"vorname"=>"neuerName"}} }
|
||||
|
||||
create_fetprofile
|
||||
login_fet_user
|
||||
|
||||
it "assigns the requested fetprofile as @fetprofile" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
put :update, {:id => fetprofile.to_param, :fetprofile => valid_attributes}, valid_session
|
||||
assigns(:fetprofile).should eq(fetprofile)
|
||||
describe "with valid params" do
|
||||
it_behaves_like "it assigns object"
|
||||
|
||||
it "updates the requested fetprofile" do
|
||||
expect { action }.to change{Fetprofile.find(@fetprofile.id).vorname}.to("neuerName")
|
||||
end
|
||||
it_behaves_like "it assigns persisted object"
|
||||
|
||||
it "redirects to the fetprofile" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
put :update, {:id => fetprofile.to_param, :fetprofile => valid_attributes}, valid_session
|
||||
response.should redirect_to(fetprofile)
|
||||
expect(action).to redirect_to(@fetprofile)
|
||||
end
|
||||
end
|
||||
|
||||
describe "with invalid params" do
|
||||
it "assigns the fetprofile as @fetprofile" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
# Trigger the behavior that occurs when invalid params are submitted
|
||||
Fetprofile.any_instance.stub(:save).and_return(false)
|
||||
put :update, {:id => fetprofile.to_param, :fetprofile => { "vorname" => "invalid value" }}, valid_session
|
||||
assigns(:fetprofile).should eq(fetprofile)
|
||||
end
|
||||
|
||||
has_invalid_params
|
||||
it_behaves_like "it assigns object"
|
||||
it "re-renders the 'edit' template" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
# Trigger the behavior that occurs when invalid params are submitted
|
||||
Fetprofile.any_instance.stub(:save).and_return(false)
|
||||
put :update, {:id => fetprofile.to_param, :fetprofile => { "vorname" => "invalid value" }}, valid_session
|
||||
response.should render_template("edit")
|
||||
expect(action).to render_template("edit")
|
||||
end
|
||||
end
|
||||
describe "without user" do
|
||||
logout_user
|
||||
it_behaves_like "it is restricted"
|
||||
end
|
||||
end
|
||||
|
||||
describe "DELETE destroy" do
|
||||
login_fet_user
|
||||
create_fetprofile
|
||||
subject(:action) { delete :destroy, {:id => @fetprofile.to_param}}
|
||||
|
||||
it "destroys the requested fetprofile" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
expect {
|
||||
delete :destroy, {:id => fetprofile.to_param}, valid_session
|
||||
action
|
||||
}.to change(Fetprofile, :count).by(-1)
|
||||
end
|
||||
|
||||
it "redirects to the fetprofiles list" do
|
||||
fetprofile = Fetprofile.create! valid_attributes
|
||||
delete :destroy, {:id => fetprofile.to_param}, valid_session
|
||||
action
|
||||
response.should redirect_to(fetprofiles_url)
|
||||
end
|
||||
describe "without user" do
|
||||
logout_user
|
||||
it_behaves_like "it is restricted"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user