facilmap/frontend/app/table/table.html

44 wiersze
2.5 KiB
HTML
Czysty Zwykły widok Historia

<div class="modal-header">
<button class="close" ng-click="$dismiss()"><span aria-hidden="true">&times;</span></button>
<h3 class="modal-title">Table</h3>
</div>
<div class="modal-body">
<h2 ng-repeat-start="type in types">{{type.name}}</h2>
<table ng-if="type.type == 'marker'" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th class="sort" ng-click="sort(type, '__name')" ng-class="getSortClass(type, '__name')">Name <span ng-class="getSortIcon(type, '__name')"></span></th>
<th>Position</th>
<th class="sort" ng-repeat="field in type.fields" ng-click="sort(type, field.name)" ng-class="getSortClass(type, field.name)">{{field.name}} <span ng-class="getSortIcon(type, field.name)"></span></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="marker in markers | fpType:type.id | orderBy : getSortField(type) : sortOrder[type.id]">
<td>{{marker.name}}</td>
<td>{{marker.lat}},{{marker.lon}}</td>
<td ng-repeat="field in type.fields" fp-type-field-content="field" fp-type-field-model="marker.data[field.name]"></td>
</tr>
</tbody>
</table>
<table ng-repeat-end ng-if="type.type == 'line'" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th class="sort" ng-click="sort(type, '__name')" ng-class="getSortClass(type, '__name')">Name <span ng-class="getSortIcon(type, '__name')"></span></th>
<th class="sort" ng-click="sort(type, '__distance')" ng-class="getSortClass(type, '__distance')">Distance <span ng-class="getSortIcon(type, '__distance')"></span></th>
<th class="sort" ng-click="sort(type, '__time')" ng-class="getSortClass(type, '__time')">Time <span ng-class="getSortIcon(type, '__time')"></span></th>
<th class="sort" ng-repeat="field in type.fields" ng-class="getSortClass(type, field.name)" ng-click="sort(type, field.name)">{{field.name}} <span ng-class="getSortIcon(type, field.name)"></span></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="line in lines | fpType:type.id | orderBy : getSortField(type) : sortOrder[type.id]">
<td>{{line.name}}</td>
<td>{{round(line.distance, 2)}} km</td>
<td><span ng-show="line.time != null">{{formatTime(line.time)}} h ({{routingMode(line.mode)}})</span></td>
<td ng-repeat="field in type.fields" fp-type-field-content="field" fp-type-field-model="line.data[field.name]"></td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="$dismiss()">Close</button>
</div>