Merge pull request #2622 from FinnStutzenstein/Issue2566

Hotfix for Issue #2566
This commit is contained in:
Emanuel Schütze 2016-11-15 20:24:47 +01:00 committed by GitHub
commit 4d54a2b575
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 // pagination
$scope.currentPage = 1; $scope.currentPage = 1;
$scope.itemsPerPage = 100; $scope.itemsPerPage = 100;

View File

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

View File

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