forked from bofh/fetsite
Introducing Lecturers
This commit is contained in:
13
app/views/lecturers/_form.html.erb
Normal file
13
app/views/lecturers/_form.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<%= semantic_form_for @lecturer do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :email %>
|
||||
<%= f.input :oid %>
|
||||
<%= f.input :picture %>
|
||||
<%= f.input :lvas %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/lecturers/edit.html.erb
Normal file
6
app/views/lecturers/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing lecturer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @lecturer %> |
|
||||
<%= link_to 'Back', lecturers_path %>
|
||||
29
app/views/lecturers/index.html.erb
Normal file
29
app/views/lecturers/index.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Listing lecturers</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Oid</th>
|
||||
<th>Picture</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @lecturers.each do |lecturer| %>
|
||||
<tr>
|
||||
<td><%= lecturer.name %></td>
|
||||
<td><%= lecturer.email %></td>
|
||||
<td><%= lecturer.oid %></td>
|
||||
<td><%= lecturer.picture %></td>
|
||||
<td><%= link_to 'Show', lecturer %></td>
|
||||
<td><%= link_to 'Edit', edit_lecturer_path(lecturer) %></td>
|
||||
<td><%= link_to 'Destroy', lecturer, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Lecturer', new_lecturer_path %>
|
||||
5
app/views/lecturers/new.html.erb
Normal file
5
app/views/lecturers/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New lecturer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', lecturers_path %>
|
||||
25
app/views/lecturers/show.html.erb
Normal file
25
app/views/lecturers/show.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @lecturer.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Email:</b>
|
||||
<%= @lecturer.email %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Oid:</b>
|
||||
<%= @lecturer.oid %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Picture:</b>
|
||||
<%= @lecturer.picture %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_lecturer_path(@lecturer) %> |
|
||||
<%= link_to 'Back', lecturers_path %>
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
<div class="lva-semester">
|
||||
<b><%= link_to lva.name, lva_path(lva)%></b><br>
|
||||
<%=lva.lvanr.to_s %> <b><%= link_to lva.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>
|
||||
<%="LVa-Nr " + lva.lvanr.to_s %>
|
||||
<%= lva.ects %> ECTS / <%= lva.stunden %> Std <% " / " + lva.beispiele.count.to_s + " Beispiele"%> <br>
|
||||
<%= link_to "Edit", edit_lva_path(lva) %> | <%= link_to "Beispiel hinzufügen", new_beispiel_path(:lva_id=>lva.id) %>
|
||||
<br>
|
||||
|
||||
<% " / " + lva.beispiele.count.to_s + " Beispiele"%> </div>-->
|
||||
</div class="lva-semester">
|
||||
|
||||
Reference in New Issue
Block a user