ui: show session name if there is one

This commit is contained in:
Jack Pearkes 2014-06-09 14:58:48 -04:00
parent bd39973df1
commit e21b338a8b
2 changed files with 9 additions and 1 deletions

View file

@ -501,7 +501,7 @@
<div class="list-group-item list-condensed double-line">
<div class="bg-light-gray list-bar-horizontal"></div>
<div class="name">
{{session.ID}}
{{ sessionName session }}
<button {{ action "invalidateSession" session.ID }} {{ bind-attr class=":btn :btn-danger :pull-right :btn-list isLoading:btn-warning" }}>Invalidate</button>
</div>
<ul class="list-inline sub">

View file

@ -19,3 +19,11 @@ Ember.Handlebars.helper('listBar', function(status) {
}
return new Handlebars.SafeString('<div class="list-bar-horizontal ' + highlightClass + '"></div>');
});
Ember.Handlebars.helper('sessionName', function(session) {
if (session.Name === "") {
return session.ID;
} else {
return new Handlebars.SafeString(session.Name + ' <small>' + session.ID + '</small>');
}
});