lvas ueberarbeitet

This commit is contained in:
2014-06-11 00:55:46 +05:30
parent e3b6eebe1d
commit 0526ea71f2
5 changed files with 9 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ def get_theme
params[:theme]
else
"2003"
"blue1"
end
end
def default_url_options

View File

@@ -58,12 +58,14 @@ class Lva < ActiveRecord::Base
validates_presence_of :modul # Zugehöriges Modul eingetragen?
# (zumindest eines)
def typ_n
typ=="andere" ? "" : typ
end
def title
self.name
end
def full_name
return self.typ + ' ' + self.name
return self.typ_n + ' ' + self.name
end
def add_semesters
# Diese Methode fügt die Instanz automatisch zu allen Studien als "Ohne Semesterempfehlung" (Semester 0) zu, bei denen die Instanz im Studium noch nicht vorkommt.

View File

@@ -1,6 +1,6 @@
<p id="notice"><%= notice %></p>
<h1><%=lva.typ.to_s + ' ' + lva.name %></h1>
<h1><%= lva.typ_n.to_s + ' ' + lva.name %></h1>
<h2>Prüfungsinformation</h2>
<div class="">
<%= lva.pruefungsinformation.to_s.html_safe %>

View File

@@ -3,7 +3,7 @@
<p id="notice"><%= notice %></p>
<div class="row-fluid">
<div class="span8">
<h1><%=@lva.typ.to_s + ' ' + @lva.name %></h1>
<h1><%= @lva.full_name %></h1>
<h2>Prüfungsinformation</h2>
<div class="">

View File

@@ -15,8 +15,8 @@
<div class="span8">
<h2><%= sem.name %></h2>
</div>
<div class="span4"><div class="pull-right"><%= link_to I18n.t("lva.addrem"), edit_semester_path(sem), :class=>"btn-small"%>
</div>
<div class="span4">
</div>
</div>
<% sem.lvas.each do |lva| %>