summaryrefslogtreecommitdiff
path: root/app/views/projects/deploy_tokens/_index.html.haml
blob: 50e5950ced473c9f405dbcf9255c13c8bc82c231 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- expanded = expand_deploy_tokens_section?(@new_deploy_token)

%section.settings.no-animate{ class: ('expanded' if expanded) }
  .settings-header
    %h4= s_('DeployTokens|Deploy Tokens')
    %button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' }
      = expanded ? 'Collapse' : 'Expand'
    %p
      = s_('DeployTokens|Deploy tokens allow read-only access to your repository and registry images.')
  .settings-content
    - if @new_deploy_token.persisted?
      = render 'projects/deploy_tokens/new_deploy_token', deploy_token: @new_deploy_token
    - else
      %h5.prepend-top-0
        = s_('DeployTokens|Add a deploy token')
      = render 'projects/deploy_tokens/form', project: @project, token: @new_deploy_token, presenter: @deploy_tokens
      %hr
    = render 'projects/deploy_tokens/table', project: @project, active_tokens: @deploy_tokens