-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#12 Display custom field form in case details page
- Loading branch information
Showing
8 changed files
with
261 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="modal-header bg-primary"> | ||
<h3 class="modal-title">Add custom field to Case #{{caze.caseId}}</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="vpad20"> | ||
You are about to add the <strong uib-tooltip="{{data.description}}">{{data.label}}</strong> custom field to the case <strong>#{{caze.caseId}}: {{caze.title}}</strong> | ||
<br/> | ||
<br/> | ||
Are you sure you want to continue ? | ||
</div> | ||
</div> | ||
<div class="modal-footer text-left"> | ||
<button class="btn btn-default" ng-click="cancel()" type="button">Cancel</button> | ||
<button class="btn btn-primary pull-right" type="button" ng-click="confirm()">Confirm</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="modal-header bg-primary"> | ||
<h3 class="modal-title">Add metric to Case #{{caze.caseId}}</h3> | ||
</div> | ||
<div class="modal-body"> | ||
<div class="vpad20"> | ||
You are about to add the <strong uib-tooltip="{{metric.description}}">{{data.title}}</strong> metric to the case <strong>#{{caze.caseId}}: {{caze.title}}</strong> | ||
<br/> | ||
<br/> | ||
Are you sure you want to continue ? | ||
</div> | ||
</div> | ||
<div class="modal-footer text-left"> | ||
<button class="btn btn-default" ng-click="cancel()" type="button">Cancel</button> | ||
<button class="btn btn-primary pull-right" type="button" ng-click="confirm()">Confirm</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<div class="case-custom-fields" ng-controller="CaseCustomFieldsCtrl"> | ||
<h4 class="vpad10 text-primary"> | ||
Custom fields | ||
<span uib-dropdown class="pull-right" ng-show="customFieldsAvailable"> | ||
<a href class="dropdown-toggle" uib-dropdown-toggle> | ||
<i class="fa fa-plus"></i> | ||
Add Custom field | ||
<span class="caret"></span> | ||
</a> | ||
<ul class="dropdown-menu" uib-dropdown-menu> | ||
<li ng-repeat="(key, value) in allCustomFields"> | ||
<a ng-click="addCustomField(value)">{{value.label}}</a> | ||
</li> | ||
</ul> | ||
</span> | ||
</h4> | ||
|
||
<div ng-if="!orderedFields || orderedFields.length === 0"> | ||
<em>No custom fields need to be set</em> | ||
</div> | ||
|
||
<dl class="dl-horizontal clear" | ||
ng-repeat="k in orderedFields" | ||
ng-init="fieldDef = customFieldsCache[k]; customFieldValue=caze.customFields[fieldDef.name][fieldDef.type];"> | ||
<dt class="pull-left" uib-tooltip="{{fieldDef.description}}">{{fieldDef.label}}</dt> | ||
<dd ng-switch="fieldDef.type"> | ||
<updatable-simple-text ng-switch-when="string" | ||
input-type="text" | ||
on-update="updateField(getCustomFieldName(fieldDef), newValue)" | ||
value="customFieldValue"></updatable-simple-text> | ||
|
||
<updatable-date ng-switch-when="date" | ||
on-update="updateField(getCustomFieldName(fieldDef), newValue)" | ||
value="customFieldValue"></updatable-date> | ||
|
||
<updatable-simple-text ng-switch-when="number" | ||
input-type="number" | ||
on-update="updateField(getCustomFieldName(fieldDef), newValue)" | ||
value="customFieldValue"></updatable-simple-text> | ||
|
||
<span ng-switch-default>Not Editable</span> | ||
</dd> | ||
</dl> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<div class="case-metrics"> | ||
<h4 class="vpad10 text-primary"> | ||
Metrics | ||
<span uib-dropdown class="pull-right" ng-show="metricsAvailable"> | ||
<a href class="dropdown-toggle" uib-dropdown-toggle> | ||
<i class="fa fa-plus"></i> | ||
Add metric | ||
<span class="caret"></span> | ||
</a> | ||
<ul class="dropdown-menu" uib-dropdown-menu> | ||
<li ng-repeat="(key, value) in allMetrics"> | ||
<a ng-click="addMetric(value)">{{value.title}}</a> | ||
</li> | ||
</ul> | ||
</span> | ||
</h4> | ||
|
||
<div ng-if="hasNoMetrics(caze)"> | ||
<em>No metrics need to be set</em> | ||
</div> | ||
|
||
<dl class="dl-horizontal clear" ng-repeat="(k,v) in caze.metrics"> | ||
<dt class="pull-left" uib-tooltip="{{metricsCache[k].description}}">{{metricsCache[k].title}}</dt> | ||
<dd> | ||
<updatable-simple-text input-type="number" on-update="updateField('metrics.' + k, newValue)" value="caze.metrics[k]"></updatable-simple-text> | ||
</dd> | ||
</dl> | ||
</div> |
Oops, something went wrong.