readding codeharbor_link views and actions
This commit is contained in:
6
app/views/codeharbor_links/_form.html.slim
Normal file
6
app/views/codeharbor_links/_form.html.slim
Normal file
@ -0,0 +1,6 @@
|
||||
= form_for(@codeharbor_link) do |f|
|
||||
= render('shared/form_errors', object: @codeharbor_link)
|
||||
.form-group
|
||||
= f.label(:oauth2token)
|
||||
= f.text_field(:oauth2token, class: 'form-control', required: true)
|
||||
.actions = render('shared/submit_button', f: f, object: @codeharbor_link)
|
3
app/views/codeharbor_links/edit.html.slim
Normal file
3
app/views/codeharbor_links/edit.html.slim
Normal file
@ -0,0 +1,3 @@
|
||||
h1 = @codeharbor_link
|
||||
|
||||
= render('form')
|
18
app/views/codeharbor_links/index.html.slim
Normal file
18
app/views/codeharbor_links/index.html.slim
Normal file
@ -0,0 +1,18 @@
|
||||
h1 = CodeharborLink.model_name.human(count: 2)
|
||||
|
||||
.table-responsive
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th = t('activerecord.attributes.codeharbor_link.oauth2token')
|
||||
th colspan=3 = t('shared.actions')
|
||||
tbody
|
||||
- @codeharbor_links.each do |codeharbor_link|
|
||||
tr
|
||||
td = link_to_if(policy(codeharbor_link).show?, codeharbor_link.oauth2token, codeharbor_link)
|
||||
td = link_to(t('shared.show'), codeharbor_link) if policy(codeharbor_link).show?
|
||||
td = link_to(t('shared.edit'), edit_codeharbor_link_path(codeharbor_link)) if policy(codeharbor_link).edit?
|
||||
td = link_to(t('shared.destroy'), codeharbor_link, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(codeharbor_link).destroy?
|
||||
|
||||
= render('shared/pagination', collection: @codeharbor_links)
|
||||
p = render('shared/new_button', model: CodeharborLink)
|
3
app/views/codeharbor_links/new.html.slim
Normal file
3
app/views/codeharbor_links/new.html.slim
Normal file
@ -0,0 +1,3 @@
|
||||
h1 = t('shared.new_model', model: CodeharborLink.model_name.human)
|
||||
|
||||
= render('form')
|
7
app/views/codeharbor_links/show.html.slim
Normal file
7
app/views/codeharbor_links/show.html.slim
Normal file
@ -0,0 +1,7 @@
|
||||
h1
|
||||
= @codeharbor_link
|
||||
= render('shared/edit_button', object: @codeharbor_link)
|
||||
|
||||
- %w[oauth2token].each do |attribute|
|
||||
= row(label: "codeharbor_link.#{attribute}") do
|
||||
= content_tag(:input, nil, class: 'form-control', readonly: true, value: @codeharbor_link.send(attribute))
|
Reference in New Issue
Block a user