.repository-container{ style: "margin-bottom: 1.5em" }
  %div{ style: "margin-left: 15px" }
    %strong
      = link_to(repository.name, action: 'state', project: @project, repository: repository.name)
    %i
      = "(" + repository.architectures.pluck(:name).join(', ') + ")"
  %div{ style: "margin-left: 30px" }
    - repository.path_elements.each do |path|
      - if path.link.project == 'deleted'
        = sprite_tag 'exclamation'
        = Target repository has been removed
      - else
        %span
          = "#{path.link.project}/#{path.link.name}"

    %div{ style: "margin-top: 1em" }
      - # No edit for DoD repositories
      - if User.current.can_modify_project?(@project) && !repository.is_dod_repository?
        %span.edit-repository-field
          = sprite_tag('drive_edit')
          = link_to('Edit repository', '#', data: { "repository-edit": true })
        %div.hidden.edit-repository-container
          = render partial: 'edit_repository', locals: { project: @project, repository: repository }
      - if User.current.can_modify_project?(@project)
        = sprite_tag('drive_delete', title: 'Delete repository')
        = link_to('Delete repository', { action: :destroy, project: @project, target: repository.name }, |
                      { data: { confirm: "Really remove repository '#{repository.name}'?" }, class: 'x', method: :post })
      - elsif !User.current.is_nobody?
        = sprite_tag('drive_delete', title: 'Delete repository')
        = link_to('Request repository deletion', { action: :remove_target_request_dialog, controller: :project, project: @project, repository: repository.name }, remote: true)
      = render partial: 'shared/download_repository_link', locals: { project: @project, repository: repository }
      - if repository.release_targets.where(trigger: "manual").exists?
        = sprite_tag('flag_green')
        = link_to('Release repository', { action: :release_repository_dialog, controller: :project, project: @project, repository: repository.name }, remote: true)
    - if repository.is_dod_repository?
      = render partial: 'webui/download_on_demand/index', locals: { project: @project, repository: repository }
