diff --git a/CHANGELOG b/CHANGELOG
index c322a8099..546960291 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -50,6 +50,7 @@ Motions:
- Added karma:watch command [#3466].
- Show the number of next speakers in motion list view [#3470].
- Reference to motions by id in state and recommendation special field [#3498].
+- Added new change recommendation type "other" [#3495].
Elections:
- Added pagination for list view [#3393].
diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css
index 86db38047..4eea6b0d6 100644
--- a/openslides/core/static/css/app.css
+++ b/openslides/core/static/css/app.css
@@ -639,6 +639,9 @@ img {
.motion-text-holder .change-recommendation-list > li.replace {
background-color: #0333ff;
}
+.motion-text-holder .change-recommendation-list > li.other {
+ background-color: #777777;
+}
.motion-text-holder .change-recommendation-list .tooltip {
display: none;
diff --git a/openslides/motions/migrations/0004_motionchangerecommendation_other_description.py b/openslides/motions/migrations/0004_motionchangerecommendation_other_description.py
new file mode 100644
index 000000000..5fc3061ef
--- /dev/null
+++ b/openslides/motions/migrations/0004_motionchangerecommendation_other_description.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.8 on 2017-11-17 10:47
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('motions', '0003_motion_comments'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='motionchangerecommendation',
+ name='other_description',
+ field=models.TextField(blank=True),
+ ),
+ ]
diff --git a/openslides/motions/models.py b/openslides/motions/models.py
index bb5e53a3e..be30044c0 100644
--- a/openslides/motions/models.py
+++ b/openslides/motions/models.py
@@ -778,7 +778,10 @@ class MotionChangeRecommendation(RESTModelMixin, models.Model):
"""If true, this change recommendation has been rejected"""
type = models.PositiveIntegerField(default=0)
- """Replacement (0), Insertion (1), Deletion (2)"""
+ """Replacement (0), Insertion (1), Deletion (2), Other (3)"""
+
+ other_description = models.TextField(blank=True)
+ """The description text for type 'other'"""
line_from = models.PositiveIntegerField()
"""The number or the first affected line"""
diff --git a/openslides/motions/serializers.py b/openslides/motions/serializers.py
index 1df147583..e5d7bcc2d 100644
--- a/openslides/motions/serializers.py
+++ b/openslides/motions/serializers.py
@@ -258,6 +258,7 @@ class MotionChangeRecommendationSerializer(ModelSerializer):
'motion_version',
'rejected',
'type',
+ 'other_description',
'line_from',
'line_to',
'text',
diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js
index 96dde74f7..263517841 100644
--- a/openslides/motions/static/js/motions/base.js
+++ b/openslides/motions/static/js/motions/base.js
@@ -902,6 +902,9 @@ angular.module('OpenSlidesApp.motions', [
case diffService.TYPE_REPLACEMENT:
title = title.replace('%TYPE%', gettextCatalog.getString('Replacement'));
break;
+ case diffService.TYPE_OTHER:
+ title = title.replace('%TYPE%', this.other_description);
+ break;
}
title = title.replace('%FROM%', this.line_from).replace('%TO%', (this.line_to - 1));
return title;
diff --git a/openslides/motions/static/js/motions/diff.js b/openslides/motions/static/js/motions/diff.js
index 49294f4ae..51316ad41 100644
--- a/openslides/motions/static/js/motions/diff.js
+++ b/openslides/motions/static/js/motions/diff.js
@@ -17,6 +17,7 @@ angular.module('OpenSlidesApp.motions.diff', ['OpenSlidesApp.motions.lineNumberi
this.TYPE_REPLACEMENT = 0;
this.TYPE_INSERTION = 1;
this.TYPE_DELETION = 2;
+ this.TYPE_OTHER = 3;
this.getLineNumberNode = function(fragment, lineNumber) {
return fragment.querySelector('os-linebreak.os-line-number.line-number-' + lineNumber);
diff --git a/openslides/motions/static/js/motions/pdf.js b/openslides/motions/static/js/motions/pdf.js
index a90234b9d..c8abd65cd 100644
--- a/openslides/motions/static/js/motions/pdf.js
+++ b/openslides/motions/static/js/motions/pdf.js
@@ -270,6 +270,8 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
columnChangeType.push(gettextCatalog.getString("Insertion"));
} else if (change.getType(motion.getVersion(motionVersion).text) === 2) {
columnChangeType.push(gettextCatalog.getString("Deletion"));
+ } else if (change.getType(motion.getVersion(motionVersion).text) === 3) {
+ columnChangeType.push(change.other_description);
}
});
metaTableBody.push([
diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js
index 9ea778af7..f1cf52341 100644
--- a/openslides/motions/static/js/motions/site.js
+++ b/openslides/motions/static/js/motions/site.js
@@ -246,10 +246,19 @@ angular.module('OpenSlidesApp.motions.site', [
options: [
{name: gettextCatalog.getString('Replacement'), value: 0},
{name: gettextCatalog.getString('Insertion'), value: 1},
- {name: gettextCatalog.getString('Deletion'), value: 2}
+ {name: gettextCatalog.getString('Deletion'), value: 2},
+ {name: gettextCatalog.getString('Other'), value: 3},
]
}
},
+ {
+ key: 'other_description',
+ type: 'input',
+ templateOptions: {
+ label: gettextCatalog.getString('Description'),
+ },
+ hideExpression: "model.type !== 3",
+ },
{
key: 'text',
type: 'editor',
diff --git a/openslides/motions/static/templates/motions/motion-detail/change-summary.html b/openslides/motions/static/templates/motions/motion-detail/change-summary.html
index 3e2ef77e8..5625d47dd 100644
--- a/openslides/motions/static/templates/motions/motion-detail/change-summary.html
+++ b/openslides/motions/static/templates/motions/motion-detail/change-summary.html
@@ -24,6 +24,9 @@
Replacement
Insertion
Deletion
+
+ {{ change.other_description }}
+
Rejected
diff --git a/openslides/motions/static/templates/motions/motion-detail/view-original.html b/openslides/motions/static/templates/motions/motion-detail/view-original.html
index 1fa945561..8f2531878 100644
--- a/openslides/motions/static/templates/motions/motion-detail/view-original.html
+++ b/openslides/motions/static/templates/motions/motion-detail/view-original.html
@@ -22,7 +22,7 @@