forked from bofh/fetsite
GitHub Account angelegt
This commit is contained in:
18
app/views/lvas/_form.html.erb
Normal file
18
app/views/lvas/_form.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<%= semantic_form_for @lva do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :modul %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :ects %>
|
||||
<%= f.input :stunden %>
|
||||
|
||||
<%= f.input :desc %>
|
||||
|
||||
<%= f.input :lvanr %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/lvas/edit.html.erb
Normal file
6
app/views/lvas/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing lva</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @lva %> |
|
||||
<%= link_to 'Back', lvas_path %>
|
||||
31
app/views/lvas/index.html.erb
Normal file
31
app/views/lvas/index.html.erb
Normal file
@@ -0,0 +1,31 @@
|
||||
<h1>Listing lvas</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th>Ects</th>
|
||||
<th>Lvanr</th>
|
||||
<th>Stunden</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @lvas.each do |lva| %>
|
||||
<tr>
|
||||
<td><%= lva.name %></td>
|
||||
<td><%= lva.desc %></td>
|
||||
<td><%= lva.ects %></td>
|
||||
<td><%= lva.lvanr %></td>
|
||||
<td><%= lva.stunden %></td>
|
||||
<td><%= link_to 'Show', lva %></td>
|
||||
<td><%= link_to 'Edit', edit_lva_path(lva) %></td>
|
||||
<td><%= link_to 'Destroy', lva, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Lva', new_lva_path %>
|
||||
5
app/views/lvas/new.html.erb
Normal file
5
app/views/lvas/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New lva</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', lvas_path %>
|
||||
20
app/views/lvas/show.html.erb
Normal file
20
app/views/lvas/show.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p> <%= @lva.lvanr %>
|
||||
<b>
|
||||
<%= @lva.name %> (<%= @lva.ects %> ECTS/ <%= @lva.stunden %> Std)</b><%= link_to image_tag('edit.png'), edit_lva_path(@lva) %> |
|
||||
</p>
|
||||
<p>
|
||||
<%= @lva.desc %>
|
||||
</p>
|
||||
|
||||
<% @lva.modul.each do |modul| %>
|
||||
<%= link_to modul.name , modul_path(modul)%> <br>
|
||||
<% modul.modulgruppen.each do |g| %>
|
||||
<% link =g.studium.name + " - " +g.name %>
|
||||
<%= link_to link , modulgruppe_path(g)%><br>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
|
||||
<%= link_to 'Back', lvas_path %>
|
||||
Reference in New Issue
Block a user