added intervention controller and stuff
This commit is contained in:
6
app/views/interventions/_form.html.slim
Normal file
6
app/views/interventions/_form.html.slim
Normal 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)
|
14
app/views/interventions/index.html.slim
Normal file
14
app/views/interventions/index.html.slim
Normal 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)
|
4
app/views/interventions/show.html.slim
Normal file
4
app/views/interventions/show.html.slim
Normal file
@@ -0,0 +1,4 @@
|
||||
h1
|
||||
= @intervention.name
|
||||
|
||||
= row(label: 'intervention.name', value: @intervention.name)
|
Reference in New Issue
Block a user