56 lines
2.5 KiB
Plaintext
56 lines
2.5 KiB
Plaintext
|
||
<style type="text/css">
|
||
.noteTable {
|
||
width:95% !important;
|
||
}
|
||
</style>
|
||
<div id="NoteList{{ParentId}}" >
|
||
<table class="table noteTable" id="table" ng-show="Notes.length > 0">
|
||
<tr class="headrow">
|
||
<th class="headcol">Note:</th>
|
||
<th class="headcol">Created by</th>
|
||
<th class="headcol">Date</th>
|
||
<th></th>
|
||
</tr>
|
||
|
||
<tr ng-repeat="note in Notes track by $index">
|
||
<td class="headcol">
|
||
<div class="grid-actions-div">
|
||
<a href="#" ng-click="openNoteModal(note)" data-toggle="modal" data-target="#ViewNote{{ParentId}}" title="view note" >{{note.Title}}</a>
|
||
</div>
|
||
</td>
|
||
<td class="headcol">
|
||
{{note.CreatedBy}}
|
||
</td>
|
||
<td class="headcol">
|
||
{{note.DateAdded}}
|
||
</td>
|
||
<td>
|
||
<button type="button" title="Remove this note" class="btn btn-danger btn-xs" ng-disabled="(UserName!=note.CreatedBy && !SuperUser)" ng-click="DeleteNote(note,'editNote')"><i class="fa fa-trash-o"></i></button>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<a id="btnAddNote" class="btn btn-primary" ng-click="openNoteModal()" data-toggle="modal" data-target="#ViewNote{{ParentId}}"><i class="fa fa-plus"></i> Add Note</a>
|
||
</div>
|
||
<div id="ViewNote{{ParentId}}" class="modal fade" tabindex="-1" role="dialog" style="display: none;" data-backdrop="static">
|
||
<form name="notesForm">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h4 class="modal-title">Add a Note</h4>
|
||
</div>
|
||
<div class="form-group">
|
||
|
||
@Html.Partial("~/Views/Note/_edit.cshtml")
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="submit" ng-hide="(Note.CreatedBy && UserName!=Note.CreatedBy && !SuperUser )" ng-disabled="(Note.Details.length == 0 || Note.Title.length == 0)" ng-click="AddNote('ViewNote')" class="btn btn-primary" id="btnSaveNote">Save</button>
|
||
<button type="button" class="btn btn-default" ng-click="Reset()" data-dismiss="modal">Cancel</button>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</form>
|
||
</div>
|