# HG changeset patch # User cavaliet # Date 1412609807 -7200 # Node ID e70f1c4785f313e400932efbe53ae4e8f473284b # Parent 4be9f21f2df161d4e881b7fea561b85b09da964d search with new results diff -r 4be9f21f2df1 -r e70f1c4785f3 client/app/search/search.html --- a/client/app/search/search.html Mon Oct 06 12:59:13 2014 +0200 +++ b/client/app/search/search.html Mon Oct 06 17:36:47 2014 +0200 @@ -3,18 +3,18 @@
- +
-

Nom : {{ h.metas|meta:"name" }}

-

Description : {{ h.metas|meta:"description" }}

+

Nom : {{ h.metas_dict.name }}

+

Description : {{ h.metas_dict.description }}

-

Classification : {{ h.metas|meta:"classification" }}

-

Current Custody : {{ h.metas|meta:"currentcustody" }}

-

Former Custody : {{ h.metas|meta:"formercustody" }}

-

Mesures : {{ h.metas|meta:"measures" }}

-

Acteurs : {{ h.metas|meta:"actors" }}

-

Lieux : {{ h.metas|meta:"places" }}

+

Classification : {{ h.metas_dict.classification }}

+

Propriétaire actuel : {{ h.metas_dict.currentcustody }}

+

Ancien propriétaire : {{ h.metas_dict.formercustody }}

+

Mesures : {{ h.metas_dict.measures }}

+

Acteurs : {{ h.metas_dict.actors }}

+

Lieux : {{ h.metas_dict.places }}

diff -r 4be9f21f2df1 -r e70f1c4785f3 client/app/search/search_controller.js --- a/client/app/search/search_controller.js Mon Oct 06 12:59:13 2014 +0200 +++ b/client/app/search/search_controller.js Mon Oct 06 17:36:47 2014 +0200 @@ -15,9 +15,19 @@ searchApi.searchResource({q:$scope.q, of: 'json', synthesis: 'false', nresults:'50', callback: 'JSON_CALLBACK'}).$promise.then( //success function( data ){ - // TEMP : add random pict - for(var i=data.hits.length-1; i>=0; i--){ - data.hits[i].url = 'http://placekitten.com/g/' + (100+Math.floor((Math.random()*600)+1)) + '/' + (100+Math.floor((Math.random()*600)+1)); + // Transform meta list into meta dict + var nb = data.hits.length; + for(var i=0;i0 && 0<=i && i<$scope.results.hits.length){ - - } - }; }) .filter('meta', function() { return function(input, metaName) {