Merge remote-tracking branch 'origin/master' into statistics
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
- if current_user.admin?
|
||||
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path)
|
||||
li.divider
|
||||
- models = [ExecutionEnvironment, Exercise, Consumer, ExternalUser, FileType, InternalUser, Submission, Team].sort_by { |model| model.model_name.human(count: 2) }
|
||||
- models = [ExecutionEnvironment, Exercise, Consumer, CodeHarborLink, ExternalUser, FileType, InternalUser, Submission, Team].sort_by { |model| model.model_name.human(count: 2) }
|
||||
- models.each do |model|
|
||||
- if policy(model).index?
|
||||
li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
||||
|
6
app/views/code_harbor_links/_form.html.slim
Normal file
6
app/views/code_harbor_links/_form.html.slim
Normal file
@@ -0,0 +1,6 @@
|
||||
= form_for(@code_harbor_link) do |f|
|
||||
= render('shared/form_errors', object: @code_harbor_link)
|
||||
.form-group
|
||||
= f.label(:oauth2token)
|
||||
= f.text_field(:oauth2token, class: 'form-control', required: true)
|
||||
.actions = render('shared/submit_button', f: f, object: @code_harbor_link)
|
3
app/views/code_harbor_links/edit.html.slim
Normal file
3
app/views/code_harbor_links/edit.html.slim
Normal file
@@ -0,0 +1,3 @@
|
||||
h1 = @code_harbor_link
|
||||
|
||||
= render('form')
|
18
app/views/code_harbor_links/index.html.slim
Normal file
18
app/views/code_harbor_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.code_harbor_link.oauth2token')
|
||||
th colspan=3 = t('shared.actions')
|
||||
tbody
|
||||
- @code_harbor_links.each do |code_harbor_link|
|
||||
tr
|
||||
td = code_harbor_link.oauth2token
|
||||
td = link_to(t('shared.show'), code_harbor_link)
|
||||
td = link_to(t('shared.edit'), edit_code_harbor_link_path(code_harbor_link))
|
||||
td = link_to(t('shared.destroy'), code_harbor_link, data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
||||
|
||||
= render('shared/pagination', collection: @code_harbor_links)
|
||||
p = render('shared/new_button', model: CodeHarborLink)
|
3
app/views/code_harbor_links/new.html.slim
Normal file
3
app/views/code_harbor_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/code_harbor_links/show.html.slim
Normal file
7
app/views/code_harbor_links/show.html.slim
Normal file
@@ -0,0 +1,7 @@
|
||||
h1
|
||||
= @code_harbor_link
|
||||
= render('shared/edit_button', object: @code_harbor_link) if policy(@code_harbor_link).edit?
|
||||
|
||||
- %w[oauth2token].each do |attribute|
|
||||
= row(label: "code_harbor_link.#{attribute}") do
|
||||
= content_tag(:input, nil, class: 'form-control', readonly: true, value: @code_harbor_link.send(attribute))
|
Reference in New Issue
Block a user