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