# HG changeset patch # User ymh # Date 1487257807 -3600 # Node ID dad9471f0d63acccc09fc35ae3dbeae150d86111 # Parent cf4653cf88f2d721c189bd23e5b658c41f934827 add filter on created date in notice diff -r cf4653cf88f2 -r dad9471f0d63 cms/app-client/app/components/notice-component.js --- a/cms/app-client/app/components/notice-component.js Wed Feb 15 22:53:52 2017 +0100 +++ b/cms/app-client/app/components/notice-component.js Thu Feb 16 16:10:07 2017 +0100 @@ -56,6 +56,11 @@ addTypeFilter: function(id) { this.get('filter').setFilter('theme', id); + }, + + addCreatedFilter: function(dateStr) { + const date = new Date(dateStr); + this.get('filter').setFilter('date', date.getFullYear().toString()); } } diff -r cf4653cf88f2 -r dad9471f0d63 cms/app-client/app/styles/components/notice-component.scss --- a/cms/app-client/app/styles/components/notice-component.scss Wed Feb 15 22:53:52 2017 +0100 +++ b/cms/app-client/app/styles/components/notice-component.scss Thu Feb 16 16:10:07 2017 +0100 @@ -162,5 +162,9 @@ display: inline-block; } + .notice-created { + cursor: pointer; + } + } diff -r cf4653cf88f2 -r dad9471f0d63 cms/app-client/app/templates/components/notice-component.hbs --- a/cms/app-client/app/templates/components/notice-component.hbs Wed Feb 15 22:53:52 2017 +0100 +++ b/cms/app-client/app/templates/components/notice-component.hbs Thu Feb 16 16:10:07 2017 +0100 @@ -55,7 +55,7 @@ Enregistré en - {{ doc-created value=item.created }} + {{#if item.created }}{{ doc-created value=item.created action=(action "addCreatedFilter" item.created) class="notice-created"}}{{/if}} Participant{{#if (if-operator participants.length '>' 1)}}s{{/if}} diff -r cf4653cf88f2 -r dad9471f0d63 common/corpus-common-addon/addon/components/doc-created.js --- a/common/corpus-common-addon/addon/components/doc-created.js Wed Feb 15 22:53:52 2017 +0100 +++ b/common/corpus-common-addon/addon/components/doc-created.js Thu Feb 16 16:10:07 2017 +0100 @@ -87,7 +87,13 @@ // from the periodMatches function we know that we have a valid end date return this.formatDate(periodMatches.end.str, periodMatches.end.date); - }) + }), + click() { + const action = this.get('action'); + if (action) { + action(); + } + } }); diff -r cf4653cf88f2 -r dad9471f0d63 server/src/app/Console/Commands/ImportCocoonRDF.php --- a/server/src/app/Console/Commands/ImportCocoonRDF.php Wed Feb 15 22:53:52 2017 +0100 +++ b/server/src/app/Console/Commands/ImportCocoonRDF.php Thu Feb 16 16:10:07 2017 +0100 @@ -306,14 +306,6 @@ $progressBar->finish(); } - // $collectionDocsUris = $this->gs_raw->query("SELECT distinct ?uri WHERE { - // GRAPH ?uri { - // ?s ?p ?o. - // ?s . - // FILTER(?o IN (, )) - // } - // }"); - if($clear) { $this->gs->clear("all"); }