Merge pull request #1788 from emanuelschuetze/fixSlides
Fix slide templates
This commit is contained in:
commit
091c08dabd
@ -40,13 +40,13 @@ class ItemListSlide(ProjectorElement):
|
||||
view_action='list')
|
||||
|
||||
|
||||
class ItemDetailSlide(ProjectorElement):
|
||||
class ListOfSpeakersSlide(ProjectorElement):
|
||||
"""
|
||||
Slide definitions for Item model.
|
||||
|
||||
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):
|
||||
pk = self.config_entry.get('id')
|
||||
|
@ -80,18 +80,18 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
|
||||
projectListOfSpeakers: function() {
|
||||
return $http.post(
|
||||
'/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
|
||||
isListOfSpeakersProjected: function () {
|
||||
// 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);
|
||||
if (typeof projector === 'undefined') return false;
|
||||
var self = this;
|
||||
var predicate = function (element) {
|
||||
return element.name == 'agenda/item' &&
|
||||
return element.name == 'agenda/list-of-speakers' &&
|
||||
typeof element.id !== 'undefined' &&
|
||||
element.id == self.id;
|
||||
};
|
||||
|
@ -7,8 +7,8 @@ angular.module('OpenSlidesApp.agenda.projector', ['OpenSlidesApp.agenda'])
|
||||
.config([
|
||||
'slidesProvider',
|
||||
function(slidesProvider) {
|
||||
slidesProvider.registerSlide('agenda/item', {
|
||||
template: 'static/templates/agenda/slide-item-detail.html',
|
||||
slidesProvider.registerSlide('agenda/list-of-speakers', {
|
||||
template: 'static/templates/agenda/slide-list-of-speakers.html',
|
||||
});
|
||||
slidesProvider.registerSlide('agenda/item-list', {
|
||||
template: 'static/templates/agenda/slide-item-list.html',
|
||||
@ -16,7 +16,7 @@ angular.module('OpenSlidesApp.agenda.projector', ['OpenSlidesApp.agenda'])
|
||||
}
|
||||
])
|
||||
|
||||
.controller('SlideItemDetailCtrl', [
|
||||
.controller('SlideListOfSpeakersCtrl', [
|
||||
'$scope',
|
||||
'Agenda',
|
||||
'User',
|
||||
|
@ -1,11 +1,12 @@
|
||||
<div ng-controller="SlideItemListCtrl" class="content scrollcontent">
|
||||
<h1 translate>Agenda</h1>
|
||||
|
||||
<table class="tablelist">
|
||||
<tr ng-repeat="item in items">
|
||||
<td class="leftcolumn nobr" ng-class="{ 'closed': item.closed }">
|
||||
{{ item.item_number }}
|
||||
<td class="rightcolumn" ng-class="{ 'closed': item.closed }">
|
||||
{{ item.title }}
|
||||
</table>
|
||||
<div class="agendalist">
|
||||
<!-- item type: AGENDA_ITEM = 1, HIDDEN_ITEM = 2 -->
|
||||
<p ng-repeat="item in items | filter: {type: 1}" ng-class="{ 'spacer-top': !item.parent_id }">
|
||||
<span ng-repeat="n in [].constructor(item.parentCount) track by $index"> </span>
|
||||
{{ item.title }}
|
||||
<i ng-if="item.closed" class="fa fa-check"></i>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div ng-controller="SlideItemDetailCtrl" class="content scrollcontent">
|
||||
<div ng-controller="SlideListOfSpeakersCtrl" class="content scrollcontent">
|
||||
<h1>
|
||||
{{ item.title }}
|
||||
<span translate>List of speakers</span>
|
@ -213,17 +213,9 @@ tr.elected td {
|
||||
background-color: #BED4DE !important;
|
||||
}
|
||||
|
||||
/*** Table list ***/
|
||||
.tablelist {
|
||||
font-size: 130%;
|
||||
}
|
||||
.tablelist td {
|
||||
padding: 5px;
|
||||
}
|
||||
.tablelist .leftcolumn {
|
||||
padding-right: 15px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.tablelist td.closed {
|
||||
text-decoration: line-through;
|
||||
/*** Agenda list ***/
|
||||
.agendalist p {
|
||||
font-size: 140%;
|
||||
}
|
||||
.spacer-top {
|
||||
margin-top: 25px;
|
||||
|
Loading…
Reference in New Issue
Block a user