forked from bofh/fetsite
GitHub Account angelegt
This commit is contained in:
12
app/views/devise/confirmations/new.html.erb
Normal file
12
app/views/devise/confirmations/new.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<h2>Resend confirmation instructions</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -0,0 +1,5 @@
|
||||
<p>Welcome <%= @email %>!</p>
|
||||
|
||||
<p>You can confirm your account email through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
|
||||
@@ -0,0 +1,8 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
|
||||
|
||||
<p>If you didn't request this, please ignore this email.</p>
|
||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
||||
7
app/views/devise/mailer/unlock_instructions.html.erb
Normal file
7
app/views/devise/mailer/unlock_instructions.html.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
||||
|
||||
<p>Click the link below to unlock your account:</p>
|
||||
|
||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
|
||||
16
app/views/devise/passwords/edit.html.erb
Normal file
16
app/views/devise/passwords/edit.html.erb
Normal file
@@ -0,0 +1,16 @@
|
||||
<h2>Change your password</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<div><%= f.label :password, "New password" %><br />
|
||||
<%= f.password_field :password, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.submit "Change my password" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
12
app/views/devise/passwords/new.html.erb
Normal file
12
app/views/devise/passwords/new.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.submit "Send me reset password instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
29
app/views/devise/registrations/edit.html.erb
Normal file
29
app/views/devise/registrations/edit.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<% if resource.class.reconfirmable && resource.unconfirmed_email.present? %>
|
||||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
||||
<% end %>
|
||||
|
||||
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
||||
<%= f.password_field :password, :autocomplete => "off" %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
||||
<%= f.password_field :current_password %></div>
|
||||
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
|
||||
|
||||
<%= link_to "Back", :back %>
|
||||
18
app/views/devise/registrations/new.html.erb
Normal file
18
app/views/devise/registrations/new.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<h2>Sign up</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.submit "Sign up" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
17
app/views/devise/sessions/new.html.erb
Normal file
17
app/views/devise/sessions/new.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<h2>Sign in</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
|
||||
<div><%= f.submit "Sign in" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
25
app/views/devise/shared/_links.erb
Normal file
25
app/views/devise/shared/_links.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
||||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
12
app/views/devise/unlocks/new.html.erb
Normal file
12
app/views/devise/unlocks/new.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<h2>Resend unlock instructions</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email, :autofocus => true %></div>
|
||||
|
||||
<div><%= f.submit "Resend unlock instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
2
app/views/home/index.html.erb
Normal file
2
app/views/home/index.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<p><%= t :hello %></p>
|
||||
<p><%= t 'home.hallobeiderfet' %></p>
|
||||
24
app/views/layouts/application.html.erb
Normal file
24
app/views/layouts/application.html.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Fetsite</title>
|
||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1 style="display:block;float:none">Fachschaft Elektrotechnik</h1>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
<div id="menudiv"><%= render :template => 'layouts/menu' %></div>
|
||||
</div> <div class="span10">
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
24
app/views/layouts/menu.html.erb
Normal file
24
app/views/layouts/menu.html.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
<%= t 'home.mtitle'%>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><%= link_to I18n.t(:home,:scope=>'home' ), home_index_url %>
|
||||
</li>
|
||||
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
|
||||
<li><%= link_to I18n.t(:info,:scope=>'home' ) %></li>
|
||||
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<% if user_signed_in? %>
|
||||
<li>Logged in as : <%= current_user.email %>
|
||||
<%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= link_to('Login', new_user_session_path) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%if I18n.locale == :en %>
|
||||
<%= link_to "Deutsch" ,switch_locale_url(:de)%>
|
||||
<% elsif I18n.locale == :de %>
|
||||
<%= link_to "English" ,switch_locale_url(:en)%>
|
||||
<%end %>
|
||||
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 %>
|
||||
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>
|
||||
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) %>
|
||||
11
app/views/neuigkeiten/_form.html.erb
Normal file
11
app/views/neuigkeiten/_form.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<%= semantic_form_for @neuigkeit do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title, :placeholder=>"Titel" %>
|
||||
<%= f.input :text %>
|
||||
<%= f.input :datum %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/neuigkeiten/edit.html.erb
Normal file
6
app/views/neuigkeiten/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing neuigkeit</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @neuigkeit %> |
|
||||
<%= link_to 'Back', neuigkeiten_path %>
|
||||
27
app/views/neuigkeiten/index.html.erb
Normal file
27
app/views/neuigkeiten/index.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<h1>Listing neuigkeiten</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Text</th>
|
||||
<th>Datum</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @neuigkeiten.each do |neuigkeit| %>
|
||||
<tr>
|
||||
<td><%= neuigkeit.title %></td>
|
||||
<td><%= neuigkeit.text %></td>
|
||||
<td><%= neuigkeit.datum %></td>
|
||||
<td><%= link_to 'Show', neuigkeit %></td>
|
||||
<td><%= link_to 'Edit', edit_neuigkeit_path(neuigkeit) %></td>
|
||||
<td><%= link_to 'Destroy', neuigkeit, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Neuigkeit', new_neuigkeit_path %>
|
||||
5
app/views/neuigkeiten/new.html.erb
Normal file
5
app/views/neuigkeiten/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New neuigkeit</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', neuigkeiten_path %>
|
||||
20
app/views/neuigkeiten/show.html.erb
Normal file
20
app/views/neuigkeiten/show.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Title:</b>
|
||||
<%= @neuigkeit.title %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Text:</b>
|
||||
<%= @neuigkeit.text %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Datum:</b>
|
||||
<%= @neuigkeit.datum %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_neuigkeit_path(@neuigkeit) %> |
|
||||
<%= link_to 'Back', neuigkeiten_path %>
|
||||
11
app/views/rubriken/_form.html.erb
Normal file
11
app/views/rubriken/_form.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<%= semantic_form_for @rubrik do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :desc %>
|
||||
<%= f.input :prio %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/rubriken/edit.html.erb
Normal file
6
app/views/rubriken/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing rubrik</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @rubrik %> |
|
||||
<%= link_to 'Back', rubriken_path %>
|
||||
27
app/views/rubriken/index.html.erb
Normal file
27
app/views/rubriken/index.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<h1>Listing rubriken</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th>Prio</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @rubriken.each do |rubrik| %>
|
||||
<tr>
|
||||
<td><%= rubrik.name %></td>
|
||||
<td><%= rubrik.desc %></td>
|
||||
<td><%= rubrik.prio %></td>
|
||||
<td><%= link_to 'Show', rubrik %></td>
|
||||
<td><%= link_to 'Edit', edit_rubrik_path(rubrik) %></td>
|
||||
<td><%= link_to 'Destroy', rubrik, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Rubrik', new_rubrik_path %>
|
||||
5
app/views/rubriken/new.html.erb
Normal file
5
app/views/rubriken/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New rubrik</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', rubriken_path %>
|
||||
25
app/views/rubriken/show.html.erb
Normal file
25
app/views/rubriken/show.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @rubrik.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Desc:</b>
|
||||
<%= @rubrik.desc %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Prio:</b>
|
||||
<%= @rubrik.prio %>
|
||||
</p>
|
||||
<%= semantic_form_for @rubrik, :url=> url_for(:action => 'addmoderator') do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :moderator, :as => :select, :collection => Hash[User.all.map{|b| [b.email,b.id]}] %>
|
||||
<% end %>
|
||||
<%= f.action :submit %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Edit', edit_rubrik_path(@rubrik) %> |
|
||||
<%= link_to 'Back', rubriken_path %>
|
||||
12
app/views/semesters/_form.html.erb
Normal file
12
app/views/semesters/_form.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<%= semantic_form_for @semester do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :nummer %>
|
||||
<%= f.input :ws %>
|
||||
<%= f.input :ss %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/semesters/edit.html.erb
Normal file
6
app/views/semesters/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing semester</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @semester %> |
|
||||
<%= link_to 'Back', semesters_path %>
|
||||
29
app/views/semesters/index.html.erb
Normal file
29
app/views/semesters/index.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Listing semesters</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Nummer</th>
|
||||
<th>Ws</th>
|
||||
<th>Ss</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @semesters.each do |semester| %>
|
||||
<tr>
|
||||
<td><%= semester.name %></td>
|
||||
<td><%= semester.nummer %></td>
|
||||
<td><%= semester.ws %></td>
|
||||
<td><%= semester.ss %></td>
|
||||
<td><%= link_to 'Show', semester %></td>
|
||||
<td><%= link_to 'Edit', edit_semester_path(semester) %></td>
|
||||
<td><%= link_to 'Destroy', semester, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Semester', new_semester_path %>
|
||||
5
app/views/semesters/new.html.erb
Normal file
5
app/views/semesters/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New semester</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', semesters_path %>
|
||||
25
app/views/semesters/show.html.erb
Normal file
25
app/views/semesters/show.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @semester.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Nummer:</b>
|
||||
<%= @semester.nummer %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Ws:</b>
|
||||
<%= @semester.ws %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Ss:</b>
|
||||
<%= @semester.ss %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_semester_path(@semester) %> |
|
||||
<%= link_to 'Back', semesters_path %>
|
||||
13
app/views/studien/_form.html.erb
Normal file
13
app/views/studien/_form.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<%= tinymce_assets %>
|
||||
<%= semantic_form_for @studium do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :zahl %>
|
||||
<%= f.input :name,:append=>"NAME" %>
|
||||
<%= f.input :desc, :as=>:tinymce_text %>
|
||||
<%= f.input :typ, :as=>:radio, :collection=>["Bachelor","Master"]%>
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/studien/edit.html.erb
Normal file
6
app/views/studien/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing studium</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @studium %> |
|
||||
<%= link_to 'Back', studien_path %>
|
||||
31
app/views/studien/index.html.erb
Normal file
31
app/views/studien/index.html.erb
Normal file
@@ -0,0 +1,31 @@
|
||||
<h1><%= I18n.t("studien.list") %></h1>
|
||||
|
||||
<table class="table-striped">
|
||||
<tr>
|
||||
<th>Zahl</th>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th>Typ</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @studien.each do |studium| %>
|
||||
|
||||
<tr>
|
||||
<td><%= studium.zahl %></td>
|
||||
<td><%= studium.name %></td>
|
||||
|
||||
<td><%= studium.typ %></td>
|
||||
<td><%= link_to 'Show', studium_path(studium) %></td>
|
||||
<td><%= link_to 'Edit', edit_studium_path(studium) %></td>
|
||||
<td><%= link_to 'Destroy', studium, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to I18n.t("studien.new"), new_studium_path %>
|
||||
5
app/views/studien/new.html.erb
Normal file
5
app/views/studien/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New studium</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', studien_index_path , :data=>{:locale=>I16n.locale}%>
|
||||
38
app/views/studien/show.html.erb
Normal file
38
app/views/studien/show.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
<p id="notice"><%= notice %></p>
|
||||
<h1><%= @studium.typ %> <%= @studium.name %> (<%= @studium.zahl %>)</h1>
|
||||
<%= raw(@studium.desc) %>
|
||||
<% [1, 2 ,3].each do |ph| %>
|
||||
|
||||
<% ph_mod = @studium.modulgruppen.where(:phase=>ph)
|
||||
if ph_mod.count==1
|
||||
width=12
|
||||
slice=1
|
||||
elsif ph_mod.count <= 4
|
||||
width=6
|
||||
slice=2
|
||||
else
|
||||
width=4
|
||||
slice=3
|
||||
end
|
||||
|
||||
|
||||
%>
|
||||
|
||||
<% ph_mod.each_slice(slice) do |row| %>
|
||||
<div class="row-fluid">
|
||||
<% row.each do |modulgruppe| %>
|
||||
<div class="span<%= width%> min-width:13em;">
|
||||
<%= render modulgruppe %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= link_to 'New Modulgruppe', new_studium_modulgruppe_path(@studium) %> |
|
||||
<%= link_to 'Edit', edit_studium_path(@studium) %> |
|
||||
<%= link_to '<i class="icon-list"></i> Alle Studien'.html_safe, studien_path,:class=>"btn",:raw=>true %>
|
||||
</div></div>
|
||||
10
app/views/users/index.html.erb
Normal file
10
app/views/users/index.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<table class="table">
|
||||
<% @users.each do |user|%>
|
||||
<tr>
|
||||
<th>
|
||||
<%= user.email %></th><td><ul>
|
||||
<% user.roles.each do |role| %>
|
||||
<li><%= role.name%></li>
|
||||
<% end %></ul></td>
|
||||
</tr><% end %>
|
||||
</table>
|
||||
Reference in New Issue
Block a user