mirror of https://github.com/grafana/grafana
added empty cta to playlist page + hid playlist table when empty (#12841)
* added empty cta to playlist page + hid playlist table when empty * implemented the empty-list-cta component * removed extra protip, changed messagingpull/13060/head
parent
f55aad0ec9
commit
b8597b4d57
@ -1,47 +1,66 @@ |
|||||||
<page-header model="ctrl.navModel"></page-header> |
<page-header model="ctrl.navModel"></page-header> |
||||||
|
|
||||||
<div class="page-container page-body"> |
<div class="page-container page-body"> |
||||||
<div class="page-action-bar"> |
<div ng-if="ctrl.playlists.length > 0"> |
||||||
<div class="page-action-bar__spacer"></div> |
<div class="page-action-bar"> |
||||||
<a class="btn btn-success pull-right" href="playlists/create"> |
<div class="page-action-bar__spacer"></div> |
||||||
<i class="fa fa-plus"></i> |
<a class="btn btn-success pull-right" href="playlists/create"> |
||||||
New Playlist |
<i class="fa fa-plus"></i> |
||||||
</a> |
New Playlist |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
|
||||||
|
<table class="filter-table"> |
||||||
|
<thead> |
||||||
|
<th> |
||||||
|
<strong>Name</strong> |
||||||
|
</th> |
||||||
|
<th> |
||||||
|
<strong>Start url</strong> |
||||||
|
</th> |
||||||
|
<th style="width: 78px"></th> |
||||||
|
<th style="width: 78px"></th> |
||||||
|
<th style="width: 25px"></th> |
||||||
|
</thead> |
||||||
|
<tr ng-repeat="playlist in ctrl.playlists"> |
||||||
|
<td> |
||||||
|
<a href="playlists/edit/{{playlist.id}}">{{playlist.name}}</a> |
||||||
|
</td> |
||||||
|
<td> |
||||||
|
<a href="playlists/play/{{playlist.id}}">playlists/play/{{playlist.id}}</a> |
||||||
|
</td> |
||||||
|
<td class="text-center"> |
||||||
|
<a href="playlists/play/{{playlist.id}}" class="btn btn-inverse btn-small"> |
||||||
|
<i class="fa fa-play"></i> |
||||||
|
Play |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
<td class="text-right"> |
||||||
|
<a href="playlists/edit/{{playlist.id}}" class="btn btn-inverse btn-small"> |
||||||
|
<i class="fa fa-edit"></i> |
||||||
|
Edit |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
<td class="text-right"> |
||||||
|
<a ng-click="ctrl.removePlaylist(playlist)" class="btn btn-danger btn-small"> |
||||||
|
<i class="fa fa-remove"></i> |
||||||
|
</a> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<table class="filter-table"> |
<div ng-if="ctrl.playlists.length === 0"> |
||||||
<thead> |
<empty-list-cta model="{ |
||||||
<th><strong>Name</strong></th> |
title: 'There are no playlists created yet', |
||||||
<th><strong>Start url</strong></th> |
buttonIcon: 'fa fa-plus', |
||||||
<th style="width: 78px"></th> |
buttonLink: 'playlists/create', |
||||||
<th style="width: 78px"></th> |
buttonTitle: ' Create Playlist', |
||||||
<th style="width: 25px"></th> |
proTip: 'You can run the playlist in Kiosk Mode.', |
||||||
</thead> |
proTipLink: 'http://docs.grafana.org/reference/playlist/', |
||||||
<tr ng-repeat="playlist in ctrl.playlists"> |
proTipLinkTitle: 'Learn more', |
||||||
<td> |
proTipTarget: '_blank' |
||||||
<a href="playlists/edit/{{playlist.id}}">{{playlist.name}}</a> |
}" /> |
||||||
</td> |
</div> |
||||||
<td > |
|
||||||
<a href="playlists/play/{{playlist.id}}">playlists/play/{{playlist.id}}</a> |
|
||||||
</td> |
|
||||||
<td class="text-center"> |
|
||||||
<a href="playlists/play/{{playlist.id}}" class="btn btn-inverse btn-small"> |
|
||||||
<i class="fa fa-play"></i> |
|
||||||
Play |
|
||||||
</a> |
|
||||||
</td> |
|
||||||
<td class="text-right"> |
|
||||||
<a href="playlists/edit/{{playlist.id}}" class="btn btn-inverse btn-small"> |
|
||||||
<i class="fa fa-edit"></i> |
|
||||||
Edit |
|
||||||
</a> |
|
||||||
</td> |
|
||||||
<td class="text-right"> |
|
||||||
<a ng-click="ctrl.removePlaylist(playlist)" class="btn btn-danger btn-small"> |
|
||||||
<i class="fa fa-remove"></i> |
|
||||||
</a> |
|
||||||
</td> |
|
||||||
</tr> |
|
||||||
</table> |
|
||||||
|
|
||||||
</div> |
</div> |
||||||
|
|||||||
Loading…
Reference in new issue