zettapi_client
Version:
Admin panel and client-side CRUD operations in angular to use with zettapi_server rest api to get started quickly in any CMS project.
65 lines (62 loc) • 1.91 kB
HTML
<div class="col-sm-12">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label>Nome</label>
<input type="text" ng-model="item.name" class="form-control input-lg">
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label>Descrição</label>
<textarea rows="3" ng-model="item.description" class="form-control"></textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<input type="checkbox" ng-model="item.is_core" class="w3-check">
<label class="w3-validate">Módulo Principal</label>
</div>
</div>
<div class="row">
<div class="col-sm-12 table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>Escalão</th>
<th>Preço</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="price in (item.price | orderBy: 'index') track by $index">
<td>{{price.index}}</td>
<td>
<div class="input-group">
<input type="number" ng-model="price.value" class="form-control">
<span class="input-group-addon">€</span>
</div>
</td>
<td class="text-right">
<button ng-if="$index === item.price.length - 1" ng-click="removePrice(item)" class="btn btn-danger">
<i class="fa fa-trash"></i>
</button>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">
<button ng-click="appendPrice(item)" class="btn btn-xs btn-info">
<i class="fa fa-plus"></i> Adicionar escalão
</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>