2015-04-05 22:16:11 +02:00
|
|
|
<!-- show the list of Persons -->
|
2015-03-22 17:08:25 +01:00
|
|
|
<div class="container">
|
2015-04-21 19:58:28 +02:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-7 col-xs-7 vcenter">
|
|
|
|
<h1>{{'Persons' | translate}}
|
|
|
|
<button ng-click="$state.go('person.new')" class="btn btn-success">
|
2015-05-04 23:09:34 +02:00
|
|
|
<span class="fa fa-plus-circle vcenter"></span>
|
2015-04-21 19:58:28 +02:00
|
|
|
{{'Add person' | translate}}
|
|
|
|
</button>
|
|
|
|
<button ng-click="$state.go('import.persons')" class="btn btn-success">
|
2015-05-04 23:09:34 +02:00
|
|
|
<span class="fa fa-download vcenter"></span>
|
2015-04-21 19:58:28 +02:00
|
|
|
{{'Import persons' | translate}}
|
|
|
|
</button>
|
|
|
|
</h1>
|
|
|
|
</div><!--
|
|
|
|
--><div class="col-md-5 col-xs-5 vcenter">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h2><div class="label label-info vcenter">{{'Persons:' | translate}} {{persons.length || 0}}</div></h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-04-05 18:54:51 +02:00
|
|
|
<div class="panel panel-primary table-striped top5">
|
|
|
|
<div class="panel-heading">{{'Persons' | translate}}</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<form class="form-inline">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="query-persons">{{'Search:' | translate}}</label>
|
2016-04-17 12:59:51 +02:00
|
|
|
<input eventman-focus type="text" id="query-persons" class="form-control" placeholder="{{'Name or email' | translate}}" ng-model="query" ng-model-options="{debounce: 600}">
|
2015-04-05 18:54:51 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
2015-03-14 17:32:16 +01:00
|
|
|
|
2015-05-03 17:33:52 +02:00
|
|
|
<div ng-include=" 'modal-confirm-action.html' " class="hidden"></div>
|
2015-04-05 18:54:51 +02:00
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2016-04-17 16:52:45 +02:00
|
|
|
<th class="text-right nowrap">#</th>
|
|
|
|
<th class="nowrap">{{'Person' | translate}} <a ng-click="updateOrded('name')" href=""><i class="fa fa-caret-up"></i></a>{{'Name' | translate}}<a ng-click="updateOrded('-name')" href=""><i class="fa fa-caret-down"></i></a> <a ng-click="updateOrded('surname')" href=""><i class="fa fa-caret-up"></i></a>{{'Surname' | translate}}<a ng-click="updateOrded('-surname')" href=""><i class="fa fa-caret-down"></i></a></th>
|
|
|
|
<th ng-repeat="col in customFields" class="text-center nowrap">
|
2015-05-02 09:58:53 +02:00
|
|
|
<a ng-click="updateOrded(col.key)" href=""><i class="fa fa-caret-up"></i></a>{{col.label | translate}}<a ng-click="updateOrded('-' + col.key)" href=""><i class="fa fa-caret-down"></i></a>
|
2015-04-19 21:52:41 +02:00
|
|
|
</th>
|
2016-04-17 16:52:45 +02:00
|
|
|
<th class="text-center nowrap"><strong>{{'Delete' | translate}}</strong></th>
|
2015-04-05 18:54:51 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2015-05-02 09:58:53 +02:00
|
|
|
<tr ng-repeat="person in persons | splittedFilter:query | orderBy:personsOrder">
|
|
|
|
<td class="text-right">{{$index+1}}</td>
|
2015-04-05 18:54:51 +02:00
|
|
|
<td>
|
2015-04-12 21:11:14 +02:00
|
|
|
<span><strong><a ui-sref="person.info({id: person._id})"><span>{{person.name}}</span> <span>{{person.surname}}</span></a></strong></span><span ng-if="person.email"> <{{person.email}}></span>
|
2015-04-25 10:06:35 +02:00
|
|
|
<p ng-if="person.company || person.job_title"><i ng-if="person.job_title">{{person.job_title}}</i><span ng-if="person.company && person.job_title"> @ </span><i ng-if="person.company">{{person.company}}</i></p>
|
2015-04-05 18:54:51 +02:00
|
|
|
</td>
|
2015-05-02 09:58:53 +02:00
|
|
|
<td ng-repeat="col in customFields" class="text-center">
|
2015-04-18 17:33:42 +02:00
|
|
|
<span ng-if="col.type == 'boolean'">
|
2015-05-04 23:09:34 +02:00
|
|
|
<button class="btn btn-link" ng-click="setAttribute(person, col.key, !person[col.key])"><span class="fa fa-lg {{(person[col.key]) && 'fa-check-circle text-success' || 'fa-times-circle text-danger'}}"></span></button>
|
2015-04-18 17:33:42 +02:00
|
|
|
</span>
|
|
|
|
<span ng-if="col.type != 'boolean'">
|
|
|
|
{{person[col.key]}}
|
|
|
|
</span>
|
|
|
|
</td>
|
2015-05-02 09:58:53 +02:00
|
|
|
<td class="text-center">
|
2015-05-04 23:09:34 +02:00
|
|
|
<button ng-click="remove(person._id)" type="button" class="btn btn-link fa fa-trash fa-lg"></button>
|
2015-04-05 18:54:51 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-03-22 17:08:25 +01:00
|
|
|
</div>
|