69 baris
4,2 KiB
HTML
69 baris
4,2 KiB
HTML
<!-- show the list of Persons -->
|
|
<div class="container">
|
|
<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">
|
|
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
{{'Add person' | translate}}
|
|
</button>
|
|
<button ng-click="$state.go('import.persons')" class="btn btn-success">
|
|
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
{{'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>
|
|
<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>
|
|
<input eventman-focus type="text" id="query-persons" class="form-control" placeholder="{{'Name or email' | translate}}" ng-model="query">
|
|
</div>
|
|
</form>
|
|
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-right">#</th>
|
|
<th>{{'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">
|
|
<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>
|
|
</th>
|
|
<th class="text-center"><strong>{{'Delete' | translate}}</strong></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="person in persons | splittedFilter:query | orderBy:personsOrder">
|
|
<td class="text-right">{{$index+1}}</td>
|
|
<td>
|
|
<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>
|
|
<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>
|
|
</td>
|
|
<td ng-repeat="col in customFields" class="text-center">
|
|
<span ng-if="col.type == 'boolean'">
|
|
<button class="btn btn-link" ng-click="setAttribute(person, col.key, !person[col.key])"><span class="glyphicon {{(person[col.key]) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
|
|
</span>
|
|
<span ng-if="col.type != 'boolean'">
|
|
{{person[col.key]}}
|
|
</span>
|
|
</td>
|
|
<td class="text-center">
|
|
<button ng-click="remove(person._id)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|