Hotfix for Issue #2566

This commit is contained in:
FinnStutzenstein 2016-11-11 12:03:59 +01:00
parent 22ab7a15a3
commit 1ca390876b
3 changed files with 10 additions and 2 deletions

View File

@ -156,6 +156,14 @@ angular.module('OpenSlidesApp.agenda.site', [
}
};
$scope.getUpdateStatePrefix = function (item) {
var prefix = item.content_object.collection.replace('/','.');
// Hotfix for Issue 2566.
// The changes could be reverted if Issue 2480 is closed.
prefix = prefix.replace('motion-block', 'motionBlock');
return prefix;
};
// pagination
$scope.currentPage = 1;
$scope.itemsPerPage = 100;

View File

@ -220,7 +220,7 @@
<div os-perms="agenda.can_see" class="hoverActions" ng-class="{'hiddenDiv': !item.hover}">
<a ui-sref="agenda.item.detail({id: item.id})" translate>List of speakers</a>
<span os-perms="agenda.can_manage"> |
<a ui-sref="{{ item.content_object.collection.replace('/','.') }}.detail.update({id: item.content_object.id})"
<a ui-sref="{{ getUpdateStatePrefix(item) }}.detail.update({id: item.content_object.id})"
translate>Edit</a> |
<a href="" ng-click="item.quickEdit=true" translate>QuickEdit</a> |
<a href="" class="text-danger"

View File

@ -259,7 +259,7 @@ angular.module('OpenSlidesApp.motions.site', [
closeByDocument: false,
resolve: {
motionBlock: function () {
return motionBlock;
return MotionBlock.find($stateParams.id);
}
},
preCloseCallback: function() {