Merge pull request #1788 from emanuelschuetze/fixSlides

Fix slide templates
This commit is contained in:
Oskar Hahn 2016-01-09 12:01:11 +01:00
commit 091c08dabd
6 changed files with 22 additions and 29 deletions

View File

@ -40,13 +40,13 @@ class ItemListSlide(ProjectorElement):
view_action='list') view_action='list')
class ItemDetailSlide(ProjectorElement): class ListOfSpeakersSlide(ProjectorElement):
""" """
Slide definitions for Item model. Slide definitions for Item model.
This is only for list of speakers slide. You have to set 'id'. This is only for list of speakers slide. You have to set 'id'.
""" """
name = 'agenda/item' name = 'agenda/list-of-speakers'
def get_context(self): def get_context(self):
pk = self.config_entry.get('id') pk = self.config_entry.get('id')

View File

@ -80,18 +80,18 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
projectListOfSpeakers: function() { projectListOfSpeakers: function() {
return $http.post( return $http.post(
'/rest/core/projector/1/prune_elements/', '/rest/core/projector/1/prune_elements/',
[{name: 'agenda/item', id: this.id}] [{name: 'agenda/list-of-speakers', id: this.id}]
); );
}, },
// check if list of speakers is projected // check if list of speakers is projected
isListOfSpeakersProjected: function () { isListOfSpeakersProjected: function () {
// Returns true if there is a projector element with the // Returns true if there is a projector element with the
// name 'agenda/item' and the same id. // name 'agenda/list-of-speakers' and the same id.
var projector = Projector.get(1); var projector = Projector.get(1);
if (typeof projector === 'undefined') return false; if (typeof projector === 'undefined') return false;
var self = this; var self = this;
var predicate = function (element) { var predicate = function (element) {
return element.name == 'agenda/item' && return element.name == 'agenda/list-of-speakers' &&
typeof element.id !== 'undefined' && typeof element.id !== 'undefined' &&
element.id == self.id; element.id == self.id;
}; };

View File

@ -7,8 +7,8 @@ angular.module('OpenSlidesApp.agenda.projector', ['OpenSlidesApp.agenda'])
.config([ .config([
'slidesProvider', 'slidesProvider',
function(slidesProvider) { function(slidesProvider) {
slidesProvider.registerSlide('agenda/item', { slidesProvider.registerSlide('agenda/list-of-speakers', {
template: 'static/templates/agenda/slide-item-detail.html', template: 'static/templates/agenda/slide-list-of-speakers.html',
}); });
slidesProvider.registerSlide('agenda/item-list', { slidesProvider.registerSlide('agenda/item-list', {
template: 'static/templates/agenda/slide-item-list.html', template: 'static/templates/agenda/slide-item-list.html',
@ -16,7 +16,7 @@ angular.module('OpenSlidesApp.agenda.projector', ['OpenSlidesApp.agenda'])
} }
]) ])
.controller('SlideItemDetailCtrl', [ .controller('SlideListOfSpeakersCtrl', [
'$scope', '$scope',
'Agenda', 'Agenda',
'User', 'User',

View File

@ -1,11 +1,12 @@
<div ng-controller="SlideItemListCtrl" class="content scrollcontent"> <div ng-controller="SlideItemListCtrl" class="content scrollcontent">
<h1 translate>Agenda</h1> <h1 translate>Agenda</h1>
<table class="tablelist"> <div class="agendalist">
<tr ng-repeat="item in items"> <!-- item type: AGENDA_ITEM = 1, HIDDEN_ITEM = 2 -->
<td class="leftcolumn nobr" ng-class="{ 'closed': item.closed }"> <p ng-repeat="item in items | filter: {type: 1}" ng-class="{ 'spacer-top': !item.parent_id }">
{{ item.item_number }} <span ng-repeat="n in [].constructor(item.parentCount) track by $index">&nbsp;&nbsp;</span>
<td class="rightcolumn" ng-class="{ 'closed': item.closed }">
{{ item.title }} {{ item.title }}
</table> <i ng-if="item.closed" class="fa fa-check"></i>
</p>
</div>
</div> </div>

View File

@ -1,4 +1,4 @@
<div ng-controller="SlideItemDetailCtrl" class="content scrollcontent"> <div ng-controller="SlideListOfSpeakersCtrl" class="content scrollcontent">
<h1> <h1>
{{ item.title }} {{ item.title }}
<span translate>List of speakers</span> <span translate>List of speakers</span>

View File

@ -213,17 +213,9 @@ tr.elected td {
background-color: #BED4DE !important; background-color: #BED4DE !important;
} }
/*** Table list ***/ /*** Agenda list ***/
.tablelist { .agendalist p {
font-size: 130%; font-size: 140%;
}
.tablelist td {
padding: 5px;
}
.tablelist .leftcolumn {
padding-right: 15px;
vertical-align: top;
}
.tablelist td.closed {
text-decoration: line-through;
} }
.spacer-top {
margin-top: 25px;