added intervention controller and stuff

This commit is contained in:
Thomas Hille
2017-02-28 15:24:53 +01:00
parent 2456f46b2b
commit 3d7f5bdf1a
10 changed files with 141 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
= form_for(@intervention) do |f|
= render('shared/form_errors', object: @intervention)
.form-group
= f.label(:name)
= f.text_field(:name, class: 'form-control', required: true)
.actions = render('shared/submit_button', f: f, object: @intervention)

View File

@@ -0,0 +1,14 @@
h1 = Intervention.model_name.human(count: 2)
.table-responsive
table.table
thead
tr
th = t('activerecord.attributes.intervention.name')
tbody
- @interventions.each do |intervention|
tr
td = intervention.name
td = link_to(t('shared.show'), intervention)
= render('shared/pagination', collection: @interventions)

View File

@@ -0,0 +1,4 @@
h1
= @intervention.name
= row(label: 'intervention.name', value: @intervention.name)