summaryrefslogtreecommitdiff
path: root/app/views/projects/commits/show.html.haml
blob: d94f23f5a3839b1e474ec633fcb7afc4c8eb6e5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- @no_container = true

- page_title "Commits", @ref
= content_for :meta_tags do
  - if current_user
    = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "#{@project.name}:#{@ref} commits")

= content_for :sub_nav do
  = render "head"

%div{ class: container_class }
  .row-content-block.second-block.content-component-block.flex-container-block
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'commits'

    %ul.breadcrumb.repo-breadcrumb
      = commits_breadcrumbs

    .block-controls.hidden-xs.hidden-sm
      - if @merge_request.present?
        .control
          = link_to "View Open Merge Request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn'
      - elsif create_mr_button?(@repository.root_ref, @ref)
        .control
          = link_to create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success' do
            = icon('plus')
            Create Merge Request

      .control
        = form_tag(namespace_project_commits_path(@project.namespace, @project, @id), method: :get, class: 'commits-search-form') do
          = search_field_tag :search, params[:search], { placeholder: 'Filter by commit message', id: 'commits-search', class: 'form-control search-text-input input-short', spellcheck: false }
      - if current_user && current_user.private_token
        .control
          = link_to namespace_project_commits_path(@project.namespace, @project, @ref, { format: :atom, private_token: current_user.private_token }), title: "Commits Feed", class: 'btn' do
            = icon("rss")

  %div{ id: dom_id(@project) }
    %ol#commits-list.list-unstyled.content_list
      = render 'commits', project: @project, ref: @ref
  = spinner

:javascript
  CommitsList.init(#{@limit});