mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-26 08:58:06 +02:00
Can access entities in SK, begun new admin page
This commit is contained in:
parent
06fec5daf7
commit
4978eeb828
8 changed files with 189 additions and 191 deletions
|
@ -1,51 +1,34 @@
|
|||
<div ng-if="!$ctrl.catmap">
|
||||
<div ng-if="$ctrl.categoryDefinitions === null">
|
||||
Loading...
|
||||
</div>
|
||||
<form ng-if="$ctrl.catmap" crm-ui-id-scope>
|
||||
<form ng-if="$ctrl.categoryDefinitions" crm-ui-id-scope>
|
||||
|
||||
<button ng-click="$ctrl.catmap.unshift({groupID: '', name:''})">
|
||||
<i class="crm-i fa-plus"></i> Add category
|
||||
</button>
|
||||
|
||||
<!-- I can see use of
|
||||
presentation order/grouping
|
||||
short title, "amazing"
|
||||
longer title/description. "regular givers who..."
|
||||
-->
|
||||
|
||||
<ol class="crm-catmap">
|
||||
<li ng-repeat="(idx, row) in $ctrl.catmap">
|
||||
<div class="group-input-wrapper">
|
||||
<select
|
||||
ng-if="row.groupID === '' || row.groupID > 0"
|
||||
crm-ui-select="{placeholder:'Select group',allowClear:false,label:'Group'}"
|
||||
ng-model="$ctrl.catmap[idx].groupID"
|
||||
style="width: 18rem"
|
||||
>
|
||||
<option
|
||||
ng-repeat="(grpIdx, grp) in $ctrl.getGroupsFor(idx)"
|
||||
value="{{grp.id}}"
|
||||
>{{grp.title}}</option
|
||||
>
|
||||
</select>
|
||||
</div>
|
||||
<div
|
||||
ng-if="row.groupID !== '' && row.groupID == 0"
|
||||
style="width: 18rem;display: inline-block;"
|
||||
>
|
||||
Default
|
||||
</div>
|
||||
<div class="name-input-wrapper">
|
||||
<label crm-ui-for="name{{idx}}">Label</label>
|
||||
<input
|
||||
crm-ui-id="name{{idx}}"
|
||||
type="text"
|
||||
ng-model="$ctrl.catmap[idx].name"
|
||||
ng-keydown="$ctrl.nameKeydown($event, idx)"
|
||||
/>
|
||||
<div class="hint description">
|
||||
{{ts('Use the Up/Down arrow keys to re-order')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<li ng-repeat="(idx, row) in $ctrl.categoryDefinitions">
|
||||
|
||||
<span style="color: {{row.color ? '#' + row.color : 'inherit'}};" >
|
||||
<i ng-if="row.icon" class="crm-i {{row.icon}}" ></i>
|
||||
{{row.label}}
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<button ng-click="$ctrl.deleteRow(idx)">
|
||||
<i class="fa-trash crm-i"></i> Delete
|
||||
</button>
|
||||
</div>
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
<button ng-click="$ctrl.save()"><i class="crm-i fa-save"></i> Save</button>
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue