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

121 lines
4.7 KiB
HTML

<!--
~ Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
~
~ 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"
ng-controller="SearchCriteriaController"
ng-init="init(resourceTypes, defaultCriteria)"
search-results
search-resource="Project"
search-criteria="criteria"
search-without-criteria="true">
<div class="row">
<div class="col-xs-12">
<view-title>Projects</view-title>
<a class="btn btn-primary btn-sm pull-bottom-right"
permission="is_superuser"
href ng-click="addProject()">
<i class="fa fa-plus"></i>
<span class="hidden-xs">Create Project</span>
</a>
<h1 class="no-border no-margin-bottom">
<i class="fa fa-sb-project"></i> Projects
</h1>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<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 Projects"
autocomplete="off">
</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>
</div>
</div>
<div class="row"
ng-if="!hasValidCriteria">
<div class="col-xs-12 text-muted text-center">
<em>What would you like to search by?</em>
</div>
</div>
<div class="row"
ng-if="hasValidCriteria">
<div class="col-xs-12">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>
<a href="" ng-click="toggleFilter('name')">
Project
<i class="fa fa-caret-down"
ng-if="sortField == 'name' && sortDirection == 'desc'">
</i>
<i class="fa fa-caret-up"
ng-if="sortField == 'name' && sortDirection == 'asc'">
</i>
</a>
</th>
<th></th>
</tr>
</thead>
<tbody ng-if="searchResults.length != 0 && !isSearching">
<tr ng-repeat="project in searchResults"
ng-include="'app/search/template/project_search_item.html'">
</tr>
</tbody>
<tbody ng-if="searchResults.length == 0 && !isSearching">
<td class="text-center text-muted" colspan="2">
<em>No projects found.</em>
</td>
</tbody>
<tbody ng-if="isSearching">
<td colspan="2" class="text-center">
<small class="fa fa-spin fa-lg fa-sync text-muted">
</small>
</td>
</tbody>
</table>
</div>
</div>
</div>