_project.html.haml 993 字节
Newer Older
V
Valery Sizov 已提交
1 2 3
- if project.gitlab_ci_project
  - ci_project = project.gitlab_ci_project
  - last_commit = ci_project.last_commit
D
Dmitriy Zaporozhets 已提交
4
  %tr
V
Valery Sizov 已提交
5 6 7 8 9
    %td
      = link_to [:ci, ci_project] do
        = ci_project.name
    %td
      - if last_commit
D
Dmitriy Zaporozhets 已提交
10
        = ci_status_with_icon(last_commit.status)
11 12
        = commit_link(last_commit)
        ·
V
Valery Sizov 已提交
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
        - if ci_project.last_commit_date
          = time_ago_in_words ci_project.last_commit_date
          ago
      - else
        No builds yet
    %td
      - if ci_project.public
        %i.fa.fa-globe
        Public
      - else
        %i.fa.fa-lock
        Private
    %td
      = ci_project.commits.count
- else
  %tr.light
    %td
      = project.name_with_namespace
    %td
      %small Not added to CI
    %td
    %td
      = form_tag ci_projects_path do
        = hidden_field_tag :project, project.to_json(methods: [:name_with_namespace, :path_with_namespace, :ssh_url_to_repo])
        = submit_tag 'Add project to CI', class: 'btn btn-default btn-sm'