142 lines
6.7 KiB
Handlebars
142 lines
6.7 KiB
Handlebars
{{#main-content}}
|
|
<div class="widget-box transparent">
|
|
{{#if ajax.user.admin}}
|
|
{{#grid-header}}
|
|
<li>
|
|
{{#link-to 'customer-application.create'}}
|
|
<i class="ace-icon fa fa-plus-circle bigger-110 green"></i>
|
|
Create Customer Application
|
|
{{/link-to}}
|
|
</li>
|
|
{{/grid-header}}
|
|
{{else}}
|
|
{{grid-header}}
|
|
{{/if}}
|
|
|
|
<div class="widget-body">
|
|
<!-- #section:custom/scrollbar -->
|
|
<div class="widget-main no-padding table-responsive no-border">
|
|
<table class="table table-striped table-bordered table-hover dataTable" style="border: 1px solid #ddd;">
|
|
<thead class="thin-border-bottom">
|
|
<tr>
|
|
<th>
|
|
{{th-filter name='namePrefix'
|
|
text='Name'
|
|
label='Name Filter'
|
|
options=model.namePrefixes
|
|
value-field='value'
|
|
text-field='text'
|
|
}}
|
|
</th>
|
|
<th>
|
|
<i class="ace-icon fa fa-sticky-note-o bigger-110 hidden-480"></i>
|
|
Remark
|
|
</th>
|
|
<th>
|
|
<i class="ace-icon fa fa-id-badge bigger-110 hidden-480"></i>
|
|
{{th-filter name='owner'
|
|
text='Owner'
|
|
label='Owner Filter'
|
|
options=model.users
|
|
value-field='id'
|
|
text-field='name'
|
|
text-exp='$.employeeId ($.name)'
|
|
}}
|
|
</th>
|
|
{{#if model.adminOrOwner}}
|
|
<th>
|
|
<i class="ace-icon fa fa-exchange bigger-110 hidden-480"></i>
|
|
Enabled
|
|
</th>
|
|
<th style="min-width: 114px">
|
|
<i class="ace-icon fa fa-cogs bigger-110 hidden-480"></i>
|
|
Settings
|
|
</th>
|
|
{{/if}}
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{{#each model.data as |it|}}
|
|
{{#if (or it.enabled (or ajax.user.admin (eq ajax.user.id it.owner)))}}
|
|
<tr>
|
|
<td>
|
|
{{customer-application/preview-btn model=it}}
|
|
</td>
|
|
<td>
|
|
{{#if (or ajax.user.admin (eq ajax.user.id it.owner))}}
|
|
{{editable-cell model=it field='note'}}
|
|
{{else}}
|
|
{{it.note}}
|
|
{{/if}}
|
|
</td>
|
|
<td>
|
|
{{option-text model.users it.owner 'id' 'name' '$.employeeId ($.name)'}}
|
|
</td>
|
|
{{#if model.adminOrOwner}}
|
|
<td>
|
|
{{#if (or ajax.user.admin (eq ajax.user.id it.owner))}}
|
|
{{status-cell model=it enabledText='TRUE' disabledText='FALSE'}}
|
|
{{/if}}
|
|
</td>
|
|
<td>
|
|
<div class="hidden-sm hidden-xs btn-group">
|
|
{{#if ajax.user.admin}}
|
|
{{status-toggle-button model=it}}
|
|
{{/if}}
|
|
|
|
{{#if (or ajax.user.admin (eq ajax.user.id it.owner))}}
|
|
{{#link-to 'customer-application.edit' it.id class='btn btn-xs btn-info' data-rel='tooltip' title='Edit'}}
|
|
<i class="ace-icon fa fa-pencil bigger-120"></i>
|
|
{{/link-to}}
|
|
{{/if}}
|
|
|
|
{{#if ajax.user.admin}}
|
|
{{#unless it.enabled}}
|
|
{{delete-btn model=it}}
|
|
{{/unless}}
|
|
{{/if}}
|
|
</div>
|
|
<div class="hidden-md hidden-lg">
|
|
<div class="inline pos-rel">
|
|
<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
|
|
<i class="ace-icon fa fa-cog icon-only bigger-110"></i>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
|
|
{{#if ajax.user.admin}}
|
|
<li>
|
|
{{status-toggle-button model=it iconOnly=true}}
|
|
</li>
|
|
{{/if}}
|
|
{{#if (or ajax.user.admin (eq ajax.user.id it.owner))}}
|
|
<li>
|
|
{{#link-to 'customer-application.edit' it.id class='tooltip-info' data-rel='tooltip' title='Edit'}}
|
|
<span class="blue">
|
|
<i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
|
|
</span>
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
{{#if ajax.user.admin}}
|
|
{{#unless it.enabled}}
|
|
<li>
|
|
{{delete-btn model=it icon-only=true}}
|
|
</li>
|
|
{{/unless}}
|
|
{{/if}}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
{{/if}}
|
|
</tr>
|
|
{{/if}}
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{pagination-bar}}
|
|
</div>
|
|
</div>
|
|
{{/main-content}}
|