storyboard-webclient/src/app/boards/template/list.html

167 lines
7.1 KiB
HTML

<!--
~ Copyright (c) 2016 Codethink Limited
~
~ Licensed under the Apache License, Version 2.0 (the "License"); you may
~ not use this file except in compliance with the License. You may obtain
~ a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
~ License for the specific language governing permissions and limitations
~ under the License.
-->
<div class="container-fluid">
<div class="row">
<div class="col-sm-12">
<h1 view-title>Worklists and Boards</h1>
</div>
</div>
<div class="row">
<div class="col-sm-6"
ng-controller="SearchCriteriaController"
ng-init="init(worklistResourceTypes, defaultCriteria)"
search-results
search-resource="Worklist"
search-criteria="criteria"
search-without-criteria="true">
<table class="table table-striped">
<thead>
<th colspan="2">Worklists</th>
</thead>
<tbody>
<tr ng-repeat="worklist in searchResults">
<td>
<p>
<a href="#!/worklist/{{worklist.id}}">
{{worklist.title}}
</a>
</p>
<small>
<span class="badge"
ng-class="{'badge-primary': worklist.items.length > 0}">
{{worklist.items.length}}
</span> Items
</small>
</td>
</tr>
<div class="form-group has-feedback has-feedback-no-label">
<div id="search-criteria"
tag-complete="criteria as criteria.title for criteria in searchForCriteria($viewValue)"
tag-complete-tags="criteria"
tag-complete-label-field="title"
tag-complete-option-template-url="'app/search/template/typeahead_criteria_item.html'"
tag-complete-tag-template-url="'app/search/template/criteria_tag_item.html'"
tag-complete-loading="loadingCriteria = isLoading"
tag-complete-on-select="addCriteria(tag)"
placeholder="Search Worklists">
</div>
<span class="form-control-feedback text-muted">
<i class="fa fa-search"
ng-hide="loadingCriteria"></i>
<i class="fa fa-sync fa-spin"
ng-show="loadingCriteria"></i>
</span>
<result-set-pager
class="form-control-static text-muted pull-right"
total="searchTotal"
offset="searchOffset"
limit="searchLimit"
on-next-page="nextPage()"
on-previous-page="previousPage()"
on-page-size="updatePageSize(pageSize)"
></result-set-pager>
</div>
</tbody>
<tbody ng-show="searchResults.length == 0">
<td colspan="3" class="text-center text-muted">
<em>
No worklists found.
</em>
</td>
</tbody>
<tbody ng-show="isSearching">
<td colspan="3" class="text-center">
<i class="fa fa-sync fa-spin fa-lg"></i>
</td>
</tbody>
</table>
</div>
<div class="col-sm-6"
ng-controller="SearchCriteriaController"
ng-init="init(boardResourceTypes, defaultCriteria)"
search-results
search-resource="Board"
search-criteria="criteria"
search-without-criteria="true">
<table class="table table-striped">
<thead>
<th colspan="2">Boards</th>
</thead>
<tbody>
<tr ng-repeat="board in searchResults">
<td>
<p>
<a href="#!/board/{{board.id}}">
{{board.title}}
</a>
</p>
<small ng-repeat="lane in board.lanes"
ng-if="!lane.worklist.archived">
<span class="badge"
ng-class="{'badge-primary': lane.worklist.items.length > 0}">
{{lane.worklist.items.length}}
</span> {{lane.worklist.title}}
&nbsp;
</small>
</td>
</tr>
<div class="form-group has-feedback has-feedback-no-label">
<div id="search-criteria"
tag-complete="criteria as criteria.title for criteria in searchForCriteria($viewValue)"
tag-complete-tags="criteria"
tag-complete-label-field="title"
tag-complete-option-template-url="'app/search/template/typeahead_criteria_item.html'"
tag-complete-tag-template-url="'app/search/template/criteria_tag_item.html'"
tag-complete-loading="loadingCriteria = isLoading"
tag-complete-on-select="addCriteria(tag)"
placeholder="Search Boards">
</div>
<span class="form-control-feedback text-muted">
<i class="fa fa-search"
ng-hide="loadingCriteria"></i>
<i class="fa fa-sync fa-spin"
ng-show="loadingCriteria"></i>
</span>
<result-set-pager
class="form-control-static text-muted pull-right"
total="searchTotal"
offset="searchOffset"
limit="searchLimit"
on-next-page="nextPage()"
on-previous-page="previousPage()"
on-page-size="updatePageSize(pageSize)"
></result-set-pager>
</div>
</tbody>
<tbody ng-show="searchResults.length == 0">
<td colspan="3" class="text-center text-muted">
<em>
No boards found.
</em>
</td>
</tbody>
<tbody ng-show="isSearching">
<td colspan="3" class="text-center">
<i class="fa fa-sync fa-spin fa-lg"></i>
</td>
</tbody>
</table>
</div>
</div>