forked from bofh/fetsite
Merge branch 'master' of https://github.com/fetsite/fetsite
Conflicts: Gemfile.lock
This commit is contained in:
12
Gemfile.lock
12
Gemfile.lock
@@ -100,11 +100,19 @@ GEM
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
mime-types (1.21)
|
||||
mini_portile (0.5.2)
|
||||
multi_json (1.5.1)
|
||||
multipart-post (1.2.0)
|
||||
mysql2 (0.3.13)
|
||||
net-ldap (0.2.2)
|
||||
<<<<<<< HEAD
|
||||
nokogiri (1.5.6)
|
||||
=======
|
||||
nokogiri (1.6.0)
|
||||
mini_portile (~> 0.5.0)
|
||||
nokogiri (1.6.0-x86-mingw32)
|
||||
mini_portile (~> 0.5.0)
|
||||
>>>>>>> d314a8126862e76d94c84a289a8883167b58a001
|
||||
oauth2 (0.8.1)
|
||||
faraday (~> 0.8)
|
||||
httpauth (~> 0.1)
|
||||
@@ -176,8 +184,8 @@ GEM
|
||||
rspec-expectations (~> 2.14.0)
|
||||
rspec-mocks (~> 2.14.0)
|
||||
rubyntlm (0.1.1)
|
||||
sanitize (2.0.3)
|
||||
nokogiri (>= 1.4.4, < 1.6)
|
||||
sanitize (2.0.6)
|
||||
nokogiri (>= 1.4.4)
|
||||
sass (3.2.5)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
class ModulgruppenController < ApplicationController
|
||||
# GET /modulgruppen
|
||||
|
||||
@@ -16,10 +17,14 @@ class ModulgruppenController < ApplicationController
|
||||
|
||||
def show
|
||||
@modulgruppe = Modulgruppe.find(params[:id])
|
||||
@studium = Studium.find(@modulgruppe.studium_id)
|
||||
if !params[:studium_id].nil?
|
||||
@studium=Studium.find(params[:studium_id])
|
||||
end
|
||||
|
||||
@toolbar_elements = [ {:text=>'Zurück', :path=>studium_path(@studium, :ansicht=>:modulgruppenansicht)}]
|
||||
@toolbar_elements << {:hicon=>'icon-plus-sign', :text=>I18n.t('modulgruppe.addmodul'), :path=>new_modul_path(@modulgruppe)}
|
||||
@toolbar_elements << {:hicon=>'icon-pencil', :text=>I18n.t('modulgruppe.edit'), :path=>edit_modulgruppe_path(@modulgruppe)}
|
||||
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=> I18n.t('common.delete'),:path => studium_path(@studium, :ansicht=>:modulgruppenansicht), :method=> :delete,:confirm=>"Sure?" }
|
||||
end
|
||||
|
||||
# GET /modulgruppen/new
|
||||
|
||||
@@ -50,7 +50,11 @@ class Lva < ActiveRecord::Base
|
||||
validates :name, :presence=>true, :uniqueness=>{:scope=>:typ}# Name Eingetragen?
|
||||
validates :typ, :presence=>true, :inclusion=> ERLAUBTE_TYPEN
|
||||
validates_presence_of :stunden # Stunden Eingetragen?
|
||||
validates_presence_of :modul # Zugehöriges Modul eingetragen? (zumindest eines)
|
||||
validates_presence_of :modul # Zugehöriges Modul eingetragen?
|
||||
# (zumindest eines)
|
||||
def full_name
|
||||
return self.typ + ' ' + 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.
|
||||
for m in self.modul
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<%= link_to b, {:class=> :linkbox} do %>
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<b><%=b.name%></b> (<%=b.lva.name%>)
|
||||
<b><%=b.name%></b> (<%=b.lva.full_name%>)
|
||||
</div>
|
||||
<div class="span4">
|
||||
<%=b.updated_at.to_s%>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<div class="lva-semester">
|
||||
<%=lva.lvanr.to_s %> <b><%= link_to lva.name, lva_path(lva)%></b> <%= lva.ects %> ECTS / <%= lva.stunden %> Std<br>
|
||||
<%=lva.lvanr.to_s %> <b><%= link_to lva.full_name, lva_path(lva)%></b> <%= lva.ects %> ECTS / <%= lva.stunden %> Std<br>
|
||||
<!-- <div class="hidden-phone">
|
||||
Module: /<% lva.modul.each do |m| %> <%= link_to m.name + ' / ', modul_path(m) unless m.modulgruppen.map{|x| x.studium}.index(@studium).nil? && !@studium.nil? %><% end %>
|
||||
<br>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
<b><%=link_to modulgruppe.name, modulgruppe %></b> <%= ' ( ' + modulgruppe.studium.title_context + ')' unless modulgruppe.studium.nil? %>
|
||||
<b><%=link_to modulgruppe.name, modulgruppe %></b>
|
||||
(<%=(link_to modulgruppe.studium.title_context, studium_path(modulgruppe.studium)) unless modulgruppe.studium.nil? %>)
|
||||
|
||||
@@ -15,11 +15,4 @@
|
||||
<%= render 'moduls/kurz', :modul=>modul%>
|
||||
<% end %>
|
||||
|
||||
|
||||
<span class="label"><%= I18n.t("common.actions")%></span>
|
||||
<div class="btn-group">
|
||||
<%= link_to '<i class="icon-plus-sign"></i>'.html_safe+I18n.t("modulgruppe.addmodul"), new_modul_path(:modulgruppen_id =>@modulgruppe.id),:class =>"btn" %>
|
||||
<%= link_to I18n.t("modulgruppe.studium"), studium_path(@modulgruppe.studium),:class =>"btn" %>
|
||||
<%= link_to I18n.t("common.edit"), edit_modulgruppe_path(@modulgruppe),:class =>"btn" %>
|
||||
<%= link_to I18n.t("common.delete"),[@modulgruppe], :method=>:delete , :data=>{:confirm=>I18n.t("common.sure")} ,:class=>"btn" %>
|
||||
</div>
|
||||
<%= render 'layouts/pretty_toolbar' %>
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
|
||||
<% @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.full_name, lva %> |
|
||||
<%=link_to '<i class="icon-pencil"></i>'.html_safe+ 'edit', edit_lva_path(lva)%><br>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -30,6 +30,7 @@ de:
|
||||
ohne: "Ohne Semesterzuordnung"
|
||||
modulgruppe:
|
||||
typ: "Typ"
|
||||
edit: "Modulgruppe bearbeiten"
|
||||
addmodul: "Neues Modul hinzufügen"
|
||||
studium: "Studium"
|
||||
new: "Neue Modulgruppe"
|
||||
@@ -51,4 +52,4 @@ de:
|
||||
lecturers: "Vortragende"
|
||||
file:
|
||||
size: "Dateigröße"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user