_board.html.haml 2.1 KB
Newer Older
1 2
%board{ "inline-template" => true,
  "v-cloak" => true,
3 4
  "v-for" => "list in state.lists | orderBy 'position'",
  ":list" => "list",
5 6
  ":disabled" => "disabled",
  ":issue-link-base" => "issueLinkBase" }
7
  .board{ ":class" => "{ 'is-draggable': !isPreset }" }
8
    .board-inner
9
      %header.board-header{ ":class" => "{ 'has-border': list.label }", ":style" => "{ borderTopColor: (list.label ? list.label.color : null) }" }
P
Phil Hughes 已提交
10
        %h3.board-title.js-board-handle{ ":class" => "{ 'user-can-drag': (!disabled && !isPreset) }" }
11 12 13
          {{ list.title }}
          %span.pull-right{ "v-if" => "list.type !== 'blank'" }
            {{ list.issues.length }}
14
          - if can?(current_user, :admin_list, @project)
P
Phil Hughes 已提交
15 16 17
            %board-delete{ "inline-template" => true,
              "v-if" => "!isPreset",
              ":list" => "list" }
18 19
              %button.board-delete.has-tooltip.pull-right{ type: "button", title: "Delete list", "aria-label" => "Delete list", data: { placement: "bottom" }, "@click" => "deleteBoard" }
                = icon("trash")
20
      .board-inner-container.board-search-container{ "v-if" => "list.canSearch()" }
21
        %input.form-control{ type: "text", placeholder: "Search issues", "v-model" => "query", "debounce" => "250" }
22
        = icon("search", class: "board-search-icon", "v-show" => "!query")
P
Phil Hughes 已提交
23
        %button.board-search-clear-btn{ type: "button", role: "button", "aria-label" => "Clear search", "@click" => "clearSearch", "v-show" => "query" }
24
          = icon("times", class: "board-search-clear")
P
Phil Hughes 已提交
25
      %board-list{ "inline-template" => true,
26 27 28 29
        "v-if" => "list.type !== 'blank'",
        ":list" => "list",
        ":issues" => "list.issues",
        ":loading" => "list.loading",
30
        ":disabled" => "disabled",
31
        ":issue-link-base" => "issueLinkBase" }
P
Phil Hughes 已提交
32 33
        .board-list-loading.text-center{ "v-if" => "loading" }
          = icon("spinner spin")
34 35
        %ul.board-list{ "v-el:list" => true,
          "v-show" => "!loading",
36
          ":data-board" => "list.id" }
37
          = render "projects/boards/components/card"
38
      - if can?(current_user, :admin_list, @project)
39
        = render "projects/boards/components/blank_state"