aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/api_keys
diff options
context:
space:
mode:
authorXinhui2017-11-23 14:14:04 +0100
committerXinhui2017-11-28 12:21:33 +0100
commit6820faf7849ff704c55cde29c8b2efc320ff63d7 (patch)
treefca06b0663ff2150349cafe6fd5839d3ea7115af /app/views/api_keys
parent1e61b1792c4c0be9e55b6469610fca982d8a9e54 (diff)
downloadchouette-core-6820faf7849ff704c55cde29c8b2efc320ff63d7.tar.bz2
Replace pageheader by render partial
Diffstat (limited to 'app/views/api_keys')
-rw-r--r--app/views/api_keys/edit.html.slim15
-rw-r--r--app/views/api_keys/new.html.slim7
2 files changed, 6 insertions, 16 deletions
diff --git a/app/views/api_keys/edit.html.slim b/app/views/api_keys/edit.html.slim
index 9d7d1fdb7..c5d3ff34d 100644
--- a/app/views/api_keys/edit.html.slim
+++ b/app/views/api_keys/edit.html.slim
@@ -1,16 +1,11 @@
-/ PageHeader
-= pageheader 'Clé d\'API',
- t('api_keys.edit.title'),
- 'Lorem ipsum dolor sit amet',
- t('last_update', time: l(@api_key.updated_at, format: :short)),
- ''
-
- / Below are secondary actions & optional content (filters, ...)
+- content_for :page_header_content do
+ - if policy(@api_key).destroy?
.row.mb-sm
.col-lg-12.text-right
- = ( policy(@api_key).destroy? ? link_to(t('actions.destroy'), api_key_path(@api_key), :method => :delete, class: 'btn btn-default') : '' )
+ = link_to(t('actions.destroy'), api_key_path(@api_key), :method => :delete, class: 'btn btn-default')
+
+= render partial: 'layouts/navigation/page_header', locals: {object: @api_key}
-/ PageContent
.page_content
.container-fluid
.row
diff --git a/app/views/api_keys/new.html.slim b/app/views/api_keys/new.html.slim
index 9acb08a94..061499f8f 100644
--- a/app/views/api_keys/new.html.slim
+++ b/app/views/api_keys/new.html.slim
@@ -1,10 +1,5 @@
-/ PageHeader
-= pageheader 'Clé d\'API',
- t('api_keys.new.title'),
- 'Lorem ipsum dolor sit amet',
- ''
+= render partial: 'layouts/navigation/page_header'
-/ PageContent
.page_content
.container-fluid
.row