cluster_search_ui/commit

Now loads carrousel items specific to specified ui, resolves #9

authorChris Dijkshoorn
Sun Dec 21 09:29:08 2014 +0100
committerChris Dijkshoorn
Sun Dec 21 09:29:08 2014 +0100
commita389728d23633e56cf6dc5294d5d1989a90f683a
tree5c1a6a7f888093f923da340c4bf3f827400989d5
parent7abfb323aa6cce218fcf55fbd872228f817a6931
Diff style: patch stat
diff --git a/lib/cluster_search_ui/web_ui_dcg.pl b/lib/cluster_search_ui/web_ui_dcg.pl
index cee6200..07d895d 100644
--- a/lib/cluster_search_ui/web_ui_dcg.pl
+++ b/lib/cluster_search_ui/web_ui_dcg.pl
@@ -84,12 +84,14 @@ get_image_options(Uri, ImageUrl) :-
 %
 %	Retrieve items for the carousel from the RDF store.
 get_carousel_items(CarouselItems) :-
+	setting(cluster_search_ui:ui, UI),
     findall(item(LocationAbsolute, Action, Title),
 	    (	rdf(Item, rdf:type, ui:carouselItem),
-		rdf(Item, ui:imageLocation, literal(LocationRelative)),
-		http_absolute_location(img(LocationRelative), LocationAbsolute, []),
-		rdf(Item, ui:action, literal(Action)),
-		rdf(Item, dcterms:title, literal(lang(en, Title)))
+			rdf(Item, ui:elementOf, UI),
+			rdf(Item, ui:imageLocation, literal(LocationRelative)),
+			http_absolute_location(img(LocationRelative), LocationAbsolute, []),
+			rdf(Item, ui:action, literal(Action)),
+			rdf(Item, dcterms:title, literal(lang(en, Title)))
 	    ),
 	    CarouselItems).