Created
June 19, 2018 11:07
-
-
Save Sampath-Lokuge/a10c1bc83f78e1e88eaa90e37b181a14 to your computer and use it in GitHub Desktop.
commentForm.cshtml
This file contains hidden or 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
@using IP.Comments | |
@*Comment Form*@ | |
<div ng-controller="tenant.views.propertymanagement.tabs.commentForm as commentFormCtrl"> | |
<div style="overflow: auto;"> | |
<div class="comment-form-wrapper"> | |
<table class="table table-bordered table-hover table-condensed fixed-size"> | |
<tr style="font-weight: bold"> | |
<td style="width: 12.5%">@L("CsDate")</td> | |
<td style="width: 10%">@L("CsTo")</td> | |
<td style="width: 13%">@L("CsDescription")</td> | |
<td style="width: 5%">@L("CsContact")</td> | |
<td style="width: 38%">@L("CsNote")</td> | |
<td style="width: 5.5%">@L("Edit")</td> | |
<td style="width: 16%"></td> | |
</tr> | |
<tr ng-repeat="comment in commentFormCtrl.comments track by $index"> | |
<td> | |
<span ng-if="!comment.isEmailSent" editable-bsdate="comment.date" e-datepicker-popup="MM-dd-yyyy" e-ng-click="commentFormCtrl.open($event,'$data')" e-is-open="commentFormCtrl.opened.$data" e-name="date" e-form="commentForm" onbeforesave="commentFormCtrl.checkValidity($data)" e-required> | |
{{ comment.date | date:'MM-dd-yyyy' }} | |
</span> | |
<span ng-if="comment.isEmailSent" editable-bsdate="comment.date" e-datepicker-popup="MM-dd-yyyy" style="color: white; background-color: green" e-ng-click="commentFormCtrl.open($event,'$data')" e-is-open="commentFormCtrl.opened.$data" e-name="date" e-form="commentForm" onbeforesave="commentFormCtrl.checkValidity($data)" e-required> | |
{{ comment.date | date:'MM-dd-yyyy' }} | |
</span> | |
</td> | |
<td> | |
<span editable-text="comment.toNote" e-name="toNote" e-form="commentForm" e-maxlength="@Comment.MaxLength"> | |
{{ comment.toNote || 'empty' }} | |
</span> | |
</td> | |
<td> | |
<span editable-text="comment.statusName" e-name="statusName" e-form="commentForm" e-uib-typeahead="a.name as a.name for a in commentFormCtrl.statuses | filter:$viewValue" onbeforesave="commentFormCtrl.checkValidity($data)" e-required> | |
{{comment.statusName}} | |
</span> | |
</td> | |
<td> | |
<span editable-text="comment.propertyStatusContactName" e-name="propertyStatusContactName" e-form="commentForm" e-uib-typeahead="a.name as a.name for a in commentFormCtrl.propertyStatusContacts | filter:$viewValue" onbeforesave="commentFormCtrl.checkValidity($data)"> | |
{{comment.propertyStatusContactName}} | |
</span> | |
</td> | |
<td> | |
<a ng-if="comment.note.length>0" href="" ng-click="commentFormCtrl.note(comment,commentForm)">{{comment.note | limitTo: 70 }}{{comment.note.length > 70 ? ' ...' : ''}}</a> | |
<a ng-if="comment.note.length==0" href="" ng-click="commentFormCtrl.note(comment,commentForm)">Note</a> | |
<br /> | |
</td> | |
<td style="white-space: nowrap"> | |
<!-- form --> | |
<form editable-form name="commentForm" onbeforesave="commentFormCtrl.saveComment($data, comment, commentForm)" ng-show="commentForm.$visible" class="form-buttons form-inline" shown="commentFormCtrl.comment == comment"> | |
<button type="submit" ng-disabled="commentForm.$waiting" class="btn btn-primary btn-extra-small"> | |
save | |
</button> | |
</form> | |
<div class="buttons" ng-show="!commentForm.$visible"> | |
<button class="btn btn-primary btn-extra-small margin-left-0 margin-right-0" ng-click="commentForm.$show()">edit</button> | |
</div> | |
</td> | |
<td> | |
<div class="buttons"> | |
<button ng-show="!commentForm.$visible" class="btn btn-info btn-extra-small margin-left-0 margin-right-0" ng-click="commentFormCtrl.composeEmail(comment)">@L("CsEmail")</button> | |
<button ng-show="!commentForm.$visible" class="btn btn-info btn-extra-small margin-left-0 margin-right-0" ng-click="commentFormCtrl.task(comment)">@L("CsTask")</button> | |
<button ng-show="commentForm.$visible" type="button" ng-disabled="commentForm.$waiting" ng-click="commentFormCtrl.cancelComment(commentForm,$index,comment)" class="btn btn-default btn-extra-small"> | |
cancel | |
</button> | |
</div> | |
</td> | |
</tr> | |
</table> | |
</div> | |
<button class="btn btn-primary" ng-click="commentFormCtrl.addComment()">Add</button> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment