<ion-view view-title="{{ref.name || ('Library' | translate)}}">
  <ion-nav-buttons side="secondary">
    <button class="mopidy-mobile-button-icon mopidy-mobile-icon-play"
            ng-click="actions.default(tracks)"
            ng-disabled="!tracks.length"
            >
    </button>
    <button class="mopidy-mobile-button-icon mopidy-mobile-icon-menu"
            ng-click="popover.show($event)"
            ng-controller="LibraryMenuController"
            >
    </button>
  </ion-nav-buttons>
  <ion-content>
    <ion-refresher on-refresh="refresh()" pulling-text="{{'Pull to refresh' | translate}}">
    </ion-refresher>
    <ion-list>
      <ion-item class="item-thumbnail-left item-button-right"
           collection-repeat="track in tracks"
           ng-click="actions.default(track)"
           >
        <img ng-class="{'mopidy-mobile-thumbnail-track': !images[track.uri].uri}"
             ng-src="{{images[track.uri].uri || thumbnail.src}}"
             >
        <h2>{{track.name || track.uri}}</h2>
        <h3 class="mopidy-mobile-artists" ng-show="track.artists.length">
          <span ng-repeat="artist in track.artists">{{artist.name || artist.uri}}</span>
        </h3>
        <h4>{{track.album.name || track.genre || track.comment}}</h4>
        <button class="mopidy-mobile-button-icon mopidy-mobile-icon-menu icon-accessory"
                ng-click="popover.show($event, track)">
        </button>
      </ion-item>
    </ion-list>
  </ion-content>
</ion-view>
