Improve notification view layout and add relevant actions

This commit is contained in:
Johannes Zellner
2019-01-08 13:18:35 +01:00
parent 9653d07ae2
commit 71eaf9966f
3 changed files with 72 additions and 29 deletions

View File

@@ -286,27 +286,32 @@
<br/>
<div class="text-left">
<h3>Notifications</h3>
<h3>Notifications <button class="btn btn-xs btn-primary btn-outline pull-right" ng-click="notifications.clearAll()"><i class="fa fa-check"></i> Clear All</button> </h3>
</div>
<div class="card">
<div class="grid-item-top">
<div class="row">
<div class="row" ng-show="notifications.busy">
<div class="col-lg-12 text-center">
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
</div>
</div>
<div class="row" ng-hide="notifications.busy">
<div class="col-xs-12">
<table class="table table-hover">
<thead>
<tr>
<th style="width:30%">Title</th>
<th style="width:70%" class="hidden-xs hidden-sm">Message</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="notification in notifications">
<td class="text-left elide-table-cell" ng-click="notificationClicked(notification)">
<table class="table table-hover" style="margin-bottom: 0;">
<tbody ng-repeat="notification in notifications.notifications">
<tr ng-class="{ 'notification-details': notifications.activeNotification === notification }">
<td class="text-left hand elide-table-cell" ng-click="notifications.clicked(notification)">
{{ notification.title }}
</td>
<td class="text-left hand elide-table-cell hidden-xs hidden-sm" ng-click="notificationClicked(notification)">
{{ notification.message }}
<td class="text-right no-wrap" style="vertical-align: bottom">
<button class="btn btn-xs btn-success" ng-click="notifications.ack(notification)" uib-tooltip="Clear"><i class="fa fa-check"></i></button>
</td>
</tr>
<tr ng-show="notifications.activeNotification === notification" class="notification-details">
<td>{{ notification.message }}</td>
<td class="text-right no-wrap" style="vertical-align: bottom">
<button class="btn btn-xs btn-primary" ng-show="notification.action" ng-click="notifications.action(notification)"><i class="fa fa-arrow-right"></i> Goto View</button>
</td>
</tr>
</tbody>