Enables the breadcrumb nav on media edit
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
ng-show="loaded"
|
||||
ng-submit="save()"
|
||||
val-form-manager>
|
||||
<umb-panel>
|
||||
<umb-panel ng-class="'editor-breadcrumb'">
|
||||
<umb-header tabs="content.tabs">
|
||||
|
||||
<div class="span7">
|
||||
@@ -48,5 +48,12 @@
|
||||
|
||||
</umb-tab>
|
||||
</umb-tab-view>
|
||||
|
||||
<ul class="umb-panel-footer-nav nav nav-pills" ng-if="content.parentId">
|
||||
<li ng-repeat="ancestor in ancestors">
|
||||
<a href="#/media/media/edit/{{ancestor.id}}">{{ancestor.name}}</a>
|
||||
</li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</umb-panel>
|
||||
</form>
|
||||
@@ -6,7 +6,7 @@
|
||||
* @description
|
||||
* The controller for the media editor
|
||||
*/
|
||||
function mediaEditController($scope, $routeParams, appState, mediaResource, navigationService, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, treeService, formHelper, umbModelMapper, editorState, umbRequestHelper, $http) {
|
||||
function mediaEditController($scope, $routeParams, appState, mediaResource, entityResource, navigationService, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, treeService, formHelper, umbModelMapper, editorState, umbRequestHelper, $http) {
|
||||
|
||||
//setup scope vars
|
||||
$scope.nav = navigationService;
|
||||
@@ -60,6 +60,13 @@ function mediaEditController($scope, $routeParams, appState, mediaResource, navi
|
||||
syncTreeNode($scope.content, data.path, true);
|
||||
|
||||
});
|
||||
|
||||
//We fetch all ancestors of the node to generate the footer breadcrump navigation
|
||||
entityResource.getAncestors($routeParams.id, "media")
|
||||
.then(function(anc) {
|
||||
anc.pop();
|
||||
$scope.ancestors = anc;
|
||||
});
|
||||
}
|
||||
|
||||
$scope.save = function () {
|
||||
|
||||
Reference in New Issue
Block a user