diff options
| author | Luc Donnet | 2017-09-11 17:27:10 +0200 | 
|---|---|---|
| committer | Luc Donnet | 2017-09-11 17:27:10 +0200 | 
| commit | 5ee3a180de710d23ceb7660b1bcc454701b42d87 (patch) | |
| tree | c5a6fa4d304306bb53dfcea93037f3ac10b46624 /app/views/workbenches | |
| parent | 1b2976d7a63cc140304bd94b88b5ddc93e0aceb0 (diff) | |
| download | chouette-core-5ee3a180de710d23ceb7660b1bcc454701b42d87.tar.bz2 | |
Fix views and access for api keys generation Refs #4276 @8
Diffstat (limited to 'app/views/workbenches')
| -rw-r--r-- | app/views/workbenches/index.html.slim | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/workbenches/index.html.slim b/app/views/workbenches/index.html.slim index eece51bca..2ea1f0fe4 100644 --- a/app/views/workbenches/index.html.slim +++ b/app/views/workbenches/index.html.slim @@ -2,6 +2,13 @@  = pageheader 'tableau-de-bord',               t('.title', organisation: current_organisation.name) +  / Below is secundary actions & optional contents (filters, ...) +  .row.mb-sm +   .col-lg-12.text-right +     - if policy(Api::V1::ApiKey).create? +       = link_to t('actions.create_api_key'), new_api_key_path, class: 'btn btn-primary' + +  / PageContent  .page_content    .container-fluid @@ -27,6 +34,19 @@            .panel-body              em.small.text-muted = t('.offers.no_content') +        .panel.panel-default +          .panel-heading +            h3.panel-title +              = t('.offers.api_keys') +              span.badge.ml-xs = current_organisation.api_keys.count if current_organisation.api_keys.any? +          - if current_organisation.api_keys.any? +            - current_organisation.api_keys.each do |api_key| +              .list-group +                = policy(api_key).edit? ? link_to( "#{api_key.name} : #{api_key.token}", edit_api_key_path(api_key), class: 'list-group-item') : "#{api_key.name} : #{api_key.token}" +          - else +            .panel-body +              em.small.text-muted = t('.offers.no_content') +        .col-lg-6.col-md-6.col-sm-6.col-xs-12          .panel.panel-default            .panel-heading  | 
