Rename ItemDetailSlide to ListOfSpeakersSlide (Fixes #1576)

This commit is contained in:
Emanuel Schuetze 2016-01-09 10:53:43 +01:00
parent 5cab3bf3dc
commit 74110453c8
4 changed files with 9 additions and 9 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,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>