transferred Code Ocean from original repository to GitHub
This commit is contained in:
12
app/views/consumers/_form.html.slim
Normal file
12
app/views/consumers/_form.html.slim
Normal file
@@ -0,0 +1,12 @@
|
||||
= form_for(@consumer, multipart: true) do |f|
|
||||
= render('shared/form_errors', object: @consumer)
|
||||
.form-group
|
||||
= f.label(:name)
|
||||
= f.text_field(:name, class: 'form-control', required: true)
|
||||
.form-group
|
||||
= f.label(:oauth_key)
|
||||
= f.text_field(:oauth_key, class: 'form-control', required: true)
|
||||
.form-group
|
||||
= f.label(:oauth_secret)
|
||||
= f.text_field(:oauth_secret, class: 'form-control', required: true)
|
||||
.actions = render('shared/submit_button', f: f, object: @consumer)
|
3
app/views/consumers/edit.html.slim
Normal file
3
app/views/consumers/edit.html.slim
Normal file
@@ -0,0 +1,3 @@
|
||||
h1 = @consumer
|
||||
|
||||
= render('form')
|
17
app/views/consumers/index.html.slim
Normal file
17
app/views/consumers/index.html.slim
Normal file
@@ -0,0 +1,17 @@
|
||||
h1 = Consumer.model_name.human(count: 2)
|
||||
|
||||
.table-responsive
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th = t('activerecord.attributes.consumer.name')
|
||||
th colspan=3 = t('shared.actions')
|
||||
tbody
|
||||
- @consumers.each do |consumer|
|
||||
tr
|
||||
td = consumer.name
|
||||
td = link_to(t('shared.show'), consumer)
|
||||
td = link_to(t('shared.edit'), edit_consumer_path(consumer))
|
||||
td = link_to(t('shared.destroy'), consumer, data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
||||
|
||||
p = render('shared/new_button', model: Consumer)
|
3
app/views/consumers/new.html.slim
Normal file
3
app/views/consumers/new.html.slim
Normal file
@@ -0,0 +1,3 @@
|
||||
h1 = t('shared.new_model', model: Consumer.model_name.human)
|
||||
|
||||
= render('form')
|
8
app/views/consumers/show.html.slim
Normal file
8
app/views/consumers/show.html.slim
Normal file
@@ -0,0 +1,8 @@
|
||||
h1
|
||||
= @consumer
|
||||
= render('shared/edit_button', object: @consumer) if policy(@consumer).edit?
|
||||
|
||||
= row(label: 'consumer.name', value: @consumer.name)
|
||||
- %w[oauth_key oauth_secret].each do |attribute|
|
||||
= row(label: "consumer.#{attribute}") do
|
||||
= content_tag(:input, nil, class: 'form-control', readonly: true, value: @consumer.send(attribute))
|
Reference in New Issue
Block a user