community-app/app/views/system/viewcode.html
Safiyu 009f42c514 fixed issue #515 & #514
loan product
2013-12-06 15:29:28 +05:30

75 lines
4.3 KiB
HTML

<div ng-controller="ViewCodeController">
<div class="paddedbottom10">
<ul class="breadcrumb">
<li><a href="#/system">{{'label.anchor.system' | translate}}</a> <span class="divider">/</span></li>
<li><a href="#/codes">{{'label.anchor.managecodes' | translate}}</a> <span class="divider">/</span></li>
<li class="active">{{code.name}}</li>
</ul>
</div>
<api-validate></api-validate>
<div class="row">
<div class="pull-right">
<div class="btn-group">
<button type="button" data-ng-click="showEditCode()" class="btn btn-primary"><i class="icon-edit icon-white"></i>{{'label.button.editcode' | translate}}</button>
<a href="#/editcode/{{code.id}}" class="btn btn-primary"><i class="icon-plus icon-white"></i>{{'label.button.addcodevalues' | translate}}</a>
<a data-ng-click="delCode()" class="btn btn-warning" ng-show="code.systemDefined == false"><i class="icon-trash icon-white"></i>{{'label.button.delete' | translate}}</a>
</div>
</div>
</div>
<script type="text/ng-template" id="deletecode.html">
<div class="modal-header silver">
<h3 class="bolder">{{'label.heading.delete' | translate}}</h3>
</div>
<div class="modal-body ">
<button class="btn btn-warning" ng-click="cancel()">{{'label.button.cancel' | translate}}</button>
<button class="btn btn-primary" ng-click="delete()">{{'label.button.confirm' | translate}}</button>
</div>
</script>
<script type="text/ng-template" id="deletecodevalue.html">
<div class="modal-header silver">
<h3 class="bolder">{{'label.heading.delete' | translate}}</h3>
</div>
<div class="modal-body ">
<button class="btn btn-warning" ng-click="cancel()">{{'label.button.cancel' | translate}}</button>
<button class="btn btn-primary" ng-click="delete()">{{'label.button.confirm' | translate}}</button>
</div>
</script>
<div class="form-horizontal well">
<h3 data-ng-hide="newcode.edit">{{code.name}}</h3>
<div data-ng-show="newcode.edit">
<input type="text" data-ng-model="codename.name">
<button type="button" class="btn" data-ng-click="showEditCode(1)">{{'label.button.cancel' | translate}}</button>
<button type="button" class="btn btn-primary" data-ng-click="updateCode()">{{'label.button.save' | translate}}</button>
<hr/>
</div>
<div>
<table class="table" ui:sortable>
<thead>
<tr>
<th>{{ 'label.heading.name' | translate }}</th>
<th>{{ 'label.heading.position' | translate }}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="codevalue in codevalues">
<td>
<span data-ng-hide="codevalue.edit">{{codevalue.name}}</span>
<input data-ng-show="codevalue.edit" name="codevalue" ng-model="formData[codevalue.id].name" type="text"/>
</td>
<td>
<span data-ng-hide="codevalue.edit">{{codevalue.position}}</span>
<input data-ng-show="codevalue.edit" name="position" ng-model="formData[codevalue.id].position" type="text"/>
</td>
<td>
<button data-ng-hide="codevalue.edit" class="btn-primary" type="button" data-ng-click="showEdit(codevalue.id,codevalue.name,codevalue.position,codevalue)"><i class="icon-edit icon-white"></i></button>
<button data-ng-show="codevalue.edit" class="btn-primary" type="button" data-ng-click="editCodeValue(codevalue.id,codevalue)">{{'label.button.save' | translate}}</button>
<button data-ng-hide="codevalue.edit" class="btn-warning" type="button" data-ng-click="deleteCodeValue(codevalue.id)"><i class="icon-trash icon-white"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>