# HG changeset patch # User Chloe Laisne # Date 1472143490 -7200 # Node ID 9659e91242e1704d0c4f41bebc5f3edeb4d945f1 # Parent 19313f7c04ab95cac476addae0564ff42444cdf5 Add subjects to notice + Background color two notice type + Remove empty notice fields 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() { diff -r 19313f7c04ab -r 9659e91242e1 cms/app-client/app/styles/app.scss --- a/cms/app-client/app/styles/app.scss Wed Aug 24 18:32:41 2016 +0200 +++ b/cms/app-client/app/styles/app.scss Thu Aug 25 18:44:50 2016 +0200 @@ -66,11 +66,8 @@ text-align: center; } -.corpus-app-modal { - background-color: $medium-white; - border-right: 1px solid $dark-grey; - padding: 20px 40px; - z-index: 1; +.corpus-app-modal .notice-component { + background-color: inherit; } .corpus-app-container { @@ -90,7 +87,8 @@ font-size: 14px; } -.corpus-app-container h2 { +.corpus-app-container h2, +.corpus-app-modal h2 { line-height: 30px; margin: 12px auto; } @@ -146,6 +144,10 @@ position: absolute; top: 0px; left: 0px; + background-color: $medium-white; + border-right: 1px solid $dark-grey; + overflow-y: scroll; + z-index: 1; } .corpus-app-container { diff -r 19313f7c04ab -r 9659e91242e1 cms/app-client/app/styles/components/notice-component.scss --- a/cms/app-client/app/styles/components/notice-component.scss Wed Aug 24 18:32:41 2016 +0200 +++ b/cms/app-client/app/styles/components/notice-component.scss Thu Aug 25 18:44:50 2016 +0200 @@ -1,3 +1,7 @@ +.corpus-app-container.window { + background-color: $light-blue; +} + .notice-component { padding: 20px 40px; color: $dark-grey; @@ -54,6 +58,7 @@ .notice-component table tr td.title { font-weight: bold; color: $dark-blue; + width: 25%; } .notice-component table tr td ul { diff -r 19313f7c04ab -r 9659e91242e1 cms/app-client/app/templates/components/notice-component.hbs --- a/cms/app-client/app/templates/components/notice-component.hbs Wed Aug 24 18:32:41 2016 +0200 +++ b/cms/app-client/app/templates/components/notice-component.hbs Thu Aug 25 18:44:50 2016 +0200 @@ -6,12 +6,12 @@

{{ item.title }}

- + @@ -20,22 +20,36 @@ - - - - - + - - + + + + + + @@ -45,8 +59,4 @@ - - - -
Editeur(s)Editeur{{#if (if-operator item.publishers.length '>' 1)}}s{{/if}}
    - {{#each item.publishers as |publisher|}} + {{#each item.publishers as |publisher|}}
  • {{ publisher }}
  • - {{/each}} + {{/each}}
{{ doc-language url=item.language class="language"}}
Enregistré en{{ short-date item.issued }}
ParticipantsSujet{{#if (if-operator item.computedSubjects.length '>' 1)}}s{{/if}}
Description(s)Enregistré en{{ short-date item.issued }}
Participant{{#if (if-operator participants.length '>' 1)}}s{{/if}} +
    + {{#each participants as |participant|}} +
  • {{ participant.name }} ({{ participant.role }})
  • + {{/each}} +
+
LieuDurée {{to-minutes item.duration}}
Droits
\ No newline at end of file