forked from bofh/fetsite
GitHub Account angelegt
This commit is contained in:
13
app/views/modulgruppen/_form.html.erb
Normal file
13
app/views/modulgruppen/_form.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<%= semantic_form_for @modulgruppe do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :studium_id, :as =>:select, :collection => Studium.all %>
|
||||
<%= f.input :typ ,:as => :radio, :collection=>["Pflicht","Vertiefungspflicht","Wahl"]%>
|
||||
<%= f.input :phase,:as => :radio,:collection=>1..3 %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :desc,:input_html=>{:rows=> 3 }%>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
8
app/views/modulgruppen/_modulgruppe.html.erb
Normal file
8
app/views/modulgruppen/_modulgruppe.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="modulgruppe_phase_<%= modulgruppe.phase %>">
|
||||
<h2><%= link_to modulgruppe.name, modulgruppe_path(modulgruppe) %><%= link_to image_tag('edit.png').html_safe+"Edit", edit_modulgruppe_path(modulgruppe),:class=>"btn" %></h2>
|
||||
<%= modulgruppe.desc%>
|
||||
|
||||
<%= render :partial=>'moduls/kurz', :collection=>modulgruppe.moduls, :as=>:modul%>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
6
app/views/modulgruppen/edit.html.erb
Normal file
6
app/views/modulgruppen/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing modulgruppe</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @modulgruppe %> |
|
||||
<%= link_to 'Back', modulgruppen_path %>
|
||||
30
app/views/modulgruppen/index.html.erb
Normal file
30
app/views/modulgruppen/index.html.erb
Normal file
@@ -0,0 +1,30 @@
|
||||
<h1>Listing modulgruppen</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Phase</th>
|
||||
<th>Studium</th>
|
||||
<th>Name</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @modulgruppen.each do |modulgruppe| %>
|
||||
<tr>
|
||||
<td><%= modulgruppe.typ %></td>
|
||||
<td><%= modulgruppe.phase %></td>
|
||||
<td><%= modulgruppe.studium.name %></td>
|
||||
<td><%= modulgruppe.name %></td>
|
||||
<td><%= link_to 'Show', modulgruppe %></td>
|
||||
<td><%= link_to 'Edit', edit_modulgruppe_path(modulgruppe) %></td>
|
||||
<td><%= link_to 'Destroy', modulgruppe, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<% if !@studium.nil? %>
|
||||
<%= link_to 'New Modulgruppe', new_modulgruppe_path %>
|
||||
<% end%>
|
||||
5
app/views/modulgruppen/new.html.erb
Normal file
5
app/views/modulgruppen/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New modulgruppe</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', modulgruppen_path %>
|
||||
27
app/views/modulgruppen/show.html.erb
Normal file
27
app/views/modulgruppen/show.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class ="modulgruppe_phase_<%= @modulgruppe.phase %>">
|
||||
<h1>
|
||||
<%= @modulgruppe.name %>
|
||||
</h1>
|
||||
<p>
|
||||
<b><%= link_to "Studium: "+@modulgruppe.studium.name, studium_path(@modulgruppe.studium) %></b>
|
||||
|
||||
</p><p>
|
||||
<b><%= I18n.t "modulgruppe.typ"%>:</b>
|
||||
<%= @modulgruppe.typ %>
|
||||
</p>
|
||||
|
||||
|
||||
<% @modulgruppe.moduls.each do |modul| %>
|
||||
<%= render modul%>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<span class="label">Default</span>
|
||||
<div class="btn-group">
|
||||
<%= link_to 'Add Modul', new_modul_path(:modulgruppen_id =>@modulgruppe.id) %>
|
||||
<%= link_to 'Studium', studium_path(@modulgruppe.studium),:class =>"btn" %>
|
||||
<%= link_to 'Edit', edit_modulgruppe_path(@modulgruppe),:class =>"btn" %>
|
||||
<%= link_to 'Back', modulgruppen_path,:class =>"btn" %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user