storyboard-webclient/src/app/stories/template/task_notes.html

69 lines
2.7 KiB
HTML

<!--
~ Copyright (c) 2016 Codethink Limited
~
~ Licensed under the Apache License, Version 2.0 (the "License"); you may
~ not use this file except in compliance with the License. You may obtain
~ a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
~ License for the specific language governing permissions and limitations
~ under the License.
-->
<div class="panel panel-default card-modal">
<div class="panel-heading clearfix">
<button type="button" class="close" aria-hidden="true"
ng-click="close()">&times;
</button>
<h3 class="panel-title">Notes on {{task.title}}</h3>
</div>
<div class="panel-body">
<div ng-show="!isLoggedIn || !editing || preview">
<insert-markdown content="task.link"></insert-markdown>
</div>
<button type="button" ng-show="isLoggedIn && !editing"
class="btn btn-primary pull-right"
ng-click="editing = !editing">
<i class="fa fa-pencil"></i> Edit
</button>
<form name="taskNotesForm" ng-show="editing">
<div class="form-group">
<textarea placeholder="Enter task notes here"
class="form-control context-edit"
msd-elastic
rows="3"
ng-show="isLoggedIn"
ng-disabled="isUpdating"
ng-model="task.link">
</textarea>
</div>
<div class="clearfix">
<button type="button" ng-show="isLoggedIn"
class="btn btn-default" ng-click="preview = !preview">
Toggle Preview
</button>
<div class="pull-right">
<div class="btn" ng-show="isUpdating">
<i class="fa fa-spinner fa-lg fa-spin"></i>
</div>
<button type="button" ng-show="isLoggedIn"
class="btn btn-primary"
ng-click="update()"
ng-disabled="!taskNotesForm.$valid">
Save
</button>
<button type="button" ng-show="isLoggedIn"
class="btn btn-default"
ng-click="cancel()">
Cancel
</button>
</div>
</div>
</form>
<div>
</div>