@Init{
	$this->RegisterCSSFile("gallery.css");
	$this->RegisterJSFile("controllers/galleryManage.js");
	$this->RegisterJSFile("directives/contextMenu.js");
}@
@Title{Gallery}@
@ButtonsLeft{
	<button onclick="Navigate('/gallery/upload/')" title="Upload Images">
		<img src="/images/upload.svg" alt="Add Album" />
	</button>
}@
@ButtonsRight{
	<button onclick="Navigate('/gallery/createalbum/')" title="Create Album">
		<img src="/images/add_album.svg" alt="Add Album" />
	</button>
}@
@Body{
<div ng-controller="galleryManage">
	<select ng-model="selectedAlbum" ng-options="album.AlbumTitle for album in albums"></select>
	<button ng-click="editAlbum(selectedAlbum)" title="Edit Album">
		<img src="/images/edit.svg" alt="Edit" />
	</button>
	<div class="imageSelector">
		<context-menu actions="contextMenuActions"></context-menu>
		<div class="image" ng-repeat="image in selectedAlbum.Images" ng-click="selectImage(image)" ng-class="{selected:image.selected}">
			<div>
				<img ng-src="/{{image.ThumbnailPath}}" alt="{{image.ImageTitle}}" />
				<span>{{image.ImageTitle}}</span>
				<input type="checkbox" value="{{image.ImageId}}" name="selected[]" />
			</div>
		</div>
	</div>
	<scope-init value="albums"><?=json_encode($albums)?></scope-init>
</div>
}@