diff -r 19313f7c04ab -r 9659e91242e1 cms/app-client/app/models/document.js --- a/cms/app-client/app/models/document.js Wed Aug 24 18:32:41 2016 +0200 +++ b/cms/app-client/app/models/document.js Thu Aug 25 18:44:50 2016 +0200 @@ -15,6 +15,27 @@ contributors: DS.attr({ defaultValue: function() { return []; } }), geoInfo: DS.attr({ defaultValue: function() { return {}; } }), mediaArray: DS.attr({ defaultValue: function() { return []; } }), + subjects: DS.attr({ defaultValue: function() { return []; } }), + + computedSubjects: Ember.computed('subjects', function() { + var array = []; + this.get('subjects').forEach(function(subject) { + var object = {}; + if(typeof subject === 'object') { + if(subject.datatype) { + object['url'] = subject.datatype; + } + if(subject.value) { + object['name'] = subject.value; + } + } else { + object['url'] = subject; + } + array.push(object); + }); + return array; + }), + duration_ms: DS.attr('number', { defaultValue: function() {