Minor fixes (Fixes #2750)

- Use <ul> instead of <ol> for candidate lists.
- Fix sorting by assignment_related_users.length in list view (Fixes #2750).
- Apply category and motion block for new amendments.
This commit is contained in:
Emanuel Schütze 2016-12-12 12:52:17 +01:00
parent 5cc820d6d2
commit 8780c47fc1
7 changed files with 13 additions and 15 deletions

View File

@ -80,7 +80,7 @@ angular.module('OpenSlidesApp.assignments.pdf', ['OpenSlidesApp.core.pdf'])
style: 'textItem' style: 'textItem'
}, },
{ {
ol: userList, ul: userList,
style: 'textItem' style: 'textItem'
} }
] ]

View File

@ -22,7 +22,7 @@ angular.module('OpenSlidesApp.assignments.projector', ['OpenSlidesApp.assignment
// Add it to the coresponding get_requirements method of the ProjectorElement // Add it to the coresponding get_requirements method of the ProjectorElement
// class. // class.
var id = $scope.element.id; var id = $scope.element.id;
var poll = $scope.element.poll; $scope.showResult = $scope.element.poll;
Assignment.bindOne(id, $scope, 'assignment'); Assignment.bindOne(id, $scope, 'assignment');
Assignment.getPhases().then(function(phases) { Assignment.getPhases().then(function(phases) {

View File

@ -361,7 +361,7 @@ angular.module('OpenSlidesApp.assignments.site', [
display_name: gettext('Title')}, display_name: gettext('Title')},
{name: 'phase', {name: 'phase',
display_name: gettext('Phase')}, display_name: gettext('Phase')},
{name: 'assignment.assignment_related_users.length', {name: 'assignment_related_users.length',
display_name: gettext('Number of candidates')}, display_name: gettext('Number of candidates')},
]; ];
$scope.hasTag = function (assignment, tag) { $scope.hasTag = function (assignment, tag) {

View File

@ -82,7 +82,7 @@
<div ng-if="assignment.phase != 2"> <div ng-if="assignment.phase != 2">
<h3 translate>Candidates</h3> <h3 translate>Candidates</h3>
<ol> <ul>
<li ng-repeat="related_user in assignment.assignment_related_users"> <li ng-repeat="related_user in assignment.assignment_related_users">
<a ui-sref="users.user.detail({id: related_user.user_id})">{{ related_user.user.get_full_name() }}</a> <a ui-sref="users.user.detail({id: related_user.user_id})">{{ related_user.user.get_full_name() }}</a>
<i ng-if="related_user.elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i> <i ng-if="related_user.elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i>
@ -90,7 +90,7 @@
class="btn btn-default btn-xs"> class="btn btn-default btn-xs">
<i class="fa fa-times"></i> <i class="fa fa-times"></i>
</button> </button>
</ol> </ul>
<div class="form-group"> <div class="form-group">
<div uib-alert ng-show="alert.show" ng-class="'alert-' + (alert.type || 'warning')" ng-click="alert={}" close="alert={}"> <div uib-alert ng-show="alert.show" ng-class="'alert-' + (alert.type || 'warning')" ng-click="alert={}" close="alert={}">

View File

@ -9,22 +9,22 @@
</div> </div>
<!-- Description --> <!-- Description -->
<div ng-hide="element.poll" class="white-space-pre-line"> <div ng-if="!showResult && assignment.description !== ''" class="white-space-pre-line">
{{ assignment.description }} {{ assignment.description }}
</div> </div>
<!-- Candidates --> <!-- Candidates -->
<div ng-hide="element.poll"> <div ng-if="!showResult">
<h3 translate>Candidates</h3> <h3 translate>Candidates</h3>
<ol> <ul>
<li ng-repeat="related_user in assignment.assignment_related_users"> <li ng-repeat="related_user in assignment.assignment_related_users">
{{ related_user.user.get_full_name() }} {{ related_user.user.get_full_name() }}
<i ng-if="related_user.elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i> <i ng-if="related_user.elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i>
</ol> </ul>
</div> </div>
<!-- vote results --> <!-- vote results -->
<div ng-show="element.poll" class="electionresults spacer" ng-repeat="poll in assignment.polls | filter: {id: element.poll}"> <div ng-show="showResult" class="electionresults spacer" ng-repeat="poll in assignment.polls | filter: {id: element.poll}">
<table class="table table-bordered table-striped minimumTable"> <table class="table table-bordered table-striped minimumTable">
<tr> <tr>
<th translate>Candidates <th translate>Candidates

View File

@ -370,7 +370,7 @@ img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
.col1 ol { .col1 ol, .col1 ul {
margin-left: 15px; margin-left: 15px;
} }
.ballot-tabs ul { .ballot-tabs ul {
@ -437,10 +437,6 @@ img {
.motion-text .highlight { .motion-text .highlight {
background-color: #ff0; background-color: #ff0;
} }
.motion-text li {
margin-left: 30px;
}
.motion-text ins { .motion-text ins {
color: green; color: green;
text-decoration: underline; text-decoration: underline;

View File

@ -1405,6 +1405,8 @@ angular.module('OpenSlidesApp.motions.site', [
} }
$scope.model.title = $scope.$parent.motion.getTitle(); $scope.model.title = $scope.$parent.motion.getTitle();
$scope.model.parent_id = $scope.$parent.motion.id; $scope.model.parent_id = $scope.$parent.motion.id;
$scope.model.category_id = $scope.$parent.motion.category_id;
$scope.model.motion_block_id = $scope.$parent.motion.motion_block_id;
Motion.bindOne($scope.model.parent_id, $scope, 'parent'); Motion.bindOne($scope.model.parent_id, $scope, 'parent');
} }
// ... preselect default workflow // ... preselect default workflow