notifications: move vars/functions up a level

This commit is contained in:
Girish Ramakrishnan
2021-05-29 16:06:41 -07:00
parent 5aa6e18ea7
commit e001a21e4b
2 changed files with 55 additions and 57 deletions

View File

@@ -1,14 +1,14 @@
<div class="content">
<div class="text-left">
<h1>{{ 'notifications.title' | tr }} <button class="btn btn-primary btn-outline pull-right" ng-click="notifications.clearAll()" ng-disabled="clearAllBusy"><i class="fa fa-circle-notch fa-spin" ng-show="clearAllBusy"></i><i class="fa fa-check" ng-hide="clearAllBusy"></i> {{ 'notifications.clearAll' | tr }}</button></h1>
<h1>{{ 'notifications.title' | tr }} <button class="btn btn-primary btn-outline pull-right" ng-click="clearAll()" ng-disabled="clearAllBusy"><i class="fa fa-circle-notch fa-spin" ng-show="clearAllBusy"></i><i class="fa fa-check" ng-hide="clearAllBusy"></i> {{ 'notifications.clearAll' | tr }}</button></h1>
</div>
<div class="col-lg-12 text-center" ng-show="notifications.busy">
<div class="col-lg-12 text-center" ng-show="busy">
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
</div>
<div class="card" ng-hide="notifications.busy || notifications.notifications.length">
<div class="card" ng-hide="busy || notifications.length">
<div class="row">
<div class="col-xs-12">
<h3 class="text-center" style="margin: 20px;">{{ 'notifications.nonePending' | tr }}</h3>
@@ -16,14 +16,14 @@
</div>
</div>
<div class="card notification-item" ng-repeat="notification in notifications.notifications">
<div class="card notification-item" ng-repeat="notification in notifications">
<div class="row">
<div class="col-xs-12" ng-click="notification.isCollapsed = !notification.isCollapsed" ng-class="{ 'notification-details': notification.detailsShown }">
<span ng-class="{'text-bold': !notification.acknowledged }">{{ notification.title }}</span> <small class="text-muted" uib-tooltip="{{ notification.creationTime | prettyLongDate }}">{{ notification.creationTime | prettyDate }}</small>
<!-- hidden for now since it seems overkill to have "unread" -->
<!-- <button class="btn btn-xs btn-default pull-right" ng-show="notification.acknowledged" ng-click="notifications.ack(notification, false, $event)" uib-tooltip="{{ 'notifications.dismissTooltip' | tr }}"><i class="fa fa-asterisk"></i></button> -->
<!-- <button class="btn btn-xs btn-default pull-right" ng-show="notification.acknowledged" ng-click="ack(notification, false, $event)" uib-tooltip="{{ 'notifications.dismissTooltip' | tr }}"><i class="fa fa-asterisk"></i></button> -->
<div uib-collapse="notification.isCollapsed" expanding="notifications.ack(notification, true)">
<div uib-collapse="notification.isCollapsed" expanding="ack(notification, true)">
<br/>
<p ng-hide="notification.messageJson" ng-click="$event.stopPropagation();" style="cursor: auto; overflow: auto;" ng-bind-html="notification.message | markdown2html"></p>
<pre ng-show="notification.messageJson" ng-click="$event.stopPropagation();" style="cursor: auto">{{ notification.messageJson | json }}</pre>