Merge branch 'master' of https://github.com/andreassteph/fetsite
This commit is contained in:
@@ -23,38 +23,46 @@ long_line_behaviour=1
|
|||||||
long_line_column=72
|
long_line_column=72
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
current_page=1
|
current_page=31
|
||||||
FILE_NAME_0=29;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.html.erb;0;4
|
FILE_NAME_0=29;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.html.erb;0;4
|
||||||
FILE_NAME_1=58;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2F_tabs.html.erb;0;4
|
FILE_NAME_1=573;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2F_tabs.html.erb;0;4
|
||||||
FILE_NAME_2=1179;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fability.rb;0;4
|
FILE_NAME_2=1179;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fability.rb;0;4
|
||||||
FILE_NAME_3=115;None;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.ics.erb;0;4
|
FILE_NAME_3=115;None;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fcalendars%2Fshow.ics.erb;0;4
|
||||||
FILE_NAME_4=454;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fusers_controller.rb;0;4
|
FILE_NAME_4=454;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fusers_controller.rb;0;4
|
||||||
FILE_NAME_5=571;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Fdevise.rb;0;4
|
FILE_NAME_5=571;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Fdevise.rb;0;4
|
||||||
FILE_NAME_6=627;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fneuigkeit.rb;0;4
|
FILE_NAME_6=883;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fmodulgruppe.rb;0;4
|
||||||
FILE_NAME_7=421;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fmodulgruppe.rb;0;4
|
FILE_NAME_7=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Flva.rb;0;4
|
||||||
FILE_NAME_8=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Flva.rb;0;4
|
FILE_NAME_8=363;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fthema.rb;0;4
|
||||||
FILE_NAME_9=363;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fthema.rb;0;4
|
FILE_NAME_9=255;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130124000300_translate_lvas.rb;0;4
|
||||||
FILE_NAME_10=255;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130124000300_translate_lvas.rb;0;4
|
FILE_NAME_10=222;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818161841_translate_neuigkeiten.rb;0;4
|
||||||
FILE_NAME_11=222;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818161841_translate_neuigkeiten.rb;0;4
|
FILE_NAME_11=1383;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Finflections.rb;0;4
|
||||||
FILE_NAME_12=1383;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fconfig%2Finitializers%2Finflections.rb;0;4
|
FILE_NAME_12=1010;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4
|
||||||
FILE_NAME_13=1010;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4
|
FILE_NAME_13=615;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4
|
||||||
FILE_NAME_14=615;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4
|
FILE_NAME_14=844;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4
|
||||||
FILE_NAME_15=844;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130818175905_fix_translation_tables.rb;0;4
|
FILE_NAME_15=114;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4
|
||||||
FILE_NAME_16=114;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805171433_translate_themen.rb;0;4
|
FILE_NAME_16=169;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805143719_create_themen.rb;0;4
|
||||||
FILE_NAME_17=191;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ftmp%2Ffetsite%2Fdb%2Fmigrate%2F20130805143719_create_themen.rb;0;4
|
FILE_NAME_17=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130112110800_create_semesters.rb;0;4
|
||||||
FILE_NAME_18=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130112110800_create_semesters.rb;0;4
|
FILE_NAME_18=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130113160023_create_versions.rb;0;4
|
||||||
FILE_NAME_19=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130113160023_create_versions.rb;0;4
|
FILE_NAME_19=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2Fshow.html.erb;0;4
|
||||||
FILE_NAME_20=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2Fshow.html.erb;0;4
|
FILE_NAME_20=161;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2F_tabs.html.erb;0;4
|
||||||
FILE_NAME_21=161;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Frubriken%2F_tabs.html.erb;0;4
|
FILE_NAME_21=439;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fapplication.html.erb;0;4
|
||||||
FILE_NAME_22=439;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fapplication.html.erb;0;4
|
FILE_NAME_22=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fusers%2Findex.html.erb;0;4
|
||||||
FILE_NAME_23=0;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fusers%2Findex.html.erb;0;4
|
FILE_NAME_23=3143;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmoduls_controller.rb;0;4
|
||||||
FILE_NAME_24=3143;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmoduls_controller.rb;0;4
|
FILE_NAME_24=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fconfig_controller.rb;0;4
|
||||||
FILE_NAME_25=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fconfig_controller.rb;0;4
|
FILE_NAME_25=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmodulgruppen_controller.rb;0;4
|
||||||
FILE_NAME_26=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fcontrollers%2Fmodulgruppen_controller.rb;0;4
|
FILE_NAME_26=783;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fmenu.html.erb;0;4
|
||||||
FILE_NAME_27=783;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Flayouts%2Fmenu.html.erb;0;4
|
FILE_NAME_27=375;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fneuigkeiten%2Fshow.html.erb;0;4
|
||||||
|
FILE_NAME_28=1;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fneuigkeiten%2F_neuigkeit.html.erb;0;4
|
||||||
|
FILE_NAME_29=1;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Fstudien%2Fshow.html.erb;0;4
|
||||||
|
FILE_NAME_30=658;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fcalentry.rb;0;4
|
||||||
|
FILE_NAME_31=218;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fdb%2Fmigrate%2F20130823084252_add_object_to_calentries.rb;0;4
|
||||||
|
FILE_NAME_32=1069;HTML;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fviews%2Ffetprofiles%2F_form.html.erb;0;4
|
||||||
|
FILE_NAME_33=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fbeispiel.rb;0;4
|
||||||
|
FILE_NAME_34=0;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Fcalendar.rb;0;4
|
||||||
|
FILE_NAME_35=477;Ruby;0;16;1;1;0;%2Fhome%2Fandreas%2Fwww%2Ffetsite%2Fapp%2Fmodels%2Frubrik.rb;0;4
|
||||||
|
|
||||||
[gproject]
|
[gproject]
|
||||||
source_patterns=*.rb;*.erb
|
source_patterns=*.rb;*.erb;
|
||||||
header_patterns=*.h;*.H;*.hpp;*.hxx;*.h++;*.hh;*.m;
|
header_patterns=*.h;*.H;*.hpp;*.hxx;*.h++;*.hh;*.m;
|
||||||
ignored_dirs_patterns=.*;CVS;
|
ignored_dirs_patterns=.*;CVS;
|
||||||
generate_tags=false
|
generate_tags=false
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
# Ignore bundler config
|
# Ignore bundler config
|
||||||
/.bundle
|
/.bundle
|
||||||
|
*.*~
|
||||||
# Ignore the default SQLite database.
|
# Ignore the default SQLite database.
|
||||||
/db/*.sqlite3
|
/db/*.sqlite3
|
||||||
/db/schema.rb
|
/db/schema.rb
|
||||||
|
|||||||
3
Gemfile
3
Gemfile
@@ -78,3 +78,6 @@ end
|
|||||||
|
|
||||||
gem "simple_calendar", "~> 0.1.9"
|
gem "simple_calendar", "~> 0.1.9"
|
||||||
gem 'rmagick'
|
gem 'rmagick'
|
||||||
|
|
||||||
|
gem 'bootstrap-addons-rails'
|
||||||
|
gem "jquery-fileupload-rails"
|
||||||
@@ -35,6 +35,8 @@ GEM
|
|||||||
activerecord (>= 3.0.0)
|
activerecord (>= 3.0.0)
|
||||||
bcrypt-ruby (3.0.1)
|
bcrypt-ruby (3.0.1)
|
||||||
bcrypt-ruby (3.0.1-x86-mingw32)
|
bcrypt-ruby (3.0.1-x86-mingw32)
|
||||||
|
bootstrap-addons-rails (0.1.2)
|
||||||
|
rails
|
||||||
bootstrap-sass (2.3.2.1)
|
bootstrap-sass (2.3.2.1)
|
||||||
sass (~> 3.2)
|
sass (~> 3.2)
|
||||||
builder (3.0.4)
|
builder (3.0.4)
|
||||||
@@ -80,6 +82,9 @@ GEM
|
|||||||
hike (1.2.1)
|
hike (1.2.1)
|
||||||
i18n (0.6.1)
|
i18n (0.6.1)
|
||||||
journey (1.0.4)
|
journey (1.0.4)
|
||||||
|
jquery-fileupload-rails (0.4.1)
|
||||||
|
actionpack (>= 3.1)
|
||||||
|
railties (>= 3.1)
|
||||||
jquery-rails (2.2.1)
|
jquery-rails (2.2.1)
|
||||||
railties (>= 3.0, < 5.0)
|
railties (>= 3.0, < 5.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
@@ -179,6 +184,7 @@ PLATFORMS
|
|||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
annotate (>= 2.5.0)
|
annotate (>= 2.5.0)
|
||||||
awesome_nested_set
|
awesome_nested_set
|
||||||
|
bootstrap-addons-rails
|
||||||
bootstrap-sass (~> 2.3.2.1)
|
bootstrap-sass (~> 2.3.2.1)
|
||||||
cancan
|
cancan
|
||||||
carrierwave
|
carrierwave
|
||||||
@@ -191,6 +197,7 @@ DEPENDENCIES
|
|||||||
git
|
git
|
||||||
globalize3 (~> 0.3.0)
|
globalize3 (~> 0.3.0)
|
||||||
haml
|
haml
|
||||||
|
jquery-fileupload-rails
|
||||||
jquery-rails
|
jquery-rails
|
||||||
paper_trail (>= 2.7.0)
|
paper_trail (>= 2.7.0)
|
||||||
paperclip (~> 3.4.0)
|
paperclip (~> 3.4.0)
|
||||||
|
|||||||
@@ -16,4 +16,8 @@
|
|||||||
//= require_tree .
|
//= require_tree .
|
||||||
//= require tinymce-jquery
|
//= require tinymce-jquery
|
||||||
//= require bootstrap
|
//= require bootstrap
|
||||||
|
//= require bootstrap/colorpicker
|
||||||
|
//= require bootstrap/datepicker
|
||||||
|
//= require bootstrap/load-image.min
|
||||||
|
//= require bootstrap/image-gallery.min
|
||||||
|
//= require jquery-fileupload
|
||||||
|
|||||||
@@ -10,11 +10,16 @@
|
|||||||
*
|
*
|
||||||
*= require_self
|
*= require_self
|
||||||
*= require_tree .
|
*= require_tree .
|
||||||
|
*= require jquery.fileupload-ui
|
||||||
* require 'bootstrap'
|
* require 'bootstrap'
|
||||||
|
|
||||||
*/
|
*/
|
||||||
$linkColor: #03006E;
|
$linkColor: #03006E;
|
||||||
@import 'bootstrap';
|
@import 'bootstrap';
|
||||||
@import 'bootstrap-responsive';
|
@import 'bootstrap-responsive';
|
||||||
|
@import 'bootstrap/image-gallery';
|
||||||
|
|
||||||
|
|
||||||
h1
|
h1
|
||||||
{font-size: 23px}
|
{font-size: 23px}
|
||||||
h2
|
h2
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
div.lva-semester {
|
div.lva-semester {
|
||||||
border: solid;
|
border: solid;
|
||||||
border-width: 1px;
|
border-width: 0px;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-color: green;
|
border-color: green;
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ class FotosController < ApplicationController
|
|||||||
# GET /fotos/new.json
|
# GET /fotos/new.json
|
||||||
def new
|
def new
|
||||||
@foto = Foto.new
|
@foto = Foto.new
|
||||||
|
@gallery = Gallery.find_by_id(params[:gallery_id])
|
||||||
|
@foto.gallery_id = @gallery.id
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
format.json { render json: @foto }
|
format.json { render json: @foto }
|
||||||
@@ -42,10 +43,17 @@ class FotosController < ApplicationController
|
|||||||
def create
|
def create
|
||||||
@foto = Foto.new(params[:foto])
|
@foto = Foto.new(params[:foto])
|
||||||
|
|
||||||
|
@foto.gallery_id = (params[:gallery_id])
|
||||||
|
@gallery = @foto.gallery
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@foto.title = @foto.datei.filename
|
||||||
if @foto.save
|
if @foto.save
|
||||||
format.html { redirect_to @foto, notice: 'Foto was successfully created.' }
|
format.html {
|
||||||
format.json { render json: @foto, status: :created, location: @foto }
|
render :json => [@foto.to_jq_upload].to_json,
|
||||||
|
:content_type => 'text/html',
|
||||||
|
:layout => false
|
||||||
|
}
|
||||||
|
format.json { render json: {files: [@foto.to_jq_upload]}, status: :created, location: [@gallery, @foto] }
|
||||||
else
|
else
|
||||||
format.html { render action: "new" }
|
format.html { render action: "new" }
|
||||||
format.json { render json: @foto.errors, status: :unprocessable_entity }
|
format.json { render json: @foto.errors, status: :unprocessable_entity }
|
||||||
@@ -60,8 +68,12 @@ class FotosController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @foto.update_attributes(params[:foto])
|
if @foto.update_attributes(params[:foto])
|
||||||
format.html { redirect_to @foto, notice: 'Foto was successfully updated.' }
|
format.html {
|
||||||
format.json { head :no_content }
|
render :json => [@foto.to_jq_upload].to_json,
|
||||||
|
:content_type => 'text/html',
|
||||||
|
:layout => false
|
||||||
|
}
|
||||||
|
format.json { render json: {files: [@foto.to_jq_upload]}, status: :created, location: [@gallery, @foto] }
|
||||||
else
|
else
|
||||||
format.html { render action: "edit" }
|
format.html { render action: "edit" }
|
||||||
format.json { render json: @foto.errors, status: :unprocessable_entity }
|
format.json { render json: @foto.errors, status: :unprocessable_entity }
|
||||||
@@ -76,7 +88,7 @@ class FotosController < ApplicationController
|
|||||||
@foto.destroy
|
@foto.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to fotos_url }
|
format.html { redirect_to galleries_url }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class GalleriesController < ApplicationController
|
|||||||
# GET /galleries/new.json
|
# GET /galleries/new.json
|
||||||
def new
|
def new
|
||||||
@gallery = Gallery.new
|
@gallery = Gallery.new
|
||||||
|
@foto = Foto.new
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
format.json { render json: @gallery }
|
format.json { render json: @gallery }
|
||||||
@@ -41,7 +41,7 @@ class GalleriesController < ApplicationController
|
|||||||
# POST /galleries.json
|
# POST /galleries.json
|
||||||
def create
|
def create
|
||||||
@gallery = Gallery.new(params[:gallery])
|
@gallery = Gallery.new(params[:gallery])
|
||||||
|
@foto = Foto.new
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @gallery.save
|
if @gallery.save
|
||||||
format.html { redirect_to @gallery, notice: 'Gallery was successfully created.' }
|
format.html { redirect_to @gallery, notice: 'Gallery was successfully created.' }
|
||||||
@@ -57,7 +57,7 @@ class GalleriesController < ApplicationController
|
|||||||
# PUT /galleries/1.json
|
# PUT /galleries/1.json
|
||||||
def update
|
def update
|
||||||
@gallery = Gallery.find(params[:id])
|
@gallery = Gallery.find(params[:id])
|
||||||
|
@foto = Foto.new
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @gallery.update_attributes(params[:gallery])
|
if @gallery.update_attributes(params[:gallery])
|
||||||
format.html { redirect_to @gallery, notice: 'Gallery was successfully updated.' }
|
format.html { redirect_to @gallery, notice: 'Gallery was successfully updated.' }
|
||||||
|
|||||||
@@ -7,4 +7,7 @@ class HomeController < ApplicationController
|
|||||||
def startdev
|
def startdev
|
||||||
render 'setup_fetsite_dev'
|
render 'setup_fetsite_dev'
|
||||||
end
|
end
|
||||||
|
def linksnotimplemented
|
||||||
|
render 'links_notimplemented'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class LvasController < ApplicationController
|
|||||||
|
|
||||||
@toolbar_elements<<{:hicon=>'icon-plus-sign', :icon=>:plus, :text => "Neues Beispiel", :path=> new_beispiel_path(:lva_id =>@lva.id)}
|
@toolbar_elements<<{:hicon=>'icon-plus-sign', :icon=>:plus, :text => "Neues Beispiel", :path=> new_beispiel_path(:lva_id =>@lva.id)}
|
||||||
@toolbar_elements<<{:hicon=>'icon-pencil', :icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_lva_path(@lva)}
|
@toolbar_elements<<{:hicon=>'icon-pencil', :icon=>:pencil,:text =>I18n.t('common.edit'),:path => edit_lva_path(@lva)}
|
||||||
|
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t('common.delete'), :path=> lva_path(@lva), :method=>:delete, :confirm=>"Sure?"}
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /lvas/new
|
# GET /lvas/new
|
||||||
|
|||||||
@@ -1,31 +1,9 @@
|
|||||||
class MembershipsController < ApplicationController
|
class MembershipsController < ApplicationController
|
||||||
# GET /memberships
|
|
||||||
# GET /memberships.json
|
|
||||||
def index
|
|
||||||
@memberships = Membership.all
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html # index.html.erb
|
|
||||||
format.json { render json: @memberships }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# GET /memberships/1
|
|
||||||
# GET /memberships/1.json
|
|
||||||
def show
|
|
||||||
@membership = Membership.find(params[:id])
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html # show.html.erb
|
|
||||||
format.json { render json: @membership }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# GET /memberships/new
|
# GET /memberships/new
|
||||||
# GET /memberships/new.json
|
# GET /memberships/new.json
|
||||||
def new
|
def new
|
||||||
@membership = Membership.new
|
@membership = Membership.new
|
||||||
|
@membership.fetprofile=Fetprofile.find(params[:fetprofile_id])
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
format.json { render json: @membership }
|
format.json { render json: @membership }
|
||||||
@@ -44,8 +22,8 @@ class MembershipsController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @membership.save
|
if @membership.save
|
||||||
format.html { redirect_to @membership, notice: 'Membership was successfully created.' }
|
format.html { redirect_to @membership.fetprofile, notice: 'Membership was successfully created.' }
|
||||||
format.json { render json: @membership, status: :created, location: @membership }
|
format.json { render json: @membership.fetprofile, status: :created, location: @membership.fetprofile }
|
||||||
else
|
else
|
||||||
format.html { render action: "new" }
|
format.html { render action: "new" }
|
||||||
format.json { render json: @membership.errors, status: :unprocessable_entity }
|
format.json { render json: @membership.errors, status: :unprocessable_entity }
|
||||||
@@ -60,7 +38,7 @@ class MembershipsController < ApplicationController
|
|||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @membership.update_attributes(params[:membership])
|
if @membership.update_attributes(params[:membership])
|
||||||
format.html { redirect_to @membership, notice: 'Membership was successfully updated.' }
|
format.html { redirect_to @membership.fetprofile, notice: 'Membership was successfully updated.' }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
else
|
else
|
||||||
format.html { render action: "edit" }
|
format.html { render action: "edit" }
|
||||||
@@ -73,10 +51,11 @@ class MembershipsController < ApplicationController
|
|||||||
# DELETE /memberships/1.json
|
# DELETE /memberships/1.json
|
||||||
def destroy
|
def destroy
|
||||||
@membership = Membership.find(params[:id])
|
@membership = Membership.find(params[:id])
|
||||||
|
fp = @membership.fetprofile
|
||||||
@membership.destroy
|
@membership.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to memberships_url }
|
format.html { redirect_to fp }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -92,14 +92,16 @@ class StudienController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def verwalten
|
def verwalten
|
||||||
@new_params={:std_verw=>params[:std_verw], :mg_verw=>params[:mg_verw], :m_verw=>params[:m_verw], :lva_verw=>params[:lva_verw], :b_verw=>params[:b_verw]}
|
@new_params={:std_verw=>params[:std_verw], :mg_verw=>params[:mg_verw], :m_verw=>params[:m_verw], :lva_verw=>params[:lva_verw], :b_verw=>params[:b_verw], :lec_verw=>params[:lec_verw]}
|
||||||
if @new_params.values.compact.empty?
|
if @new_params.values.compact.empty?
|
||||||
@studien=Studium.all
|
@studien=Studium.all
|
||||||
@modulgruppen=Modulgruppe.all
|
@modulgruppen=Modulgruppe.all
|
||||||
@module=Modul.all
|
@module=Modul.all
|
||||||
@lvas=Lva.all
|
@lvas=Lva.all
|
||||||
@beispiele=Beispiel.all
|
@beispiele=Beispiel.all
|
||||||
|
@lecturers=Lecturer.all
|
||||||
else
|
else
|
||||||
|
|
||||||
if !@new_params[:std_verw].nil?
|
if !@new_params[:std_verw].nil?
|
||||||
@studien = [Studium.find(@new_params[:std_verw])]
|
@studien = [Studium.find(@new_params[:std_verw])]
|
||||||
else
|
else
|
||||||
@@ -144,7 +146,7 @@ class StudienController < ApplicationController
|
|||||||
@beispiele = [Beispiel.find(@new_params[:b_verw])]
|
@beispiele = [Beispiel.find(@new_params[:b_verw])]
|
||||||
temp = @lvas.map{|x| x.beispiele}.flatten.uniq #Force Force Lvas
|
temp = @lvas.map{|x| x.beispiele}.flatten.uniq #Force Force Lvas
|
||||||
@lvas=@lvas.select{|k| temp.include?(k)}
|
@lvas=@lvas.select{|k| temp.include?(k)}
|
||||||
temp = @module.map{|x| x.lvas}.flatten.uniq #Force Module
|
temp = @lva.map{|x| x.moduls}.flatten.uniq #Force Module
|
||||||
@module=@module.select{|k| temp.include?(k)}
|
@module=@module.select{|k| temp.include?(k)}
|
||||||
temp = @module.map{|x| x.modulgruppen}.flatten.uniq # Force Modulgruppen
|
temp = @module.map{|x| x.modulgruppen}.flatten.uniq # Force Modulgruppen
|
||||||
@modulgruppen = @modulgruppen.select{|k| temp.include?(k)}
|
@modulgruppen = @modulgruppen.select{|k| temp.include?(k)}
|
||||||
@@ -157,6 +159,21 @@ class StudienController < ApplicationController
|
|||||||
temp = @lvas.map{|x| x.beispiele}.flatten.uniq # Force beispiel
|
temp = @lvas.map{|x| x.beispiele}.flatten.uniq # Force beispiel
|
||||||
@beispiele=@beispiele.select{|k| temp.include?(k)}
|
@beispiele=@beispiele.select{|k| temp.include?(k)}
|
||||||
end
|
end
|
||||||
|
if !@new_params[:lec_verw].nil?
|
||||||
|
@lecturers=[Lecturer.find(@new_params[:lec_verw])]
|
||||||
|
temp = @lecturers.map{|x| x.lvas}.flatten.uniq #Force Force Lvas
|
||||||
|
@lvas=@lvas.select{|k| temp.include?(k)}
|
||||||
|
temp = @lvas.map{|x| x.modul}.flatten.uniq #Force Force Lvas
|
||||||
|
@module=@module.select{|k| temp.include?(k)}
|
||||||
|
temp = @module.map{|x| x.modulgruppen}.flatten.uniq # Force Modulgruppen
|
||||||
|
@modulgruppen = @modulgruppen.select{|k| temp.include?(k)}
|
||||||
|
temp = @modulgruppen.map{|x| x.studium}.flatten.uniq # Force Studien
|
||||||
|
@studien=@studien.select{|k| temp.include?(k)}
|
||||||
|
temp = @lvas.map{|x| x.beispiele}.flatten.uniq # Force beispiel
|
||||||
|
@beispiele=@beispiele.select{|k| temp.include?(k)}
|
||||||
|
else
|
||||||
|
@lecturers = @lvas.map{|k| k.lecturers}.flatten.uniq
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@messages = []
|
@messages = []
|
||||||
@@ -230,7 +247,9 @@ class StudienController < ApplicationController
|
|||||||
:mg_verw=> params[:mg_verw],
|
:mg_verw=> params[:mg_verw],
|
||||||
:m_verw=>params[:m_verw],
|
:m_verw=>params[:m_verw],
|
||||||
:lva_verw=>params[:lva_verw],
|
:lva_verw=>params[:lva_verw],
|
||||||
:b_verw=>params[:b_verw]}.merge(super)
|
:b_verw=>params[:b_verw],
|
||||||
|
:lec_verw=>params[:lec_verw]}.merge(super)
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
class Ability
|
class Ability
|
||||||
include CanCan::Ability
|
include CanCan::Ability
|
||||||
def initialize(user)
|
def initialize(user)
|
||||||
@@ -27,7 +28,7 @@ class Ability
|
|||||||
|
|
||||||
# For Debug allow everything
|
# For Debug allow everything
|
||||||
# Remove this line in production environment and for testing user management
|
# Remove this line in production environment and for testing user management
|
||||||
# can :manage, :all
|
can :manage, :all
|
||||||
can :addfetuser, User
|
can :addfetuser, User
|
||||||
can :addfetadmin, User
|
can :addfetadmin, User
|
||||||
can [:show, :index], Studium
|
can [:show, :index], Studium
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: attachments
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# name :string(255)
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# thema_id :integer
|
||||||
|
#
|
||||||
|
|
||||||
class Attachment < ActiveRecord::Base
|
class Attachment < ActiveRecord::Base
|
||||||
has_paper_trail
|
has_paper_trail
|
||||||
attr_accessible :name
|
attr_accessible :name
|
||||||
|
|||||||
@@ -2,16 +2,13 @@
|
|||||||
#
|
#
|
||||||
# Table name: beispiele
|
# Table name: beispiele
|
||||||
#
|
#
|
||||||
# id :integer not null, primary key
|
# id :integer not null, primary key
|
||||||
# name :string(255)
|
# name :string(255)
|
||||||
# desc :text
|
# desc :text
|
||||||
# lva_id :integer
|
# lva_id :integer
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
# file_file_name :string(255)
|
# beispieldatei :string(255)
|
||||||
# file_content_type :string(255)
|
|
||||||
# file_file_size :integer
|
|
||||||
# file_updated_at :datetime
|
|
||||||
#
|
#
|
||||||
|
|
||||||
class Beispiel < ActiveRecord::Base
|
class Beispiel < ActiveRecord::Base
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: calendars
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# name :string(255)
|
||||||
|
# public :boolean
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# picture :string(255)
|
||||||
|
#
|
||||||
|
|
||||||
class Calendar < ActiveRecord::Base
|
class Calendar < ActiveRecord::Base
|
||||||
attr_accessible :name, :public, :picture
|
attr_accessible :name, :public, :picture
|
||||||
has_and_belongs_to_many :calentries
|
has_and_belongs_to_many :calentries
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: calentries
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# start :datetime
|
||||||
|
# ende :datetime
|
||||||
|
# summary :string(255)
|
||||||
|
# typ :integer
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Calentry < ActiveRecord::Base
|
class Calentry < ActiveRecord::Base
|
||||||
attr_accessible :ende, :start, :summary, :typ,:calendar_ids
|
attr_accessible :ende, :start, :summary, :typ,:calendar_ids
|
||||||
has_and_belongs_to_many :calendars
|
has_and_belongs_to_many :calendars
|
||||||
@@ -8,6 +21,8 @@ class Calentry < ActiveRecord::Base
|
|||||||
errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein")
|
errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
belongs_to :object, polymorphic: true
|
||||||
|
|
||||||
resourcify
|
resourcify
|
||||||
def start_time
|
def start_time
|
||||||
start
|
start
|
||||||
@@ -18,5 +33,5 @@ class Calentry < ActiveRecord::Base
|
|||||||
def name
|
def name
|
||||||
summary
|
summary
|
||||||
end
|
end
|
||||||
|
scope :upcoming, -> { where("start >= ?" , Time.now).where("start <= ?", 8.days.from_now) }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,26 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: fetprofiles
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# vorname :string(255)
|
||||||
|
# nachname :string(255)
|
||||||
|
# short :string(255)
|
||||||
|
# fetmailalias :string(255)
|
||||||
|
# desc :text
|
||||||
|
# picture :string(255)
|
||||||
|
# active :boolean
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Fetprofile < ActiveRecord::Base
|
class Fetprofile < ActiveRecord::Base
|
||||||
attr_accessible :active, :desc, :fetmailalias, :nachname, :picture, :short, :vorname
|
attr_accessible :active, :desc, :fetmailalias, :nachname, :picture, :short, :vorname
|
||||||
|
has_many :memberships
|
||||||
|
has_many :gremien, :through=> :membership
|
||||||
|
mount_uploader :picture, PictureUploader
|
||||||
|
def name
|
||||||
|
[vorname, nachname, "(",short,")"].join(" ")
|
||||||
|
end
|
||||||
|
scope :active, -> { where(:active=>:true).order(:vorname) }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: fetzneditions
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# title :string(255)
|
||||||
|
# desc :text
|
||||||
|
# datum :date
|
||||||
|
# datei :string(255)
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Fetznedition < ActiveRecord::Base
|
class Fetznedition < ActiveRecord::Base
|
||||||
attr_accessible :datei, :datum, :desc, :title
|
attr_accessible :datei, :datum, :desc, :title
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,31 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: fotos
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# title :string(255)
|
||||||
|
# desc :text
|
||||||
|
# gallery_id :integer
|
||||||
|
# datei :string(255)
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Foto < ActiveRecord::Base
|
class Foto < ActiveRecord::Base
|
||||||
attr_accessible :datei, :desc, :gallery_id, :title
|
attr_accessible :datei, :desc, :gallery_id, :title
|
||||||
|
belongs_to :gallery
|
||||||
|
mount_uploader :datei, FotoUploader
|
||||||
|
resourcify
|
||||||
|
def to_jq_upload
|
||||||
|
{
|
||||||
|
"id" => read_attribute(:id),
|
||||||
|
"title" => read_attribute(:title),
|
||||||
|
"description" => read_attribute(:desc),
|
||||||
|
"name" => read_attribute(:title),
|
||||||
|
"size" => datei.size,
|
||||||
|
"url" => datei.url,
|
||||||
|
"thumbnail_url" => datei.thumb.url,
|
||||||
|
"delete_type" => "DELETE"
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: fragen
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# title :string(255)
|
||||||
|
# text :text
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# thema_id :integer
|
||||||
|
#
|
||||||
|
|
||||||
class Frage < ActiveRecord::Base
|
class Frage < ActiveRecord::Base
|
||||||
attr_accessible :text, :title, :thema_id
|
attr_accessible :text, :title, :thema_id
|
||||||
belongs_to :thema
|
belongs_to :thema
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: galleries
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# name :string(255)
|
||||||
|
# desc :text
|
||||||
|
# datum :date
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Gallery < ActiveRecord::Base
|
class Gallery < ActiveRecord::Base
|
||||||
attr_accessible :datum, :desc, :name
|
attr_accessible :datum, :desc, :name
|
||||||
|
has_many :fotos
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,16 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: gremien
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# name :string(255)
|
||||||
|
# desc :text
|
||||||
|
# typ :string(255)
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Gremium < ActiveRecord::Base
|
class Gremium < ActiveRecord::Base
|
||||||
attr_accessible :desc, :name, :typ
|
attr_accessible :desc, :name, :typ
|
||||||
|
has_many :memberships
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,19 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: lecturers
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# name :string(255)
|
||||||
|
# email :string(255)
|
||||||
|
# oid :integer
|
||||||
|
# picture :string(255)
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Lecturer < ActiveRecord::Base
|
class Lecturer < ActiveRecord::Base
|
||||||
attr_accessible :email, :name, :oid, :picture, :lva_ids
|
attr_accessible :email, :name, :oid, :picture, :remove_picture, :picture_cache, :lva_ids, :link
|
||||||
has_and_belongs_to_many :lvas
|
has_and_belongs_to_many :lvas
|
||||||
|
mount_uploader :picture, PictureUploader
|
||||||
|
resourcify
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,23 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: lvas
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# name :string(255)
|
||||||
|
# desc :text
|
||||||
|
# ects :decimal(, )
|
||||||
|
# lvanr :string(255)
|
||||||
|
# stunden :decimal(, )
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# modul_id :integer
|
||||||
|
# semester_id :integer
|
||||||
|
# pruefungsinformation :text
|
||||||
|
# lernaufwand :text
|
||||||
|
# typ :string(255)
|
||||||
|
#
|
||||||
|
|
||||||
# == Schema Information
|
# == Schema Information
|
||||||
#
|
#
|
||||||
# Table name: lvas
|
# Table name: lvas
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: memberships
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# fetprofile_id :string(255)
|
||||||
|
# gremium_id :string(255)
|
||||||
|
# start :date
|
||||||
|
# stop :date
|
||||||
|
# typ :string(255)
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Membership < ActiveRecord::Base
|
class Membership < ActiveRecord::Base
|
||||||
attr_accessible :fetprofile_id, :gremium_id, :start, :stop, :typ
|
attr_accessible :fetprofile_id, :gremium_id, :start, :stop, :typ
|
||||||
|
belongs_to :fetprofile
|
||||||
|
belongs_to :gremium
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
# rubrik_id :integer
|
# rubrik_id :integer
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
|
# author_id :integer
|
||||||
#
|
#
|
||||||
|
|
||||||
class Neuigkeit < ActiveRecord::Base
|
class Neuigkeit < ActiveRecord::Base
|
||||||
@@ -19,4 +20,8 @@ class Neuigkeit < ActiveRecord::Base
|
|||||||
validates :rubrik, :presence=>true
|
validates :rubrik, :presence=>true
|
||||||
validates :author, :presence=>true
|
validates :author, :presence=>true
|
||||||
translates :title,:text, :versioning=>true, :fallbacks_for_empty_translations => true
|
translates :title,:text, :versioning=>true, :fallbacks_for_empty_translations => true
|
||||||
|
|
||||||
|
scope :published, -> {where("datum >= ?", Time.now.to_date)}
|
||||||
|
scope :recent, -> { where("updated_at >= ? ",Time.now - 7.days)}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,9 +13,23 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
class Semester < ActiveRecord::Base
|
class Semester < ActiveRecord::Base
|
||||||
attr_accessible :name, :nummer, :ssws, :lva_ids
|
attr_accessible :nummer, :ssws, :lva_ids
|
||||||
has_and_belongs_to_many :lvas
|
has_and_belongs_to_many :lvas
|
||||||
belongs_to :studium, :foreign_key => "studium_id"
|
belongs_to :studium, :foreign_key => "studium_id"
|
||||||
validates :name, :presence => true
|
|
||||||
validates :nummer, :presence => true
|
validates :nummer, :presence => true
|
||||||
|
|
||||||
|
def name
|
||||||
|
if self.nummer == 0
|
||||||
|
return I18n.t("ohnezuordnung") + " (" + self.studium.name + ")"
|
||||||
|
else
|
||||||
|
return self.nummer.to_s + ". " + self.studium.name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
def name_kurz
|
||||||
|
if self.nummer == 0
|
||||||
|
return I18n.t("ohnezuordnung") + " (" + self.studium.abkuerzung + ")"
|
||||||
|
else
|
||||||
|
return self.nummer.to_s + ". " + self.studium.abkuerzung
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,19 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: studien
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# zahl :string(255)
|
||||||
|
# name :string(255)
|
||||||
|
# shortdesc :text
|
||||||
|
# desc :text
|
||||||
|
# typ :string(255)
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# abkuerzung :string(255)
|
||||||
|
#
|
||||||
|
|
||||||
# == Schema Information
|
# == Schema Information
|
||||||
#
|
#
|
||||||
# Table name: studien
|
# Table name: studien
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: themen
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# title :string(255)
|
||||||
|
# text :text
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
# themengruppe_id :integer
|
||||||
|
#
|
||||||
|
|
||||||
class Thema < ActiveRecord::Base
|
class Thema < ActiveRecord::Base
|
||||||
attr_accessible :text, :title, :themengruppe_id
|
attr_accessible :text, :title, :themengruppe_id
|
||||||
has_many :fragen
|
has_many :fragen
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: themengruppen
|
||||||
|
#
|
||||||
|
# id :integer not null, primary key
|
||||||
|
# title :string(255)
|
||||||
|
# text :text
|
||||||
|
# created_at :datetime not null
|
||||||
|
# updated_at :datetime not null
|
||||||
|
#
|
||||||
|
|
||||||
class Themengruppe < ActiveRecord::Base
|
class Themengruppe < ActiveRecord::Base
|
||||||
WORD_COUNT = 50
|
WORD_COUNT = 50
|
||||||
attr_accessible :text, :title
|
attr_accessible :text, :title
|
||||||
|
|||||||
56
app/uploaders/foto_uploader.rb
Normal file
56
app/uploaders/foto_uploader.rb
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
class FotoUploader < CarrierWave::Uploader::Base
|
||||||
|
|
||||||
|
# Include RMagick or MiniMagick support:
|
||||||
|
include CarrierWave::RMagick
|
||||||
|
# include CarrierWave::MiniMagick
|
||||||
|
|
||||||
|
# Choose what kind of storage to use for this uploader:
|
||||||
|
storage :file
|
||||||
|
# storage :fog
|
||||||
|
|
||||||
|
# Override the directory where uploaded files will be stored.
|
||||||
|
# This is a sensible default for uploaders that are meant to be mounted:
|
||||||
|
def store_dir
|
||||||
|
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Provide a default URL as a default if there hasn't been a file uploaded:
|
||||||
|
# def default_url
|
||||||
|
# # For Rails 3.1+ asset pipeline compatibility:
|
||||||
|
# # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
||||||
|
#
|
||||||
|
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
||||||
|
# end
|
||||||
|
|
||||||
|
# Process files as they are uploaded:
|
||||||
|
# process :scale => [200, 300]
|
||||||
|
#
|
||||||
|
# def scale(width, height)
|
||||||
|
# # do something
|
||||||
|
# end
|
||||||
|
|
||||||
|
# Create different versions of your uploaded files:
|
||||||
|
version :thumb do
|
||||||
|
process :resize_to_fill => [64, 64]
|
||||||
|
end
|
||||||
|
version :big_thumb do
|
||||||
|
process :resize_to_fill => [128, 128]
|
||||||
|
end
|
||||||
|
version :resized do
|
||||||
|
process :resize_to_fit => [1024, 1024]
|
||||||
|
end
|
||||||
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
|
# For images you might use something like this:
|
||||||
|
def extension_white_list
|
||||||
|
%w(jpg jpeg gif png)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Override the filename of the uploaded files:
|
||||||
|
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
||||||
|
# def filename
|
||||||
|
# "something.jpg" if original_filename
|
||||||
|
# end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -36,6 +36,9 @@ class PictureUploader < CarrierWave::Uploader::Base
|
|||||||
process :resize_to_fill => [64, 64]
|
process :resize_to_fill => [64, 64]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
version :portrait do
|
||||||
|
process :resize_to_fill => [128,192]
|
||||||
|
end
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
def extension_white_list
|
def extension_white_list
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<%= render 'tabs' %>
|
<%= render 'tabs' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h1><%= I18n.t 'calendars.calendar' %></h1>
|
<h1><%= I18n.t 'calendars.calendar' %></h1>
|
||||||
<% @calendars.each do |calendar| %>
|
<% @calendars.each do |calendar| %>
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<a class="pull-left" href="#">
|
<a class="pull-left" href="#">
|
||||||
<img class="media-object img-circle" src="<%= calendar.picture.thumb.url %>"/>
|
<img class="media-object img-circle" src="<%= calendar.picture.thumb.url %>"/>
|
||||||
</a>
|
</a>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h4><%= link_to calendar.name, calendar %></h4>
|
<h4><%= link_to calendar.name, calendar %></h4>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
</div>
|
||||||
</div>
|
<div class="row-fluid">
|
||||||
</div>
|
<div class="span12">
|
||||||
<div class="row-fluid">
|
<%= link_to 'New Calendar', new_calendar_path unless cannot?(:new, Calendar) %>
|
||||||
<div class="span12">
|
</div>
|
||||||
<%= link_to 'New Calendar', new_calendar_path unless cannot?(:new, Calendar) %>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,15 +1,40 @@
|
|||||||
|
<div class="container-fluid">
|
||||||
|
|
||||||
<%= semantic_form_for @fetprofile do |f| %>
|
<%= semantic_form_for @fetprofile do |f| %>
|
||||||
<%= f.inputs do %>
|
<%= f.inputs do %>
|
||||||
<%= f.input :vorname %>
|
<div class="row-fluid">
|
||||||
<%= f.input :nachname %>
|
<div class="span4">
|
||||||
<%= f.input :short %>
|
<%= f.input :vorname %></div>
|
||||||
<%= f.input :fetmailalias %>
|
<div class="span4"><%= f.input :nachname %></div>
|
||||||
<%= f.input :desc %>
|
<div class="span4"><%= f.input :short %>
|
||||||
<%= f.input :picture %>
|
</div> </div>
|
||||||
<%= f.input :active %>
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<%= f.input :desc %></div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span4"> <%= f.input :active %></div>
|
||||||
|
<div class="span4"><%= f.input :picture, :as=>:file %></div>
|
||||||
|
<div class="span4"> <%= f.input :fetmailalias %></div>
|
||||||
|
</div>
|
||||||
|
<% @fetprofile.memberships.each do |m| %>
|
||||||
|
<%= semantic_fields_for m do |mf| %>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span1"></div>
|
||||||
|
<%= mf.inputs do %>
|
||||||
|
<div class="span3"><%= mf.input :start, :as=>:date %></div>
|
||||||
|
<div class="span3"><%= mf.input :stop %></div>
|
||||||
|
<div class="span3"><%= mf. input :gremium %></div>
|
||||||
|
<div class="span2"><%= mf.input :typ ,:as=>:radio, :collection=>{"mitglied"=>1, "ersatzmitglied"=>2} %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end
|
||||||
|
end %>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
<%= f.action :submit, :as => :input %>
|
<%= f.action :submit, :as => :input %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div></div></div>
|
||||||
|
|||||||
@@ -1,35 +1,25 @@
|
|||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
<h1>Listing fetprofiles</h1>
|
<h1>Listing fetprofiles</h1>
|
||||||
|
</div>
|
||||||
<table>
|
</div>
|
||||||
<tr>
|
|
||||||
<th>Vorname</th>
|
|
||||||
<th>Nachname</th>
|
|
||||||
<th>Short</th>
|
|
||||||
<th>Fetmailalias</th>
|
|
||||||
<th>Desc</th>
|
|
||||||
<th>Picture</th>
|
|
||||||
<th>Active</th>
|
|
||||||
<th></th>
|
|
||||||
<th></th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<% @fetprofiles.each do |fetprofile| %>
|
<% @fetprofiles.each do |fetprofile| %>
|
||||||
<tr>
|
<div class="row-fluid">
|
||||||
<td><%= fetprofile.vorname %></td>
|
<div class="span3">
|
||||||
<td><%= fetprofile.nachname %></td>
|
<%= image_tag fetprofile.picture.portrait.url %>
|
||||||
<td><%= fetprofile.short %></td>
|
</div>
|
||||||
<td><%= fetprofile.fetmailalias %></td>
|
<div class="span9">
|
||||||
<td><%= fetprofile.desc %></td>
|
|
||||||
<td><%= fetprofile.picture %></td>
|
<h2><%= link_to fetprofile.name, fetprofile %></h2>
|
||||||
<td><%= fetprofile.active %></td>
|
<p><%= fetprofile.fetmailalias %></p>
|
||||||
<td><%= link_to 'Show', fetprofile %></td>
|
<p><%= fetprofile.desc %></p>
|
||||||
<td><%= link_to 'Edit', edit_fetprofile_path(fetprofile) %></td>
|
<p><%= fetprofile.active %> </p>
|
||||||
<td><%= link_to 'Destroy', fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
<br />
|
|
||||||
|
|
||||||
<%= link_to 'New Fetprofile', new_fetprofile_path %>
|
<%= link_to 'New Fetprofile', new_fetprofile_path %>
|
||||||
|
</div></div></div>
|
||||||
|
|||||||
@@ -1,40 +1,39 @@
|
|||||||
<p id="notice"><%= notice %></p>
|
<p id="notice"><%= notice %></p>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<%= image_tag @fetprofile.picture.portrait.url %>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
<h2><%= @fetprofile.name %></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Vorname:</b>
|
|
||||||
<%= @fetprofile.vorname %>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Nachname:</b>
|
|
||||||
<%= @fetprofile.nachname %>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Short:</b>
|
|
||||||
<%= @fetprofile.short %>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Fetmailalias:</b>
|
|
||||||
<%= @fetprofile.fetmailalias %>
|
<%= @fetprofile.fetmailalias %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Desc:</b>
|
|
||||||
<%= @fetprofile.desc %>
|
<%= @fetprofile.desc %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Picture:</b>
|
<%= "<b>Aktiv</b>".html_safe if @fetprofile.active %>
|
||||||
<%= @fetprofile.picture %>
|
|
||||||
</p>
|
</p>
|
||||||
|
<p><%= link_to 'Destroy', @fetprofile, method: :delete, data: { confirm: 'Are you sure?' } %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p>
|
<div class="row-fluid">
|
||||||
<b>Active:</b>
|
<div class="span12">
|
||||||
<%= @fetprofile.active %>
|
<ul>
|
||||||
</p>
|
<% @fetprofile.memberships.each do |m| %>
|
||||||
|
<li><%= m.start.to_s %> bis <%= m.stop.to_s %> in <%= m.gremium.try(:name).to_s %>
|
||||||
|
<%= link_to 'edit', edit_fetprofile_membership_path(@fetprofile,m) %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<%= link_to 'Neue Mitgliedschaft', new_fetprofile_membership_path(@fetprofile) %> |
|
||||||
|
|
||||||
<%= link_to 'Edit', edit_fetprofile_path(@fetprofile) %> |
|
<%= link_to 'Edit', edit_fetprofile_path(@fetprofile) %> |
|
||||||
<%= link_to 'Back', fetprofiles_path %>
|
<%= link_to 'Back', fetprofiles_path %>
|
||||||
|
</div>
|
||||||
|
</div></div>
|
||||||
|
|||||||
140
app/views/fotos/_form_bulk.html.erb
Normal file
140
app/views/fotos/_form_bulk.html.erb
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<div class="container">
|
||||||
|
<h2>Upload file</h2>
|
||||||
|
<%= semantic_form_for [@gallery, @foto], :remote=>true, :html => { :multipart => true, :id => "fileupload" } do |f| %>
|
||||||
|
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
||||||
|
<div class="row fileupload-buttonbar">
|
||||||
|
<div class="span7">
|
||||||
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
||||||
|
<span class="btn btn-success fileinput-button">
|
||||||
|
<i class="icon-plus icon-white"></i>
|
||||||
|
<span>Add files...</span>
|
||||||
|
<%= f.file_field :datei, :multiple=>true%>
|
||||||
|
<%= f.input :gallery %>
|
||||||
|
</span>
|
||||||
|
<button type="submit" class="btn btn-primary start">
|
||||||
|
<i class="icon-upload icon-white"></i>
|
||||||
|
<span>Start upload</span>
|
||||||
|
</button>
|
||||||
|
<button type="reset" class="btn btn-warning cancel">
|
||||||
|
<i class="icon-ban-circle icon-white"></i>
|
||||||
|
<span>Cancel upload</span>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-danger delete">
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
<span>Delete</span>
|
||||||
|
</button>
|
||||||
|
<input type="checkbox" class="toggle">
|
||||||
|
</div>
|
||||||
|
<div class="span5">
|
||||||
|
<!-- The global progress bar -->
|
||||||
|
<div class="progress progress-success progress-striped active fade">
|
||||||
|
<div class="bar" style="width:100%;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- The loading indicator is shown during image processing -->
|
||||||
|
<div class="fileupload-loading"></div>
|
||||||
|
<br>
|
||||||
|
<!-- The table listing the files available for upload/download -->
|
||||||
|
<table class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody>
|
||||||
|
</table>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var fileUploadErrors = {
|
||||||
|
maxFileSize: 'File is too big',
|
||||||
|
minFileSize: 'File is too small',
|
||||||
|
acceptFileTypes: 'Filetype not allowed',
|
||||||
|
maxNumberOfFiles: 'Max number of files exceeded',
|
||||||
|
uploadedBytes: 'Uploaded bytes exceed file size',
|
||||||
|
emptyResult: 'Empty file upload result'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- The template to display files available for upload -->
|
||||||
|
<script id="template-upload" type="text/x-tmpl">
|
||||||
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||||
|
<tr class="template-upload fade">
|
||||||
|
<!--<td class="preview"><span class="fade"></span></td>-->
|
||||||
|
<td class="name"><span>{%=file.name%}</span></td>
|
||||||
|
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
||||||
|
{% if (file.error) { %}
|
||||||
|
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
||||||
|
{% } else if (o.files.valid && !i) { %}
|
||||||
|
<td>
|
||||||
|
<div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
|
||||||
|
</td>
|
||||||
|
<td class="start">{% if (!o.options.autoUpload) { %}
|
||||||
|
<button class="btn btn-primary">
|
||||||
|
<i class="icon-upload icon-white"></i>
|
||||||
|
<span>{%=locale.fileupload.start%}</span>
|
||||||
|
</button>
|
||||||
|
{% } %}</td>
|
||||||
|
{% } else { %}
|
||||||
|
<td colspan="2"></td>
|
||||||
|
{% } %}
|
||||||
|
<td class="cancel">{% if (!i) { %}
|
||||||
|
<button class="btn btn-warning">
|
||||||
|
<i class="icon-ban-circle icon-white"></i>
|
||||||
|
<span>{%=locale.fileupload.cancel%}</span>
|
||||||
|
</button>
|
||||||
|
{% } %}</td>
|
||||||
|
</tr>
|
||||||
|
{% } %}
|
||||||
|
</script>
|
||||||
|
<!-- The template to display files available for download -->
|
||||||
|
<script id="template-download" type="text/x-tmpl">
|
||||||
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||||
|
<tr class="template-download fade">
|
||||||
|
{% if (file.error) { %}
|
||||||
|
<td></td>
|
||||||
|
<td class="name"><span>{%=file.name%}</span></td>
|
||||||
|
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
||||||
|
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
||||||
|
{% } else { %}
|
||||||
|
<!--<td class="preview">{% if (file.thumbnail_url) { %}
|
||||||
|
<a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>
|
||||||
|
{% } %}</td>-->
|
||||||
|
<td class="name">
|
||||||
|
<a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>
|
||||||
|
</td>
|
||||||
|
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
||||||
|
<td colspan="2"></td>
|
||||||
|
{% } %}
|
||||||
|
<td class="delete">
|
||||||
|
<button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">
|
||||||
|
<i class="icon-trash icon-white"></i>
|
||||||
|
<span>{%=locale.fileupload.destroy%}</span>
|
||||||
|
</button>
|
||||||
|
<input type="checkbox" name="delete" value="1">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% } %}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$(function () {
|
||||||
|
// Initialize the jQuery File Upload widget:
|
||||||
|
$('#fileupload').fileupload();
|
||||||
|
//
|
||||||
|
// Load existing files:
|
||||||
|
$.getJSON($('#fileupload').prop('action'), function (files) {
|
||||||
|
var fu = $('#fileupload').data('blueimpFileupload'),
|
||||||
|
template;
|
||||||
|
fu._adjustMaxNumberOfFiles(-files.length);
|
||||||
|
console.log(files);
|
||||||
|
// no Download on Upload form
|
||||||
|
//template = fu._renderDownload(files)
|
||||||
|
//.appendTo($('#fileupload .files'));
|
||||||
|
// Force reflow:
|
||||||
|
fu._reflow = fu._transition && template.length &&
|
||||||
|
template[0].offsetWidth;
|
||||||
|
template.addClass('in');
|
||||||
|
$('#loading').remove();
|
||||||
|
});
|
||||||
|
$('#foto_datei').attr('name', 'foto[datei]');
|
||||||
|
$('#foto_datei').fileupload();
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<h1>New foto</h1>
|
<h1>New foto</h1>
|
||||||
|
|
||||||
<%= render 'form' %>
|
<%= render 'form_bulk' %>
|
||||||
|
|
||||||
<%= link_to 'Back', fotos_path %>
|
<%= link_to 'Back', gallery_path(params[:gallery_id]) %>
|
||||||
|
|||||||
@@ -1,25 +1,31 @@
|
|||||||
<p id="notice"><%= notice %></p>
|
|
||||||
|
|
||||||
<p>
|
<div class="container-fluid">
|
||||||
<b>Title:</b>
|
|
||||||
<%= @foto.title %>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Desc:</b>
|
<div class="row-fluid">
|
||||||
<%= @foto.desc %>
|
<div class="span12">
|
||||||
</p>
|
<%= link_to image_tag(@foto.datei.resized.url), gallery_foto_path(@foto.gallery, ((@foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].nil?) ? (@foto.gallery.fotos[0].try(:id).to_i) : @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].try(:id).to_i) ) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p>
|
<div class="row-fluid">
|
||||||
<b>Gallery:</b>
|
<div class="span9">
|
||||||
<%= @foto.gallery_id %>
|
<h2><%= @foto.title %></h2>
|
||||||
</p>
|
<p><%= @foto.desc %></p>
|
||||||
|
</div>
|
||||||
|
<div class="span3">
|
||||||
|
<p>
|
||||||
|
<%= link_to 'last' , gallery_foto_path(@foto.gallery, @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)-1].try(:id).to_i) unless @foto.gallery.fotos.index(@foto)==0 %>
|
||||||
|
<%= link_to 'next' , gallery_foto_path(@foto.gallery, @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].try(:id).to_i) unless @foto.gallery.fotos[@foto.gallery.fotos.index(@foto)+1].nil? %>
|
||||||
|
<%= link_to 'Edit', edit_foto_path(@foto) %> |
|
||||||
|
<%= link_to 'Back', gallery_path(@foto.gallery) %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<p id="notice"><%= notice %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p>
|
|
||||||
<b>Datei:</b>
|
|
||||||
<%= @foto.datei %>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<%= link_to 'Edit', edit_foto_path(@foto) %> |
|
|
||||||
<%= link_to 'Back', fotos_path %>
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<p id="notice"><%= notice %></p>
|
<p id="notice"><%= notice %></p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -14,7 +15,35 @@
|
|||||||
<b>Datum:</b>
|
<b>Datum:</b>
|
||||||
<%= @gallery.datum %>
|
<%= @gallery.datum %>
|
||||||
</p>
|
</p>
|
||||||
|
<!-- modal-gallery is the modal dialog used for the image gallery -->
|
||||||
|
<div id="modal-gallery" class="modal modal-fullscreen modal-gallery hide fade" tabindex="-1">
|
||||||
|
<div class="modal-header">
|
||||||
|
<a class="close" data-dismiss="modal">×</a>
|
||||||
|
<h3 class="modal-title"></h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body"><div class="modal-image"></div></div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a class="btn btn-primary modal-next">Next <i class="icon-arrow-right icon-white"></i></a>
|
||||||
|
<a class="btn btn-info modal-prev"><i class="icon-arrow-left icon-white"></i> Previous</a>
|
||||||
|
<a class="btn btn-success modal-play modal-slideshow" data-slideshow="5000"><i class="icon-play icon-white"></i> Slideshow</a>
|
||||||
|
<a class="btn modal-download" target="_blank"><i class="icon-download"></i> Download</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="gallery" data-toggle="modal-gallery" data-target="#modal-gallery">
|
||||||
|
<% @gallery.fotos.each do |f| %>
|
||||||
|
|
||||||
|
<a href="<%= f.datei.resized.url%>" title="<%=f.title%>" data-gallery="gallery">
|
||||||
|
<%=image_tag(f.datei.big_thumb.url,{:class=>"img-polaroid"}) %></a>
|
||||||
|
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= link_to 'NewFoto' , new_gallery_foto_path(@gallery) %> |
|
||||||
<%= link_to 'Edit', edit_gallery_path(@gallery) %> |
|
<%= link_to 'Edit', edit_gallery_path(@gallery) %> |
|
||||||
<%= link_to 'Back', galleries_path %>
|
<%= link_to 'Back', galleries_path %>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
|
||||||
|
<script src="js/bootstrap.js"></script>
|
||||||
|
<script src="js/load-image.js"></script>
|
||||||
|
<script src="js/bootstrap-image-gallery.js"></script>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<h1>Entwicklungsprojekt</h1>
|
<h1>Entwicklungsprojekt</h1>
|
||||||
|
<%= link_to "notimplemented", home_linksnotimplemented_path %>
|
||||||
<h2>Feature List: 2013-07-17</h2>
|
<h2>Feature List: 2013-07-17</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Info zu Studien/Studienpläne</li>
|
<li>Info zu Studien/Studienpläne</li>
|
||||||
|
|||||||
8
app/views/home/links_notimplemented.html.erb
Normal file
8
app/views/home/links_notimplemented.html.erb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Vorhandene Resourcen
|
||||||
|
<ul>
|
||||||
|
<li><%= link_to "galleries", galleries_path %></li>
|
||||||
|
<li><%= link_to "fotos", fotos_path %></li>
|
||||||
|
<li><%= link_to "gremien", gremien_path %></li>
|
||||||
|
<li><%= link_to "fetprofiles", fetprofiles_path %></li>
|
||||||
|
<li><%= link_to "memberships", memberships_path %></li>
|
||||||
|
</ul>
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
<h2>Git installieren und Repository koperen</h2>
|
<h2>Git installieren und Repository koperen</h2>
|
||||||
Falls noch nicht installiert, GIT installieren
|
Falls noch nicht installiert, GIT installieren
|
||||||
<pre>sudo apt-get install git git-cola</pre>
|
<pre>sudo apt-get install git git-cola</pre>
|
||||||
Repository auf Github forken und dann auf dem Rechner clonen.
|
Repository auf Github forken und dann auf dem Rechner clonen.
|
||||||
|
Den folgenden Befehl im Verzeichnis in das gekont werden soll ausführen.
|
||||||
<pre>git clone https://github.com/<github username>/fetsite</pre>
|
<pre>git clone https://github.com/<github username>/fetsite</pre>
|
||||||
<h2>Ruby on Rails installieren </h2>
|
<h2>Ruby on Rails installieren </h2>
|
||||||
Ruby 1.9 installieren wobei wichtig ist, dass die Version 1.9 ist
|
Ruby 1.9 installieren wobei wichtig ist, dass die Version 1.9 ist
|
||||||
@@ -12,6 +13,7 @@ Falls mehrere Ruby Versionen installiert ist mit
|
|||||||
<pre> sudo update-alternatives --config ruby</pre>
|
<pre> sudo update-alternatives --config ruby</pre>
|
||||||
überprüfen, dass Ruby 1.9 verwendet wird.
|
überprüfen, dass Ruby 1.9 verwendet wird.
|
||||||
<pre>sudo apt-get install rubygems1.9</pre>
|
<pre>sudo apt-get install rubygems1.9</pre>
|
||||||
|
Im angelegten Verzeichnis den bundle installer ausführen.
|
||||||
<pre>sudo gem install bundler</pre>
|
<pre>sudo gem install bundler</pre>
|
||||||
ImageMagick,sqlite3 installieren
|
ImageMagick,sqlite3 installieren
|
||||||
<pre>sudo apt-get install libmagickwand-dev libsqlite3-dev nodejs</pre>
|
<pre>sudo apt-get install libmagickwand-dev libsqlite3-dev nodejs</pre>
|
||||||
|
|||||||
@@ -5,9 +5,14 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Fetsite</title>
|
<title>Fetsite</title>
|
||||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||||
|
<link rel="stylesheet" href="css/bootstrap.css">
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-responsive.css">
|
||||||
|
<!--[if lt IE 7]><link rel="stylesheet" href="css/bootstrap-ie6.css"><![endif]-->
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
|
||||||
<%= javascript_include_tag "application" %>
|
<%= javascript_include_tag "application" %>
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
||||||
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
|
<li><%= link_to I18n.t(:info,:scope=>'home' ),themengruppen_path %></li>
|
||||||
|
<li><%= link_to I18n.t('mitarbeiter',:scope=>'home' ),fetprofiles_path %></li>
|
||||||
|
<li><%= link_to I18n.t('fotos',:scope=>'home' ),galleries_path %></li>
|
||||||
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
|
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
|
||||||
<li><%= link_to "Kalender", calendars_path %></li>
|
<li><%= link_to "Kalender", calendars_path %></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
|
|||||||
@@ -1,10 +1,28 @@
|
|||||||
<%= semantic_form_for @lecturer do |f| %>
|
<%= semantic_form_for @lecturer do |f| %>
|
||||||
<%= f.inputs do %>
|
<%= f.inputs do %>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span6">
|
||||||
<%= f.input :name %>
|
<%= f.input :name %>
|
||||||
<%= f.input :email %>
|
<%= f.input :email %>
|
||||||
<%= f.input :oid %>
|
<%= f.input :link %>
|
||||||
<%= f.input :picture %>
|
</div>
|
||||||
<%= f.input :lvas %>
|
<div class="span3">
|
||||||
|
<p>
|
||||||
|
<label>Bild</label>
|
||||||
|
<%= image_tag(@lecturer.picture.thumb.url) unless @lecturer.picture.nil? %>
|
||||||
|
<%= f.file_field :picture %>
|
||||||
|
<%= f.hidden_field :picture_cache %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label>
|
||||||
|
<%= f.check_box :remove_picture %>
|
||||||
|
Bild Entfernen
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="span3">
|
||||||
|
<%= f.input :lvas, :as=>:check_boxes%>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
|
|||||||
11
app/views/lecturers/_lec_lva.html.erb
Normal file
11
app/views/lecturers/_lec_lva.html.erb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<div class="media">
|
||||||
|
<a class="pull-left" href="#">
|
||||||
|
<img class="media-object img" src="<%= lec_lva.picture.thumb.url %>"/>
|
||||||
|
</a>
|
||||||
|
<div class="media-body">
|
||||||
|
<h4><%= link_to lec_lva.name, lec_lva %></h4>
|
||||||
|
Email: <%= mail_to lec_lva.email %><br>
|
||||||
|
TISS: <%= link_to lec_lva.name, lec_lva.link %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<div class="span3">
|
<div class="span3">
|
||||||
|
|
||||||
<%= f.input :semester, :as=>:check_boxes%>
|
<%= f.input :semester, :as=>:check_boxes%>
|
||||||
|
<%= f.input :lecturers, :as=>:check_boxes%>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
|
|||||||
@@ -18,17 +18,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<h2>Beispiele</h2>
|
<h2>Beispiele</h2>
|
||||||
<p><h4>Beschreibung</h4>
|
<ul>
|
||||||
<%= @lva.desc %>
|
<% @lva.beispiele.each do |b|%>
|
||||||
|
|
||||||
<%= link_to "Beispiel neu" , new_beispiel_path(:lva_id=>@lva.id) %>
|
|
||||||
</p>
|
|
||||||
<h4>Beispiele</h4>
|
|
||||||
<ul>
|
|
||||||
<% @lva.beispiele.each do |b|%>
|
|
||||||
|
|
||||||
<%= render b%>
|
<%= render b%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
@@ -53,6 +47,13 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="lva-sidebar">
|
||||||
|
<h2> <%= I18n.t "lecturers.lecturers" %> </h2>
|
||||||
|
<% @lva.lecturers.each do |lec| %>
|
||||||
|
<%= render :partial=>'lecturers/lec_lva', :object=>lec %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<%= semantic_form_for @membership do |f| %>
|
<%= semantic_form_for @membership do |f| %>
|
||||||
<%= f.inputs do %>
|
<%= f.inputs do %>
|
||||||
<%= f.input :fetprofile_id %>
|
<%= f.input :gremium, :as=>:radio %>
|
||||||
<%= f.input :gremium_id %>
|
|
||||||
<%= f.input :start %>
|
<%= f.input :start %>
|
||||||
<%= f.input :stop %>
|
<%= f.input :stop %>
|
||||||
<%= f.input :typ %>
|
<%= f.input :typ ,:as=>:radio, :collection=>{"mitglied"=>1, "ersatzmitglied"=>2} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= f.actions do %>
|
<%= f.actions do %>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<h2><%= link_to neuigkeit.title,neuigkeit_path(neuigkeit) %></h2>
|
<h2><%= link_to neuigkeit.title,neuigkeit_path(neuigkeit) %></h2>
|
||||||
<%= if !neuigkeit.author.nil?
|
<%= if !neuigkeit.author.nil?
|
||||||
neuigkeit.author.email
|
neuigkeit.author.email
|
||||||
|
|||||||
@@ -1,14 +1,30 @@
|
|||||||
<ul class="breadcrumb">
|
<div class="container-fluid">
|
||||||
<li><%= link_to "Neuigkeiten", rubriken_path %></li>
|
<div class="row-fluid">
|
||||||
<li><span class="divider">/</span></li>
|
<div class="span12">
|
||||||
<li><%= link_to @neuigkeit.rubrik.name , rubrik_path(@neuigkeit.rubrik) %> </li>
|
<%= render 'rubriken/tabs' %>
|
||||||
</ul>
|
<p id="notice"><%= notice %></p>
|
||||||
<p id="notice"><%= notice %></p>
|
</div>
|
||||||
|
</div>
|
||||||
<%= render @neuigkeit %>
|
<div class="row-fluid">
|
||||||
<p>
|
<div class="span9">
|
||||||
<b>Datum:</b>
|
<%= @neuigkeit.rubrik.name %>
|
||||||
<%= @neuigkeit.datum %>
|
</div>
|
||||||
</p>
|
<div class="span3"><p>
|
||||||
|
<%= @neuigkeit.try(:author).email.to_s %> am
|
||||||
|
<%= I18n.l @neuigkeit.datum.to_date %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span12">
|
||||||
|
<div class="media">
|
||||||
|
<div class="pull-right" href="#">
|
||||||
|
<p><br><%= "FOTO" %></p>
|
||||||
|
</div>
|
||||||
|
<div class="media-body">
|
||||||
|
<h1><%= link_to @neuigkeit.title,neuigkeit_path(@neuigkeit) %></h1>
|
||||||
|
<%= raw(@neuigkeit.text) %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= toolbar_html (@toolbar_elements) %>
|
<%= toolbar_html (@toolbar_elements) %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li <%= (request.fullpath == rubriken_path)? 'class="active"'.html_safe : ''%> >
|
<li <%= 'class="active"'.html_safe if (request.fullpath == rubriken_path)%> >
|
||||||
<%= link_to I18n.t ('rubriken.alle') , calendars_url %> </li>
|
<%= link_to I18n.t('rubriken.alle') , rubriken_path %> </li>
|
||||||
<% for r in Rubrik.all %>
|
<% for r in Rubrik.all %>
|
||||||
<li <%= (!@rubrik.nil? && r == @rubrik) ? 'class="active"'.html_safe : '' %> title="<%= r.name %>">
|
<li <%= (!@rubrik.nil? && r == @rubrik) ? 'class="active"'.html_safe : '' %> title="<%= r.name %>">
|
||||||
<%= link_to r.name, r %>
|
<%= link_to r.name, r %>
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<%= render 'tabs' %>
|
<%= render 'tabs' %>
|
||||||
<h1><%= I18n.t("rubrik.title")%></h1>
|
<h1><%= I18n.t("rubrik.title")%></h1>
|
||||||
<% @rubriken.each do |rubrik| %>
|
<% @rubriken.each do |rubrik| %>
|
||||||
|
|
||||||
|
<% rubrik.neuigkeiten.recent.each do |n| %>
|
||||||
<%=
|
<li><%= link_to n.title+"("+rubrik.name+")" , n %> </li>
|
||||||
html="<b>".html_safe + rubrik.name + "</b> <br>".html_safe + rubrik.desc + "<br>".html_safe
|
<% end %>
|
||||||
|
<%= link_to 'Weitere Artikel zu '+rubrik.name.to_s , rubrik %>
|
||||||
link_to( html , rubrik )%>
|
|
||||||
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,15 @@
|
|||||||
<h1><%= I18n.t("studien.list") %></h1>
|
<h1><%= I18n.t("studien.list") %></h1>
|
||||||
|
|
||||||
|
|
||||||
<% @studien.sort_by{|z| z[:zahl]}.each do |studium| %>
|
<% @studien.each_slice(2) do |row| %>
|
||||||
<div class="span5">
|
<div class="row-fluid">
|
||||||
|
<% row.each do |studium|%>
|
||||||
|
<div class="span6">
|
||||||
<%= render studium%>
|
<%= render studium%>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<%end%>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,9 @@
|
|||||||
<div class="studien-semester">
|
<div class="studien-semester">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
|
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
<h2><%= sem.name %></h2>
|
<h2><%= sem.name %></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="span4"><div class="pull-right"><%= link_to 'Lvas hinzufügen/entfernen', edit_semester_path(sem), :class=>"btn-small"%></div>
|
<div class="span4"><div class="pull-right"><%= link_to 'Lvas hinzufügen/entfernen', edit_semester_path(sem), :class=>"btn-small"%></div>
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|||||||
@@ -5,12 +5,18 @@
|
|||||||
|
|
||||||
<h1><%= I18n.t("studien.verwaltung.title") %></h1>
|
<h1><%= I18n.t("studien.verwaltung.title") %></h1>
|
||||||
<%= I18n.t("studien.verwaltung.explanation").html_safe %>
|
<%= I18n.t("studien.verwaltung.explanation").html_safe %>
|
||||||
<h2>Studien </h2>
|
<h2><%= I18n.t "studien.studien"%> </h2>
|
||||||
<div class="verwalten-block">
|
<div class="verwalten-block">
|
||||||
|
<div class="row-fluid">
|
||||||
|
|
<% @studien.each_slice([(Studium.count/2.0).ceil, 1].max) do |col| %>
|
||||||
<% @studien.each do |s| %>
|
|
||||||
<%= (s.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %> <%= link_to s.name, s %> | <%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_studium_path(s)%> ||<% end %>
|
<div class="span6">
|
||||||
|
<% col.each do |s| %>
|
||||||
|
<%= (s.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %> <%= link_to s.name, s %> | <%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_studium_path(s)%> <br>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<div class="btn-toolbar">
|
<div class="btn-toolbar">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||||
@@ -21,14 +27,42 @@
|
|||||||
<li> <%= link_to 'Alle Studien', studien_verwalten_path(:std_verw=>nil) %></li>
|
<li> <%= link_to 'Alle Studien', studien_verwalten_path(:std_verw=>nil) %></li>
|
||||||
<% for s in @studien %>
|
<% for s in @studien %>
|
||||||
<li> <%= link_to s.name, studien_verwalten_path(:std_verw=>s)%> </li>
|
<li> <%= link_to s.name, studien_verwalten_path(:std_verw=>s)%> </li>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<%= link_to 'Neues Studium', new_studium_path, :class=>'btn'%>
|
<%= link_to 'Neues Studium', new_studium_path, :class=>'btn'%>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<h2>Vortragende </h2>
|
||||||
|
<div class="verwalten-block">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<% @lecturers.each_slice([(Lecturer.count/3.0).ceil, 1].max) do |col| %>
|
||||||
|
<div class="span4">
|
||||||
|
<% col.each do |lec| %>
|
||||||
|
<%= (lec.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %> <%= link_to lec.name, lec %> | <%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_lecturer_path(lec)%> <br>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="btn-toolbar">
|
||||||
|
<div class="btn-group">
|
||||||
|
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
|
||||||
|
<%= params[:lec_verw].nil? ? I18n.t("filter.lecturer") : Lecturer.find(params[:lec_verw]).name %>
|
||||||
|
|
||||||
|
<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li> <%= link_to 'Alle Vortragenden', studien_verwalten_path(:lec_verw=>nil) %></li>
|
||||||
|
<% for lec in @lecturers %>
|
||||||
|
<li> <%= link_to lec.name, studien_verwalten_path(:lec_verw=>lec)%> </li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<%= link_to "Neuer Vortragender", new_lecturer_path, :class=>"btn"%>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
|
|
||||||
@@ -36,7 +70,7 @@
|
|||||||
<h2>Modulgruppen </h2>
|
<h2>Modulgruppen </h2>
|
||||||
<div class="verwalten-block">
|
<div class="verwalten-block">
|
||||||
<% @modulgruppen.each do |mg| %>
|
<% @modulgruppen.each do |mg| %>
|
||||||
<%= (mg.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %> <%= link_to mg.name, mg %> | <%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_modulgruppe_path(mg)%><br>
|
<%= (mg.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %> <%= link_to mg.name, mg %> | <%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_modulgruppe_path(mg)%><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="btn-toolbar">
|
<div class="btn-toolbar">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -94,7 +128,7 @@
|
|||||||
|
|
||||||
<% @lvas.each do |lva| %>
|
<% @lvas.each do |lva| %>
|
||||||
<%= (lva.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %><%= link_to lva.name, lva %> |
|
<%= (lva.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %><%= link_to lva.name, lva %> |
|
||||||
<%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_lva_path(lva)%><br>
|
<%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_lva_path(lva)%><br>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="btn-toolbar">
|
<div class="btn-toolbar">
|
||||||
@@ -123,7 +157,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<%= link_to I18n.t("filter.reset"), studien_verwalten_path(:std_verw=>nil, :mg_verw=>nil, :m_verw=>nil, :lva_verw=>nil, :b_verw=>nil), :class=>"btn" %>
|
<%= link_to I18n.t("filter.reset"), studien_verwalten_path(:std_verw=>nil, :mg_verw=>nil, :m_verw=>nil, :lva_verw=>nil, :b_verw=>nil), :class=>"btn" %>
|
||||||
<h2>Error Log</h2>
|
<h2>Error Log</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><font color="red"><b>Red</b></font>: Error, Solve immediately</li>
|
<li><font color="red"><b>Red</b></font>: Error, Solve immediately</li>
|
||||||
@@ -132,7 +166,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="verwalten-block">
|
<div class="verwalten-block">
|
||||||
<ul>
|
<ul>
|
||||||
<% @messages.flatten.each do |m| %>
|
<% @messages.flatten.compact.each do |m| %>
|
||||||
<% if !m.strip.empty? %>
|
<% if !m.strip.empty? %>
|
||||||
<li><%= m.html_safe %></li>
|
<li><%= m.html_safe %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -145,7 +179,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<% @beispiele.each do |b| %>
|
<% @beispiele.each do |b| %>
|
||||||
<%= (b.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %> <%= link_to b.name, b %> | <%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_beispiel_path(b)%>
|
<%= (b.valid?) ? '<i class="icon-ok"> </i>'.html_safe : '<i class="icon-remove"></i>'.html_safe %> <%= link_to b.name, b %> | <%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_beispiel_path(b)%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="btn-toolbar">
|
<div class="btn-toolbar">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Devise.setup do |config|
|
|||||||
config.mailer_sender = "test@example.com"
|
config.mailer_sender = "test@example.com"
|
||||||
|
|
||||||
# Configure the class responsible to send e-mails.
|
# Configure the class responsible to send e-mails.
|
||||||
# config.mailer = "Devise::Mailer"
|
config.mailer = "Devise::Mailer"
|
||||||
config.mailer.default_url_options = { :host => 'glonass.htu.tuwien.ac.at' }
|
config.mailer.default_url_options = { :host => 'glonass.htu.tuwien.ac.at' }
|
||||||
config.mailer.delivery_method = :sendmail
|
config.mailer.delivery_method = :sendmail
|
||||||
# config.mailer.smtp_settings = {
|
# config.mailer.smtp_settings = {
|
||||||
|
|||||||
@@ -1,44 +1,12 @@
|
|||||||
# Sample localization file for English. Add more files in this directory for other locales.
|
# Sample localization file for English. Add more files in this directory for other locales.
|
||||||
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
||||||
de:
|
de:
|
||||||
|
ohnezuordnung: "Ohne Zuordnung"
|
||||||
hello: "Hallo Welt"
|
hello: "Hallo Welt"
|
||||||
common:
|
common:
|
||||||
edit: "Bearbeiten"
|
edit: "Bearbeiten"
|
||||||
actions: "Aktionen"
|
actions: "Aktionen"
|
||||||
delete: "Löschen"
|
delete: "Löschen"
|
||||||
studien:
|
|
||||||
list: "Studien der Fakultät Elektrotechnik"
|
|
||||||
anzeigen: "Studium anzeigen"
|
|
||||||
new: "Neues Studium"
|
|
||||||
allestudien: "Alle Studien"
|
|
||||||
loeschen: "Dieses Studium löschen"
|
|
||||||
edit: "Studium bearbeiten"
|
|
||||||
verwaltung:
|
|
||||||
title: "Studien verwalten"
|
|
||||||
explanation: "<ul>
|
|
||||||
<li>Klick auf den Namen eines Objektes führt zu dessen Ansicht, ein Klick auf edit direkt zum Bearbeitungsformular</li>
|
|
||||||
<li>Per Dropdown-Menü kann nach einzelnen Objekten gefiltert werden. Die Filter können kombiniert werden, wobei nur erlaubte Kombinationen möglich sind. <b>Solange validation-Fehler (im Log rot und fett) auftreten, keine Filter verwenden</b></li>
|
|
||||||
</ul>"
|
|
||||||
modul:
|
|
||||||
edit: "Modul bearbeiten"
|
|
||||||
list: "Alle Module"
|
|
||||||
add: "Neues Modul"
|
|
||||||
keine:
|
|
||||||
beschreibung: "Keine Beschreibung vorhanden"
|
|
||||||
lva:
|
|
||||||
add: "Lva hinzufügen"
|
|
||||||
list: "Alle Lvas"
|
|
||||||
semester:
|
|
||||||
ohne: "Ohne Semesterzuordnung"
|
|
||||||
modulgruppe:
|
|
||||||
typ: "Typ"
|
|
||||||
addmodul: "Neues Modul hinzufügen"
|
|
||||||
studium: "Studium"
|
|
||||||
new: "Neue Modulgruppe"
|
|
||||||
list: "Alle Modulgruppen auflisten"
|
|
||||||
show:
|
|
||||||
title: "Auflistung aller Modulgruppen"
|
|
||||||
link: "Modulgruppen auflisten"
|
|
||||||
|
|
||||||
home:
|
home:
|
||||||
mtitle: "Menu"
|
mtitle: "Menu"
|
||||||
@@ -48,7 +16,8 @@ de:
|
|||||||
studien: "Studien"
|
studien: "Studien"
|
||||||
news: "Neuigkeiten"
|
news: "Neuigkeiten"
|
||||||
info: "Information"
|
info: "Information"
|
||||||
|
mitarbeiter: "Mitarbeiter"
|
||||||
|
fotos: "Fotos"
|
||||||
formtastic:
|
formtastic:
|
||||||
titles:
|
titles:
|
||||||
modul:
|
modul:
|
||||||
@@ -110,16 +79,6 @@ de:
|
|||||||
attributes:
|
attributes:
|
||||||
modulgruppen:
|
modulgruppen:
|
||||||
blank: "Wählen Sie zumindest eine Modulgruppe aus"
|
blank: "Wählen Sie zumindest eine Modulgruppe aus"
|
||||||
filter:
|
|
||||||
studium: "Studium"
|
|
||||||
modulgruppe: "Modulgruppe"
|
|
||||||
modul: "Modul"
|
|
||||||
lva: "Lva"
|
|
||||||
beispiel: "Beispiel"
|
|
||||||
reset: "Alle Filter zurücksetzen"
|
|
||||||
verwalten:
|
|
||||||
fehler:
|
|
||||||
keine: "Keine Fehlermeldungen oder Warnungen"
|
|
||||||
support:
|
support:
|
||||||
array:
|
array:
|
||||||
two_words_connector: ', '
|
two_words_connector: ', '
|
||||||
|
|||||||
47
config/locales/studien.de.yml
Normal file
47
config/locales/studien.de.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
de:
|
||||||
|
studien:
|
||||||
|
studien: "Studien"
|
||||||
|
list: "Studien der Fakultät Elektrotechnik"
|
||||||
|
anzeigen: "Studium anzeigen"
|
||||||
|
new: "Neues Studium"
|
||||||
|
allestudien: "Alle Studien"
|
||||||
|
loeschen: "Dieses Studium löschen"
|
||||||
|
edit: "Studium bearbeiten"
|
||||||
|
verwaltung:
|
||||||
|
title: "Studien verwalten"
|
||||||
|
explanation: "<ul>
|
||||||
|
<li>Klick auf den Namen eines Objektes führt zu dessen Ansicht, ein Klick auf edit direkt zum Bearbeitungsformular</li>
|
||||||
|
<li>Per Dropdown-Menü kann nach einzelnen Objekten gefiltert werden. Die Filter können kombiniert werden, wobei nur erlaubte Kombinationen möglich sind. <b>Solange validation-Fehler (im Log rot und fett) auftreten, keine Filter verwenden</b></li>
|
||||||
|
</ul>"
|
||||||
|
modul:
|
||||||
|
edit: "Modul bearbeiten"
|
||||||
|
list: "Alle Module"
|
||||||
|
add: "Neues Modul"
|
||||||
|
keine:
|
||||||
|
beschreibung: "Keine Beschreibung vorhanden"
|
||||||
|
lva:
|
||||||
|
add: "Lva hinzufügen"
|
||||||
|
list: "Alle Lvas"
|
||||||
|
semester:
|
||||||
|
ohne: "Ohne Semesterzuordnung"
|
||||||
|
modulgruppe:
|
||||||
|
typ: "Typ"
|
||||||
|
addmodul: "Neues Modul hinzufügen"
|
||||||
|
studium: "Studium"
|
||||||
|
new: "Neue Modulgruppe"
|
||||||
|
list: "Alle Modulgruppen auflisten"
|
||||||
|
show:
|
||||||
|
title: "Auflistung aller Modulgruppen"
|
||||||
|
link: "Modulgruppen auflisten"
|
||||||
|
filter:
|
||||||
|
studium: "Studium"
|
||||||
|
modulgruppe: "Modulgruppe"
|
||||||
|
modul: "Modul"
|
||||||
|
lva: "Lva"
|
||||||
|
beispiel: "Beispiel"
|
||||||
|
reset: "Alle Filter zurücksetzen"
|
||||||
|
verwalten:
|
||||||
|
fehler:
|
||||||
|
keine: "Keine Fehlermeldungen oder Warnungen"
|
||||||
|
lecturers:
|
||||||
|
lecturers: "Vortragende"
|
||||||
@@ -36,11 +36,14 @@
|
|||||||
get 'verwalten/studien', :controller=>:studien, :action=>:verwalten, :as=>'studien_verwalten'
|
get 'verwalten/studien', :controller=>:studien, :action=>:verwalten, :as=>'studien_verwalten'
|
||||||
|
|
||||||
resources :fetzneditions
|
resources :fetzneditions
|
||||||
|
resources :galleries do
|
||||||
resources :fotos
|
resources :fotos
|
||||||
resources :galleries
|
end
|
||||||
resources :memberships
|
resources :memberships, :except=>[:new, :show, :edit]
|
||||||
resources :gremien
|
resources :gremien
|
||||||
resources :fetprofiles
|
resources :fetprofiles do
|
||||||
|
resources :memberships, :only=>[:new, :show, :edit]
|
||||||
|
end
|
||||||
resources :lecturers
|
resources :lecturers
|
||||||
resources :semesters
|
resources :semesters
|
||||||
resources :moduls
|
resources :moduls
|
||||||
@@ -59,6 +62,9 @@
|
|||||||
resources :home, :only=>[:index]
|
resources :home, :only=>[:index]
|
||||||
get 'home/dev', :controller=>:home, :action=>:dev, :as=>'home_dev'
|
get 'home/dev', :controller=>:home, :action=>:dev, :as=>'home_dev'
|
||||||
get 'home/startdev', :controller=>:home, :action=>:startdev, :as=>'home_startdev'
|
get 'home/startdev', :controller=>:home, :action=>:startdev, :as=>'home_startdev'
|
||||||
|
get 'home/linksnotimplemented', :controller=>:home, :action=>:linksnotimplemented, :as=>'home_linksnotimplemented'
|
||||||
|
|
||||||
|
|
||||||
resources :beispiele
|
resources :beispiele
|
||||||
resources :attachment
|
resources :attachment
|
||||||
resources :themen
|
resources :themen
|
||||||
|
|||||||
7
db/migrate/20130819143148_remove_name_from_semesters.rb
Normal file
7
db/migrate/20130819143148_remove_name_from_semesters.rb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
class RemoveNameFromSemesters < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
remove_column :semesters, :name
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20130821113333_add_link_to_lecturers.rb
Normal file
5
db/migrate/20130821113333_add_link_to_lecturers.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
class AddLinkToLecturers < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :lecturers, :link, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user