Bugfix: Title change recommendations on the projector
This commit is contained in:
parent
3e3b62bc38
commit
611be75d95
@ -27,6 +27,13 @@ p.os-split-after {
|
||||
.diff-box {
|
||||
padding-top: 0;
|
||||
}
|
||||
.diff-box-title {
|
||||
margin-bottom: 10px;
|
||||
.description {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.motion-text.line-numbers-outside {
|
||||
padding-left: 0;
|
||||
margin-left: 35px;
|
||||
|
@ -30,13 +30,23 @@ angular.module('OpenSlidesApp.motions.projector', [
|
||||
|
||||
Motion.bindOne(id, $scope, 'motion');
|
||||
User.bindAll({}, $scope, 'users');
|
||||
MotionChangeRecommendation.bindAll({
|
||||
where: {
|
||||
motion_version_id: {
|
||||
'==': id,
|
||||
},
|
||||
},
|
||||
}, $scope, 'change_recommendations');
|
||||
|
||||
$scope.$watch(function () {
|
||||
return MotionChangeRecommendation.lastModified();
|
||||
}, function () {
|
||||
$scope.change_recommendations = [];
|
||||
$scope.title_change_recommendation = null;
|
||||
MotionChangeRecommendation.filter({
|
||||
'where': {'motion_version_id': {'==': id}}
|
||||
}).forEach(function(change) {
|
||||
if (change.isTextRecommendation()) {
|
||||
$scope.change_recommendations.push(change);
|
||||
}
|
||||
if (change.isTitleRecommendation()) {
|
||||
$scope.title_change_recommendation = change;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
]);
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
<div id="motioncontent" class="scrollcontent">
|
||||
<!-- Title -->
|
||||
<div id="title">
|
||||
<h1>{{ motion.getTitle() }}</h1>
|
||||
<h1>{{ motion.getTitleWithChanges(mode) }}</h1>
|
||||
<h2>
|
||||
<translate>Motion</translate> {{ motion.identifier }}
|
||||
<span ng-if="motion.versions.length > 1" >| Version {{ motion.getVersion().version_number }}</span>
|
||||
@ -89,6 +89,15 @@
|
||||
|
||||
<!-- Diff View -->
|
||||
<div ng-if="mode == 'diff'">
|
||||
<div ng-if="title_change_recommendation" class="diff-box-{{ title_change_recommendation.id }} diff-box-title">
|
||||
<div class="motion-text motion-text-diff line-numbers-{{ lineNumberMode }}">
|
||||
<div class="description">
|
||||
<translate>New title</translate>:
|
||||
</div>
|
||||
<div>{{ title_change_recommendation.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The actual diff view -->
|
||||
<div class="motion-text-with-diffs line-numbers-{{ config('motions_default_line_numbering') }}">
|
||||
<div ng-repeat="change in (changes = (change_recommendations | orderBy: 'line_from')) ">
|
||||
|
Loading…
Reference in New Issue
Block a user