@ -2,7 +2,7 @@
< div class = "page-container page-body" >
< div class = "page-container page-body" >
< div ng-if = "ctrl.playlists.length > 0" >
< div ng-if = "ctrl.playlists.length > 0" >
< div class = "page-action-bar" >
< div class = "page-action-bar" ng-if = "ctrl.canEditPlaylists" >
< div class = "page-action-bar__spacer" > < / div >
< div class = "page-action-bar__spacer" > < / div >
< a class = "btn btn-primary pull-right" href = "playlists/create" >
< a class = "btn btn-primary pull-right" href = "playlists/create" >
New playlist
New playlist
@ -13,11 +13,12 @@
< thead >
< thead >
< th > < strong > Name< / strong > < / th >
< th > < strong > Name< / strong > < / th >
< th style = "width: 100px" > < / th >
< th style = "width: 100px" > < / th >
< th style = "width: 78px" > < / th >
< th ng-if = "ctrl.canEditPlaylists" style = "width: 78px" > < / th >
< / thead >
< / thead >
< tr ng-repeat = "playlist in ctrl.playlists" >
< tr ng-repeat = "playlist in ctrl.playlists" >
< td class = "link-td" >
< td ng-class = "{'link-td': ctrl.canEditPlaylists}" >
< a href = "playlists/edit/{{playlist.id}}" > {{playlist.name}}< / a >
< a ng-if = "ctrl.canEditPlaylists" href = "playlists/edit/{{playlist.id}}" > {{playlist.name}}< / a >
< span ng-if = "!ctrl.canEditPlaylists" > {{playlist.name}}< / span >
< / td >
< / td >
< td class = "dropdown" >
< td class = "dropdown" >
< button class = "btn btn-inverse btn-small" data-toggle = "dropdown" >
< button class = "btn btn-inverse btn-small" data-toggle = "dropdown" >
@ -44,7 +45,7 @@
< / li >
< / li >
< / ul >
< / ul >
< / td >
< / td >
< td class = "text-right" >
< td ng-if = "ctrl.canEditPlaylists" class = "text-right" >
< a ng-click = "ctrl.removePlaylist(playlist)" class = "btn btn-danger btn-small" >
< a ng-click = "ctrl.removePlaylist(playlist)" class = "btn btn-danger btn-small" >
< icon name = "'times'" > < / icon >
< icon name = "'times'" > < / icon >
< / a >
< / a >
@ -53,16 +54,23 @@
< / table >
< / table >
< / div >
< / div >
< div ng-if = "ctrl.playlists.length === 0" >
< div ng-if = "ctrl.playlists.length === 0" >
< empty-list-cta
< div ng-if = "ctrl.canEditPlaylists" >
title="'There are no playlists created yet'"
< empty-list-cta
buttonIcon="'plus'"
title="'There are no playlists created yet'"
buttonLink="'playlists/create'"
buttonIcon="'plus'"
buttonTitle="'Create Playlist'"
buttonLink="'playlists/create'"
proTip="'You can use playlists to cycle dashboards on TVs without user control'"
buttonTitle="'Create Playlist'"
proTipLink="'http://docs.grafana.org/reference/playlist/'"
proTip="'You can use playlists to cycle dashboards on TVs without user control'"
proTipLinkTitle="'Learn more'"
proTipLink="'http://docs.grafana.org/reference/playlist/'"
proTipTarget="'_blank'" />
proTipLinkTitle="'Learn more'"
proTipTarget="'_blank'" />
< / div >
< div class = "grafana-info-box" ng-if = "!ctrl.canEditPlaylists" >
< h5 > There are no playlists created yet< / h5 >
< p > Unfortunately you don't have permission to create playlists.< / p >
< / div >
< / div >
< / div >
< / div >
< / div >
< footer / >
< footer / >