_board.html.haml 3.9 KB
Newer Older
1 2
%board{ "inline-template" => true,
  "v-cloak" => true,
3
  "v-for" => "list in state.lists | orderBy 'position'",
4
  "v-ref:board" => true,
5
  ":list" => "list",
6
  ":disabled" => "disabled",
7 8
  ":issue-link-base" => "issueLinkBase",
  "track-by" => "_uid" }
P
Phil Hughes 已提交
9
  .board{ ":class" => "{ 'is-draggable': !list.preset }",
P
Phil Hughes 已提交
10
    ":data-id" => "list.id" }
11
    .board-inner
12
      %header.board-header{ ":class" => "{ 'has-border': list.label }", ":style" => "{ borderTopColor: (list.label ? list.label.color : null) }" }
P
Phil Hughes 已提交
13
        %h3.board-title.js-board-handle{ ":class" => "{ 'user-can-drag': (!disabled && !list.preset) }" }
14
          {{ list.title }}
15 16
          .board-issue-count-holder.pull-right.clearfix{ "v-if" => "list.type !== 'blank'" }
            %span.board-issue-count.pull-left{ ":class" => "{ 'has-btn': list.type !== 'done' }" }
P
Phil Hughes 已提交
17
              {{ list.issuesSize }}
P
Phil Hughes 已提交
18
            - if can?(current_user, :admin_issue, @project)
P
Phil Hughes 已提交
19
              %button.btn.btn-small.btn-default.pull-right.has-tooltip{ type: "button",
P
Phil Hughes 已提交
20
                "@click" => "showNewIssueForm",
21
                "v-if" => "list.type !== 'done'",
P
Phil Hughes 已提交
22 23 24
                "aria-label" => "Add an issue",
                "title" => "Add an issue",
                data: { placement: "top", container: "body" } }
P
Phil Hughes 已提交
25
                = icon("plus")
26
          - if can?(current_user, :admin_list, @project)
P
Phil Hughes 已提交
27
            %board-delete{ "inline-template" => true,
28
              ":list" => "list",
P
Phil Hughes 已提交
29
              "v-if" => "!list.preset && list.id" }
P
Phil Hughes 已提交
30
              %button.board-delete.has-tooltip.pull-right{ type: "button", title: "Delete list", "aria-label" => "Delete list", data: { placement: "bottom" }, "@click.stop" => "deleteBoard" }
31
                = icon("trash")
P
Phil Hughes 已提交
32
      %board-list{ "inline-template" => true,
33 34 35 36
        "v-if" => "list.type !== 'blank'",
        ":list" => "list",
        ":issues" => "list.issues",
        ":loading" => "list.loading",
37
        ":disabled" => "disabled",
P
Phil Hughes 已提交
38
        ":show-issue-form.sync" => "showIssueForm",
39
        ":issue-link-base" => "issueLinkBase" }
P
Phil Hughes 已提交
40 41
        .board-list-loading.text-center{ "v-if" => "loading" }
          = icon("spinner spin")
P
Phil Hughes 已提交
42 43 44 45 46 47 48
        - if can? current_user, :create_issue, @project
          %board-new-issue{ "inline-template" => true,
            ":list" => "list",
            ":show-issue-form.sync" => "showIssueForm",
            "v-show" => "list.type !== 'done' && showIssueForm" }
            .card.board-new-issue-form
              %form{ "@submit" => "submit($event)" }
49 50 51
                .flash-container{ "v-if" => "error" }
                  .flash-alert
                    An error occured. Please try again.
52
                %label.label-light{ ":for" => "list.id + '-title'" }
P
Phil Hughes 已提交
53 54 55
                  Title
                %input.form-control{ type: "text",
                  "v-model" => "title",
56 57
                  "v-el:input" => true,
                  ":id" => "list.id + '-title'" }
P
Phil Hughes 已提交
58 59
                .clearfix.prepend-top-10
                  %button.btn.btn-success.pull-left{ type: "submit",
60 61
                    ":disabled" => "title === ''",
                    "v-el:submit-button" => true }
P
Phil Hughes 已提交
62 63 64 65
                    Submit issue
                  %button.btn.btn-default.pull-right{ type: "button",
                    "@click" => "cancel" }
                    Cancel
66 67
        %ul.board-list{ "v-el:list" => true,
          "v-show" => "!loading",
P
Phil Hughes 已提交
68 69
          ":data-board" => "list.id",
          ":class" => "{ 'is-smaller': showIssueForm }" }
70
          = render "projects/boards/components/card"
P
Phil Hughes 已提交
71 72 73 74 75 76
          %li.board-list-count.text-center{ "v-if" => "showCount" }
            = icon("spinner spin", "v-show" => "list.loadingMore" )
            %span{ "v-if" => "list.issues.length === list.issuesSize" }
              Showing all issues
            %span{ "v-else" => true }
              Showing {{ list.issues.length }} of {{ list.issuesSize }} issues
77
      - if can?(current_user, :admin_list, @project)
78
        = render "projects/boards/components/blank_state"