show.html.haml 1.69 KB
Newer Older
Annabel Dunstone's avatar
Annabel Dunstone committed
1 2
- @no_container = true

3
- page_title "Commits", @ref
4
= content_for :meta_tags do
5
  = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, rss_url_options), title: "#{@project.name}:#{@ref} commits")
6

7 8
= content_for :sub_nav do
  = render "head"
gitlabhq's avatar
gitlabhq committed
9

Valery Sizov's avatar
Valery Sizov committed
10
%div{ class: container_class }
11
  .row-content-block.second-block.content-component-block.flex-container-block
Annabel Dunstone's avatar
Annabel Dunstone committed
12 13 14
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'commits'

15 16 17
    %ul.breadcrumb.repo-breadcrumb
      = commits_breadcrumbs

Annabel Dunstone's avatar
Annabel Dunstone committed
18 19 20
    .block-controls.hidden-xs.hidden-sm
      - if @merge_request.present?
        .control
21
          = link_to "View open merge request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn'
Annabel Dunstone's avatar
Annabel Dunstone committed
22 23
      - elsif create_mr_button?(@repository.root_ref, @ref)
        .control
24
          = link_to "Create merge request", create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
25

26
      .control
Phil Hughes's avatar
Phil Hughes committed
27 28
        = 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 }
29
      .control
30
        = link_to namespace_project_commits_path(@project.namespace, @project, @ref, rss_url_options), title: "Commits feed", class: 'btn' do
31
          = icon("rss")
gitlabhq's avatar
gitlabhq committed
32

33 34
  = render 'projects/commits/mirror_status'

35
  %div{ id: dom_id(@project) }
Phil Hughes's avatar
Phil Hughes committed
36
    %ol#commits-list.list-unstyled.content_list
37
      = render 'commits', project: @project, ref: @ref
Annabel Dunstone's avatar
Annabel Dunstone committed
38
  = spinner
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
39

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