- number_paths = 3

- if repository.path_elements.present?
  %strong Repository paths:
  %ol.list-unstyled.ms-3
    - repository.path_elements.each_with_index do |path, index|
      - if index < number_paths
        = render partial: 'repository_path_item', locals: { project: project, repository: repository, path: path,
                                                            user_can_modify: user_can_modify }
      - else
        - content_for :repository_path_item, flush: index == number_paths do
          = render partial: 'repository_path_item', locals: { project: project, repository: repository, path: path,
                                                              user_can_modify: user_can_modify }
    - if repository.path_elements.size > number_paths
      %details.repository-path
        %summary.small
          %span.more More
          %span.less Less
        = yield :repository_path_item

= render partial: 'edit_repository_modal', locals: { repository: repository, project: project, available_architectures: available_architectures }
= render partial: 'mark_important_modal', locals: { repository: repository, project: project, available_architectures: available_architectures }
= render partial: 'add_repository_path_modal', locals: { repository: repository, project: project, user_can_modify: user_can_modify }
