Klaus V2.0

This commit is contained in:
Florian Bogenhard
2014-08-11 01:35:48 +02:00
parent 4a1a0937d4
commit cedeffd2c6
55 changed files with 1267 additions and 40 deletions
+6
View File
@@ -0,0 +1,6 @@
div.well
= bootstrap_form_for(@lesson) do |f|
= f.text_field :name
= f.text_field :short_name
= f.submit
+4
View File
@@ -0,0 +1,4 @@
- content_for :page_header
| Fach - #{@lesson.name}
= render 'form'
+19
View File
@@ -0,0 +1,19 @@
<% content_for :page_header do %>
Fach - Index
<% end %>
<%= grid(@lessons_grid, upper_pagination_panel: true) do |g|
g.blank_slate content_tag(:div, "No records found", class: 'well')
g.column name: 'ID', attribute: 'id'
g.column name: 'Name', attribute: 'short_name'
g.column name: 'Name', attribute: 'name'
g.column do |lesson|
contant = content_tag(:div, class: 'btn-group') do
link = ''.html_safe
link.concat btn_link_to('Edit', edit_lesson_path(lesson), class: 'btn-xs btn-warning') if user_signed_in?
link.concat btn_link_to('Delete', lesson_path(lesson), method: "delete", :data => { confirm: 'Are you sure?' }, class: 'btn-xs btn-danger') if user_signed_in?
link
end
end
end
%>
+4
View File
@@ -0,0 +1,4 @@
- content_for :page_header
| Neues Fach
= render 'form'