index.html.haml 2.3 KB
Newer Older
1
- @no_container = true
D
Douwe Maan 已提交
2
- page_title "Issues"
3
- new_issue_email = @project.new_issue_address(current_user)
4
= render "projects/issues/head"
5

6 7 8 9
= content_for :meta_tags do
  - if current_user
    = auto_discovery_link_tag(:atom, namespace_project_issues_url(@project.namespace, @project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues")

10
%div{ class: (container_class) }
11
  - if @project.issues.any?
P
Phil Hughes 已提交
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
    .top-area
      = render 'shared/issuable/nav', type: :issues
      .nav-controls
        - if current_user
          = link_to namespace_project_issues_path(@project.namespace, @project, :atom, { private_token: current_user.private_token }), class: 'btn append-right-10' do
            = icon('rss')
            %span.icon-label
              Subscribe
        = render 'shared/issuable/search_form', path: namespace_project_issues_path(@project.namespace, @project)
        - if can? current_user, :create_issue, @project
          = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { assignee_id: @issuable_finder.assignee.try(:id), milestone_id: @issuable_finder.milestones.try(:first).try(:id) }), class: "btn btn-new", title: "New Issue", id: "new_issue_link" do
            New Issue
    = render 'shared/issuable/filter', type: :issues

    .issues-holder
      = render "issues"
  - else
    .blank-state.blank-state-welcome
P
Phil Hughes 已提交
30
      %h2.blank-state-title.blank-state-welcome-title
P
Phil Hughes 已提交
31 32 33 34 35
        Welcome to GitLab Issues
      %p.blank-state-text
        Code, test, and deploy together
    .blank-state
      .blank-state-icon
36
        = custom_icon("issues", size: 50)
P
Phil Hughes 已提交
37 38 39
      %h3.blank-state-title
        You don't have any issues right now.
      %p.blank-state-text
P
Phil Hughes 已提交
40
        Issues are the best way to track your project progress
41
      - if can? current_user, :create_issue, @project
P
Phil Hughes 已提交
42
        = link_to new_namespace_project_issue_path(@project.namespace, @project), class: "btn btn-new", title: "New Issue", id: "new_issue_link" do
43
          New Issue
44

45
  = render 'shared/issuable/filter', type: :issues
46

47 48
  .issues-holder
    = render "issues"
49 50 51 52 53
  - if new_issue_email
    .issues-footer.text-center
      %button.issue-email-modal-btn{ type: "button", data: { toggle: "modal", target: "#issue-email-modal" } }
        Email a new issue to this project
    = render "issue_by_email", email: new_issue_email