Merge remote-tracking branch 'origin/master'

Conflicts:
	.gitignore
This commit is contained in:
2014-04-13 15:55:25 +02:00
36 changed files with 242 additions and 161 deletions

1
.gitignore vendored
View File

@@ -29,6 +29,7 @@ Gemfile.lock
console console
/server /server
/public/uploads/ /public/uploads/
/vendor/*
/bak/* /bak/*
*# *#
Gemfile.lock Gemfile.lock

View File

@@ -2,6 +2,7 @@ source 'https://rubygems.org'
gem 'rails', '3.2.13' gem 'rails', '3.2.13'
gem 'sprockets', '2.2.2' gem 'sprockets', '2.2.2'
gem 'webrick', '1.3.1'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2' gem 'mysql2'

View File

@@ -9,6 +9,11 @@ class NeuigkeitenController < ApplicationController
def show def show
@neuigkeit = Neuigkeit.find(params[:id]) @neuigkeit = Neuigkeit.find(params[:id])
@rubrik=@neuigkeit.rubrik @rubrik=@neuigkeit.rubrik
if can?(:shownonpublic, Rubrik)
@rubriken = Rubrik.all
else
@rubriken = Rubrik.where(:public=>true)
end
if !params[:version].nil? if !params[:version].nil?
@neuigkeit.assign_attributes(@neuigkeit.translation.versions.reverse[params[:version].to_i].reify.attributes.select{|k,v| @neuigkeit.translated_attribute_names.include? k.to_sym }) @neuigkeit.assign_attributes(@neuigkeit.translation.versions.reverse[params[:version].to_i].reify.attributes.select{|k,v| @neuigkeit.translated_attribute_names.include? k.to_sym })

View File

@@ -2,14 +2,25 @@ class RubrikenController < ApplicationController
before_filter {@toolbar_elements=[]} before_filter {@toolbar_elements=[]}
load_and_authorize_resource load_and_authorize_resource
def index def index
@rubriken = Rubrik.all if can?(:shownonpublic, Rubrik)
@neuigkeiten = Neuigkeit.recent @rubriken = Rubrik.all
@calentries= Calentry.public else
@rubriken = Rubrik.where(:public=>true)
end
@neuigkeiten = @rubriken.collect(&:neuigkeiten).map(&:recent).flatten
@calentries= @rubriken.collect(&:calendar).collect(&:calentries).flatten
end end
def show def show
if can?(:shownonpublic, Rubrik)
@rubriken = Rubrik.all
else
@rubriken = Rubrik.where(:public=>true)
end
@rubrik = Rubrik.find(params[:id]) @rubrik = Rubrik.find(params[:id])
@moderatoren=User.with_role(:newsmoderator,@rubrik) @moderatoren=User.with_role(:newsmoderator,@rubrik)
@calentries= @rubrik.calentries
if can?(:showunpublished, Neuigkeit) if can?(:showunpublished, Neuigkeit)
@neuigkeiten = @rubrik.neuigkeiten @neuigkeiten = @rubrik.neuigkeiten
else else

View File

@@ -34,6 +34,7 @@ class StudienController < ApplicationController
@toolbar_elements=[{:icon=>:plus, :hicon =>'icon-plus-sign' ,:text=> I18n.t('studien.new') , :path => new_studium_path(@studium) }, @toolbar_elements=[{:icon=>:plus, :hicon =>'icon-plus-sign' ,:text=> I18n.t('studien.new') , :path => new_studium_path(@studium) },
{:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('common.edit'),:path => edit_studium_path(@studium)}, {:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('common.edit'),:path => edit_studium_path(@studium)},
{:icon=>:pencil, :hicon=>'icon-pencil',:text =>I18n.t('common.edit'),:path => edit_lvas_studium_path(@studium)},
{:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => studium_path(@studium), :method=> :delete,:confirm=>'Sure?' }] {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => studium_path(@studium), :method=> :delete,:confirm=>'Sure?' }]
@toolbar_modulgruppen =[ {:hicon=>'icon-plus-sign', :text=> I18n.t('modulgruppe.new'), :path=>new_studium_modulgruppe_path(@studium)}, @toolbar_modulgruppen =[ {:hicon=>'icon-plus-sign', :text=> I18n.t('modulgruppe.new'), :path=>new_studium_modulgruppe_path(@studium)},
@@ -57,6 +58,15 @@ class StudienController < ApplicationController
@toolbar_elements<<{:text =>I18n.t('studien.allestudien'),:path=>studien_path(@studium)} @toolbar_elements<<{:text =>I18n.t('studien.allestudien'),:path=>studien_path(@studium)}
end end
def edit_lvas
@studium = Studium.find(params[:id])
@lvas=@studium.lvas
@semester=@studium.semester
@toolbar_elements=[{:text => I18n.t('studien.anzeigen') , :path => url_for(@studium) }]
@toolbar_elements<<{:text =>I18n.t('studien.allestudien'),:path=>studien_path(@studium)}
end
def create def create
@studium = Studium.new(params[:studium]) @studium = Studium.new(params[:studium])
@@ -73,9 +83,13 @@ class StudienController < ApplicationController
def update def update
@studium = Studium.find(params[:id]) @studium = Studium.find(params[:id])
logger.info "params: #{params[:studium].inspect}"
if @studium.update_attributes(params[:studium]) if @studium.update_attributes(params[:studium])
redirect_to url_for(@studium), notice: 'Studium was successfully updated.' if @studium.lvas.map(&:valid?).all?
redirect_to url_for(@studium), notice: 'Studium was successfully updated.'
else
render action: "edit"
end
else else
render action: "edit" render action: "edit"

View File

@@ -76,6 +76,7 @@ class Ability
if user.has_role?("newsadmin") || user.has_role?( "fetadmin") || user.has_role?( "fetuser") if user.has_role?("newsadmin") || user.has_role?( "fetadmin") || user.has_role?( "fetuser")
can :manage, Rubrik can :manage, Rubrik
can :manage, Neuigkeit can :manage, Neuigkeit
can :shownonpublic, Rubrik
can :showunpublished, Neuigkeit can :showunpublished, Neuigkeit
end end

View File

@@ -36,14 +36,18 @@
class Lva < ActiveRecord::Base class Lva < ActiveRecord::Base
ERLAUBTE_TYPEN = ['VO', 'UE', 'VU', 'LU', 'SE', 'andere']; ERLAUBTE_TYPEN = ['VO', 'UE', 'VU', 'LU', 'SE', 'andere'];
has_paper_trail :ignore=>[:desc, :pruefungsinformation]# Versionsverfolgung has_paper_trail :ignore=>[:desc, :pruefungsinformation]# Versionsverfolgung
translates :desc,:pruefungsinformation, :fallbacks_for_empty_translations => true, :versioning=>true
attr_accessible :desc, :ects, :lvanr, :name, :stunden, :modul_ids, :semester_ids, :pruefungsinformation, :lernaufwand, :typ, :lecturer_ids attr_accessible :desc, :ects, :lvanr, :name, :stunden, :modul_ids, :semester_ids, :pruefungsinformation, :lernaufwand, :typ, :lecturer_ids
has_and_belongs_to_many :modul,:uniq=>true # Gehört zu einem Modul has_and_belongs_to_many :modul,:uniq=>true # Gehört zu einem Modul
has_and_belongs_to_many :semester has_and_belongs_to_many :semester
#Gehört zu einem Semester( derzeit nicht implementiert)
has_many :beispiele , :class_name => "Beispiel" has_many :beispiele , :class_name => "Beispiel"
has_and_belongs_to_many :lecturers has_and_belongs_to_many :lecturers
translates :desc,:pruefungsinformation, :fallbacks_for_empty_translations => true, :versioning=>true has_many :nlinks, as: :link
scope :search, ->(query) {where("name like ? or lvas.desc like ?", "%#{query}%", "%#{query}%")} scope :search, ->(query) {where("name like ? or lvas.desc like ?", "%#{query}%", "%#{query}%")}
validates :lvanr,:format=>{ :with => /^[0-9][0-9][0-9]\.[0-9A][0-9][0-9]$/}, :presence=>true, :uniqueness=>true # , :uniqueness=>true # LVA-Nummer muss das Format 000.000 besitzen (uniqueness?) oder 000 für nicht validates :lvanr,:format=>{ :with => /^[0-9][0-9][0-9]\.[0-9A][0-9][0-9]$/}, :presence=>true, :uniqueness=>true # , :uniqueness=>true # LVA-Nummer muss das Format 000.000 besitzen (uniqueness?) oder 000 für nicht
@@ -53,7 +57,7 @@ class Lva < ActiveRecord::Base
validates_presence_of :stunden # Stunden Eingetragen? validates_presence_of :stunden # Stunden Eingetragen?
validates_presence_of :modul # Zugehöriges Modul eingetragen? validates_presence_of :modul # Zugehöriges Modul eingetragen?
# (zumindest eines) # (zumindest eines)
has_many :nlinks, as: :link
def title def title
self.name self.name

View File

@@ -23,6 +23,7 @@ class Neuigkeit < ActiveRecord::Base
has_many :calentries, as: :object has_many :calentries, as: :object
mount_uploader :picture, PictureUploader mount_uploader :picture, PictureUploader
scope :published, -> {where("datum <= ? AND datum IS NOT NULL", Time.now.to_date).order(:datum).reverse_order} scope :published, -> {where("datum <= ? AND datum IS NOT NULL", Time.now.to_date).order(:datum).reverse_order}
scope :recent, -> { published.limit(15)} scope :recent, -> { published.limit(15)}
scope :unpublished, -> {where("datum >= ? OR datum IS NULL", Date.today)} scope :unpublished, -> {where("datum >= ? OR datum IS NULL", Date.today)}

View File

@@ -27,18 +27,24 @@
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
class Studium < ActiveRecord::Base class Studium < ActiveRecord::Base
attr_accessible :desc, :name,:abkuerzung, :typ, :zahl, :semester, :picture, :picture_cache, :qualifikation,:struktur, :jobmoeglichkeiten attr_accessible :desc, :name,:abkuerzung, :typ, :zahl, :semester, :picture, :picture_cache, :qualifikation,:struktur, :jobmoeglichkeiten, :lvas_attributes
has_many :modulgruppen, inverse_of: :studium, :class_name => "Modulgruppe", :dependent => :destroy has_many :modulgruppen, inverse_of: :studium, :class_name => "Modulgruppe", :dependent => :destroy
scope :search, ->(query) {where("name like ? or studien.desc like ?", "%#{query}%", "%#{query}%")} scope :search, ->(query) {where("name like ? or studien.desc like ?", "%#{query}%", "%#{query}%")}
has_many :moduls, :through=>:modulgruppen has_many :moduls, :through=>:modulgruppen
has_many :lvas, :through=>:moduls has_many :lvas, :through=>:moduls
has_many :semester, :dependent => :destroy has_many :semester, :dependent => :destroy
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 :typ, :inclusion => {:in => ["Bachelor","Master"] }
validates :name, :uniqueness => true, :presence=>true validates :name, :uniqueness => true, :presence=>true
validates :zahl, :presence=>true, :format=>{:with=>/^[0-9A-Z]{4,10}$/}, :uniqueness => true validates :zahl, :presence=>true, :format=>{:with=>/^[0-9A-Z]{4,10}$/}, :uniqueness => true
mount_uploader :picture, PictureUploader mount_uploader :picture, PictureUploader
accepts_nested_attributes_for :lvas #, :allow_destroy=>true # , :reject_if=> lambda{|a| a[:name].blank?}
translates :desc,:shortdesc, :qualifikation,:struktur, :jobmoeglichkeiten, :versioning =>true,:fallbacks_for_empty_translations => true translates :desc,:shortdesc, :qualifikation,:struktur, :jobmoeglichkeiten, :versioning =>true,:fallbacks_for_empty_translations => true
def title_context def title_context
return self.abkuerzung.to_s.strip.empty? ? self.name : self.abkuerzung return self.abkuerzung.to_s.strip.empty? ? self.name : self.abkuerzung
end end

View File

@@ -13,29 +13,13 @@
end %> end %>
</div> </div>
<div class="media-body"> <div class="media-body">
<small class="pull-left"><%= gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> </small> <small class="pull-left">
<small class="pull-right"><%=I18n.l(gallery.try(:datum).try(:to_date)) unless gallery.try(:datum).try(:to_date).nil? %></small></br> <%= gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%>
<h1><%= gallery.name %></h1> </small>
<p> <small class="pull-right">
<%= if gallery.desc.split.size > Gallery::WORD_COUNT <%=I18n.l(gallery.try(:datum).try(:to_date)) unless gallery.try(:datum).try(:to_date).nil? %>
gallery.desc.split[0..Gallery::WORD_COUNT].join(" ") + " ..." </small>
else </br>
gallery.desc
end%>
</p>
</div>
</div>
<div class="media gallery-block">
<div class="pull-left" href="#">
<%= if(gallery.fotos.empty?)
image_tag "no_image_128.png", {:class => "img-rounded"}
else
image_tag gallery.fotos.sample.datei.big_thumb.url, {:class => "img-rounded"}
end %>
</div>
<div class="media-body">
<small class="pull-left"><%= gallery.fotos.size.to_s + " " + I18n.t('fotos.bilder')%> </small>
<small class="pull-right"><%=I18n.l(gallery.try(:datum).try(:to_date)) unless gallery.try(:datum).try(:to_date).nil? %></small></br>
<h1><%= gallery.name %></h1> <h1><%= gallery.name %></h1>
<p> <p>
<%= if gallery.desc.split.size > Gallery::WORD_COUNT <%= if gallery.desc.split.size > Gallery::WORD_COUNT

View File

@@ -1,6 +1,5 @@
<div class="content-wrap content-column"> <div class="content-wrap content-column">
<h1><%= I18n.t('home.willkommen') %></h1> <h1><%= I18n.t('home.willkommen') %></h1></p>
<p><%= I18n.t('home.hallobeiderfet') %></p>
<ul class="unstyled linkbox-list" style="max-width:70em"> <ul class="unstyled linkbox-list" style="max-width:70em">
<% @neuigkeiten.each do |n| %> <% @neuigkeiten.each do |n| %>
<li><%= render n if can?(:show, n) %> </li> <li><%= render n if can?(:show, n) %> </li>
@@ -11,7 +10,7 @@
</p> </p>
<div class="alert"> <div class="alert">
<h2>Beta Test</h2> <h2>Beta Test</h2>
<p>Die Webseite befindet sich derzeit in einem Entsicklungsstadium, <p>Die Webseite befindet sich derzeit in einem Entwicklungsstadium,
volle Funktionsfähigkeit ist noch nicht erreicht. Bitte Featurerequests und volle Funktionsfähigkeit ist noch nicht erreicht. Bitte Featurerequests und
Fehlermeldungen auf GitHub melden. Fehlermeldungen auf GitHub melden.
</p> </p>

View File

@@ -17,9 +17,12 @@ 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>
<pre>sudo apt-get install libmysql-ruby libmysqlclient-dev</pre>
gegebenenfalls g++ installieren gegebenenfalls g++ installieren
<pre>cd fetsite <pre>cd fetsite
sudo bundle install sudo bundle install
</pre> </pre>
Falls Fehler auftreten je nach Fehlermeldung Pakete mit <code>apt-get</code> nach installieren (zB sqlite, ...) - google! Falls Fehler auftreten je nach Fehlermeldung Pakete mit <code>apt-get</code> nach installieren (zB sqlite, ...) - google!

View File

@@ -3,6 +3,8 @@
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="./public/favicon.ico">
<!--<link rel="shortcut icon" href="http://www.fet.at/favicon.ico">-->
<title>Fetsite</title> <title>Fetsite</title>
@@ -27,7 +29,7 @@
<div class="span10 "> <div class="span10 ">
<div class="header_wrap" style="background:7070a0"> <div class="header_wrap" style="background:7070a0">
<div class="header"> <div class="header">
<%= image_tag('/fetlogo90.png',{:style=>"float:left;height:50px",:height=>"50"}) %> <%= link_to image_tag('/fetlogo90.png',{:style=>"float:left;height:50px",:height=>"50"}),home_index_path %>
<h1 style="display:block"></h1> <h1 style="display:block"></h1>
</div> </div>

View File

@@ -23,12 +23,23 @@
<%= link_to 'Admin' , config_path%> <%= link_to 'Admin' , config_path%>
</li> </li>
</ul> </ul>
<span class="pull-right"><%if I18n.locale == :en %> <ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= image_tag("/flaggen/png/"+I18n.locale.to_s+".png") + " " +I18n.t('sprache',:scope=>'home')%><b class="caret"></b></a>
<ul class="dropdown-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>
</li>
</ul>
<!--<span class="pull-right"><%if I18n.locale == :en %>
<%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%> <%= link_to image_tag("/flaggen/png/at.png") + " Deutsch" ,switch_locale_url(:de)%>
<% elsif I18n.locale == :de %> <% elsif I18n.locale == :de %>
<%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%> <%= link_to image_tag("/flaggen/png/gb.png") + " English" ,switch_locale_url(:en)%>
<%end %> <%end %>
</span> </span>-->
</div> </div>
</div> </div>

View File

@@ -0,0 +1,21 @@
<tr>
<td>
<h4><%= %></h4>
<%= f.semantic_errors :state %>
<%= f.input :id, :as=>:hidden %>
</td>
<td><%= f.input :lvanr , :input_html => { "style"=>"width:7em" }%></td>
<td><%= f.input :name %></td>
<td>
<%= f.input :ects, :input_html => { "style"=>"width:4em" },:size=>5 %>
<%= f.input :stunden, :input_html => { "style"=>"width:4em" }%></td>
<td><%= f.input :typ, :input_html => { "style"=>"width:4em" }%></td>
<td>
<% f.input :semester , :input_html=>{:style=>"height:8em"},:collection=>@semester%>
</td>
<td><%= f.input :pruefungsinformation,:input_html=>{:rows=>5} %></td>
<td><%= f.input :desc, :input_html=>{:rows=>4}%></td>
</tr>

View File

@@ -3,33 +3,10 @@
<% i = 0 %> <% i = 0 %>
<% @lvas.each do |lva|%> <% @lvas.each do |lva|%>
<% i = i +1 %> <% i = i +1 %>
<tr>
<%= semantic_fields_for "lvas[#{i}]", lva do |f|%> <%= semantic_fields_for "lvas[#{i}]", lva do |f|%>
<td> <%= render 'lvas/nested_fields', :f => f,:lva=>lva %>
<h4><%= lva.name %></h4>
<%= f.semantic_errors :state %>
<%= f.input :id, :as=>:hidden %></td>
<td><%= f.input :lvanr , :input_html => { "style"=>"width:7em" }%></td>
<td><%= f.input :name %></td>
<td><%= f.input :ects, :input_html => { "style"=>"width:4em" },:size=>5 %>
<%= f.input :stunden, :input_html => { "style"=>"width:4em" }%></td>
<td><%= f.input :typ, :input_html => { "style"=>"width:4em" }%></td>
<td>
<%= f.input :semester , :input_html=>{:style=>"height:8em"},:collection=>@semester%></td>
<td><%= f.input :pruefungsinformation,:input_html=>{:rows=>4} %></td>
<td><%= f.input :desc, :input_html=>{:rows=>4}%></td>
<td>
<%= lva.valid? %>
</td>
<% end%> <% end%>
</tr>
<% end %> <% end %>
<%= ff.actions do %> <%= ff.actions do %>

View File

@@ -9,23 +9,22 @@
</div> </div>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span6"> <div class="span6">
<% f.input :datum, :as=> :datepicker %> <% f.input :datum, :as=> :datepicker %>
<%= f.input :rubrik, :as=> :radio, :collection=>Rubrik.all %> <%= f.input :rubrik, :as=> :radio, :collection=>Rubrik.all %>
</div>
<div class="span6">
<%= f.input :author, :as=> :select %>
</div>
</div> </div>
<div class="span6">
<%= f.input :author, :as=> :select %>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span12"> <div class="span12">
<%= f.input :picture, :as=> :file %> <%= f.input :picture, :as=> :file %>
</div> </div> </div>
</div>
<%= f.semantic_fields_for :calentries , @calentries do |calentry| %>
<%= render 'calentries/nested_fields', :f => calentry %>
<%= f.semantic_fields_for :calentries , @calentries do |calentry| %>
<%= render 'calentries/nested_fields', :f => calentry %>
<% end %> <% end %>
<% end %> <% end %>

View File

@@ -1,7 +1,7 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li <%= 'class="active"'.html_safe if (request.fullpath == rubriken_path)%> > <li <%= 'class="active"'.html_safe if (request.fullpath == rubriken_path)%> >
<%= link_to I18n.t('rubriken.alle') , rubriken_path %> </li> <%= link_to I18n.t('rubriken.alle') , rubriken_path %> </li>
<% for r in Rubrik.all %> <% for r in @rubriken %>
<% if can?(:show, r) %> <% if can?(:show, r) %>
<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 %>

View File

@@ -31,7 +31,7 @@
</div> </div>
<div class="span3"> <div class="span3">
<%= render 'calendars/calentries', :object=>@rubrik.calendar.calentries %> <%= render 'calendars/calentries', :object=>@calentries %>
<%= link_to "ics-format", calendar_path(@rubrik.calendar,:format=>:ics) %> <%= link_to "ics-format", calendar_path(@rubrik.calendar,:format=>:ics) %>
</div> </div>

View File

@@ -40,6 +40,7 @@
<%= tinymce %> <%= tinymce %>
<%= f.actions do %> <%= f.actions do %>
<%= f.action :submit, :as => :input %> <%= f.action :submit, :as => :input %>
<%= link_to 'Back', studien_path, :data=>{:locale=>I18n.locale}, class: :btn%>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@@ -0,0 +1,15 @@
<%= semantic_form_for @studium do |ff|%>
<table>
<%= ff.semantic_fields_for :lvas, @lvas do |f|%>
<%= render 'lvas/nested_fields', :f => f %>
<% end %>
<%= ff.actions do %>
<%= ff.action :submit, :as => :button %>
<%= ff.action :cancel, :as => :link %>
<% end %>
</table>
<% end %>

View File

@@ -2,4 +2,6 @@
<%= render 'form' %> <%= render 'form' %>
<%= link_to 'Back', studien_path , :data=>{:locale=>I18n.locale}%>
<!--<%= link_to 'Back', studien_path , :data=>{:locale=>I18n.locale}, class: :btn%>-->

View File

@@ -21,7 +21,7 @@
</div> </div>
<%= f.actions do %> <%= f.actions do %>
<%= f.action :submit, :as => :button, :label=>"Sdf"+raw(fa_icon("save"))%> <%= f.action :submit, :as => :button %>
<%= f.action :cancel, :as => :link %> <%= f.action :cancel, :as => :link %>
<% end %> <% end %>

View File

@@ -20,5 +20,7 @@
<h2><%= I18n.t('attachment.title')%>:</h2> <h2><%= I18n.t('attachment.title')%>:</h2>
<div id="attachmentform"> <div id="attachmentform">
</div> </div>
<%= link_to new_thema_attachment_path(@thema) ,:remote=>true do %> new Attachment <% end %> <%= link_to new_thema_attachment_path(@thema) ,:remote=>true do %> new Attachment <% end %>
<%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %> <%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>
<%= link_to I18n.t('common.back'), themengruppen_path, :class=>:btn %>

View File

@@ -8,6 +8,7 @@
<% end %> <% end %>
<%= f.actions do %> <%= f.actions do %>
<%= f.action :submit, :as => :input %> <%= f.action :submit, :as => :input %>
<%= f.action :cancel,:label => I18n.t("common.back"), :as => :link %>
<% end %> <% end %>
<% end %> <% end %>

View File

@@ -1,19 +1,24 @@
<% @themengruppen.each do |tg| %> <div class="content-wrap content-column">
<a name="themengruppe_<%=tg.id.to_s%>"> <% @themengruppen.each do |tg| %>
<h2><%= tg.title%></h2></a> <div class="contentbox">
<ul> <a name="themengruppe_<%=tg.id.to_s%>"></a>
<% tg.themen.order(:priority).reverse.each do |t| %> <h2> <%= tg.title%></h2>
<li><%= t.title %> <ul>
<% tg.themen.order(:priority).reverse.each do |t| %>
<li> <%= t.title %>
<ul> <% t.fragen.each do |f| %>
<li>
<b> <%= f.title %></b>
<p> <%= f.text %></p>
</li>
<% end %>
</ul>
</li>
<% end %>
</ul>
<ul> </div>
<% t.fragen.each do |f| %> <% end %>
<li><b> <%= f.title %></b><p> <%= f.text %></p></li> </div>
<% end %>
</ul>
</li>
<% end %>
</ul>
<% end %>

View File

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

View File

@@ -1,25 +1,35 @@
<h1>Listing themengruppen</h1> <div class="content-wrap content-column">
<p> <%= link_to "FAQS", faqs_themengruppen_path,class=btn %></p>
<ul class="unstyled linkbox-list">
<li>
<% @themengruppen.each do |themengruppe| %>
<table>
<tr>
<th>Title</th>
<th>Text</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @themengruppen.each do |themagruppen| %>
<tr>
<td><%= themagruppen.title %></td>
<td><%= themagruppen.text %></td>
<td><%= link_to 'Show', themagruppen %></td>
<td><%= link_to 'Edit', edit_themagruppen_path(themagruppen) %></td>
<td><%= link_to 'Destroy', themagruppen, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
<br /> <div class="container-fluid">
<%= render themengruppe %>
<br/>
<div class="row-fluid">
<!--
<%= link_to 'Edit', edit_themengruppe_path(themengruppe) %>
-->
</div>
</div>
<%= link_to 'New Themengruppe', new_themagruppen_path %>
<% end %>
</li>
</ul>
<br/>
</div>
<script class="hidden-phone">
<!-- make_equal_height();
-->
</script>
<%= render :partial=>'layouts/pretty_toolbar' %>
<!--
<%= link_to 'New Themengruppe', new_themengruppe_path %>
-->

View File

@@ -1,38 +1,38 @@
<div class="content-wrap content-column" > <div class="content-wrap content-column" >
<%= link_to fa_icon("arrow-circle-left 2x")+" Alle Themengruppen", themengruppen_path, :class=>"linkbox" %> <%= link_to fa_icon("arrow-circle-left 2x")+" Alle Themengruppen", themengruppen_path, :class=>"linkbox" %>
<%= link_to fa_icon("question 2x")+" Häufige Fragen", faqs_themengruppen_path(:anchor=>"themengruppe_"+@themengruppe.id.to_s), :class=>"linkbox" %> <%= link_to fa_icon("question 2x")+" Häufige Fragen", faqs_themengruppen_path(:anchor=>"themengruppe_"+@themengruppe.id.to_s), :class=>"linkbox" %>
<h1><%= @themengruppe.title %></h1> <h1><%= @themengruppe.title %></h1>
<p> <p>
<%= @themengruppe.text %> <%= @themengruppe.text %>
</p> </p>
<ul class="unstyled linkbox-list" > <ul class="unstyled linkbox-list" >
<% @themengruppe.themen.each do |thema| %> <% @themengruppe.themen.each do |thema| %>
<li> <li>
<div class="contentbox"> <div class="contentbox">
<%= render :partial => 'themen/small', :object => thema %> <%= render :partial => 'themen/small', :object => thema %>
tools: tools:
<% <%
@small_elements2 = [] @small_elements2 = []
@small_elements2 << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('common.verwalten'), :path=>verwalten_thema_path(thema)} if can? :edit, thema @small_elements2 << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('common.verwalten'), :path=>verwalten_thema_path(thema)} if can? :edit, thema
%> %>
<%= render :partial=>'layouts/pretty_toolbar', :object=>@small_elements2 unless @small_elements2.empty? %> <%= render :partial=>'layouts/pretty_toolbar', :object=>@small_elements2 unless @small_elements2.empty? %>
<ul class="unstyled"> <ul class="unstyled">
<% unless thema.gremium.nil? %> <% unless thema.gremium.nil? %>
<li> <li>
<%= link_to fa_icon("users 2x")+thema.gremium.name , thema.gremium,:class=>"linkbox" %> <%= link_to fa_icon("users 2x")+thema.gremium.name , thema.gremium,:class=>"linkbox" %>
</li> </li>
<% end %> <% end %>
<% thema.nlinks.each do |l| %> <% thema.nlinks.each do |l| %>
<li><%= render l.neuigkeit %></li> <li><%= render l.neuigkeit %></li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
<%= render :partial=>'layouts/pretty_toolbar' %> <%= render :partial=>'layouts/pretty_toolbar' %>
</div> </div>

View File

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

View File

@@ -8,6 +8,7 @@ en:
edit: "Edit" edit: "Edit"
home: home:
sprache: "English"
mtitle: "Menu" mtitle: "Menu"
hallobeiderfet: "This is the page of Fachschaft Elektrotechnik at TU Wien" hallobeiderfet: "This is the page of Fachschaft Elektrotechnik at TU Wien"
home: "Home" home: "Home"

View File

@@ -25,9 +25,12 @@
# Studien # Studien
scope '(:ansicht)' do scope '(:ansicht)' do
resources :studien, :only=>[:new,:edit,:update,:destroy] resources :studien, :only=>[:new,:edit,:update,:destroy,:show] do
resources :studien, :only=>[:show] member do
end get :edit_lvas
end
end
end
resources :modulgruppen,:only =>[:create,:index] do resources :modulgruppen,:only =>[:create,:index] do
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 403 B

BIN
public/flaggen/png/de.png.bak Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

BIN
public/flaggen/png/en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B