forked from bofh/fetsite
GitHub Account angelegt
This commit is contained in:
14
app/views/moduls/_form.html.erb
Normal file
14
app/views/moduls/_form.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
<%= semantic_form_for @modul do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :modulgruppen,:as => :select, :collection => Hash[Modulgruppe.all.map{|m| [m.studium.name + " " + m.name,m.id]}] %>
|
||||
<%= f.input :name ,:hint=>true%>
|
||||
<%= f.input :desc, :as=>:tinymce_text %>
|
||||
<%= f.input :depend %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
9
app/views/moduls/_kurz.html.erb
Normal file
9
app/views/moduls/_kurz.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<div style="border: solid 1px; padding:2px;margin-top:5px;"><p>
|
||||
<b><%= link_to "Modul "+ modul.name , modul_path(modul) %> <%= link_to image_tag("edit.png"), edit_modul_path(modul) %></b>
|
||||
</p>
|
||||
<p >
|
||||
<%= raw(modul.desc) %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
13
app/views/moduls/_modul.html.erb
Normal file
13
app/views/moduls/_modul.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<div style="border: solid 1px; padding:2px"><p>
|
||||
<b><%= link_to "Modul "+ modul.name , modul_path(modul) %> <%= link_to image_tag("edit.png"), edit_modul_path(modul) %></b>
|
||||
</p>
|
||||
<p>
|
||||
<%= raw(modul.desc) %>
|
||||
</p>
|
||||
LVAs:
|
||||
<ul>
|
||||
<% modul.lvas.each do |lva| %>
|
||||
<li><%= link_to lva.lvanr+" "+ lva.name, lva %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
8
app/views/moduls/edit.html.erb
Normal file
8
app/views/moduls/edit.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<h1><%= I18n.t "moduls.edit.title"%></h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', modul_path( @modul) %> |
|
||||
<% if !@studium.nil? %>
|
||||
<%= link_to 'Back', moduls_path(@modul) %>
|
||||
<% end%>
|
||||
26
app/views/moduls/index.html.erb
Normal file
26
app/views/moduls/index.html.erb
Normal file
@@ -0,0 +1,26 @@
|
||||
<h1>Listing moduls</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @moduls.each do |modul| %>
|
||||
<tr>
|
||||
<td><%= modul.name %></td>
|
||||
<td><%= modul.desc %></td>
|
||||
<td><%= link_to 'Show', modul_path(modul) %></td>
|
||||
<td><%= link_to 'Edit', edit_modul_path(modul) %></td>
|
||||
<td><%= link_to 'Destroy', [modul], method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<% if !@studium.nil? %>
|
||||
<%= link_to 'New Modul', new_modul_path() %>
|
||||
<% end%>
|
||||
5
app/views/moduls/new.html.erb
Normal file
5
app/views/moduls/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New modul</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', moduls_path %>
|
||||
11
app/views/moduls/show.html.erb
Normal file
11
app/views/moduls/show.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= render @modul %>
|
||||
|
||||
<% @modul.modulgruppen.each do |g| %>
|
||||
<% link = g.studium.name + " - " +g.name %>
|
||||
<%= link_to g.studium.name , studium_path(g.studium)%> <br />
|
||||
<%= link_to link , modulgruppe_path(g)%><br />
|
||||
<%end%>
|
||||
|
||||
<%= link_to 'Add LVA', new_lva_path(:modul_id =>@modul.id) %>
|
||||
Reference in New Issue
Block a user