accurator/commit

Added a header for subdomain choice, resolves #257

authorChris Dijkshoorn
Mon Apr 18 20:04:04 2016 +0200
committerChris Dijkshoorn
Mon Apr 18 20:04:04 2016 +0200
commit5d2597fc7b0f6cac7908cdb8699ddd717f0907ce
treecc5eaa46665892f802b45a15121acac7bea01b6e
parent4c5b80d7231a0697177c32a7bd583597a7171fbc
Diff style: patch stat
diff --git a/rdf/ui/labels.ttl b/rdf/ui/labels.ttl
index e3c0a78..bd6ef58 100644
--- a/rdf/ui/labels.ttl
+++ b/rdf/ui/labels.ttl
@@ -48,10 +48,14 @@ aui:aboutBtnGoBackHome rdfs:subPropertyOf auis:uiLabel .
 aui:domain a auis:UI ;
 	dcterms:title "Accurator domain UI"@en ;
 	aui:domainPageTitle "Select the domain"@en ;
-	aui:domainTxtTitle "In which domain do you want to start tagging?"@en .
+	aui:domainHdr "In which domain do you want to start tagging?"@en ;
+	aui:domainHdrSub "Is there a subdomain in which you want to tag?"@en ;
+	aui:domainTxtAllObjects "All artworks in "@en .
 
 aui:domainPageTitle rdfs:subPropertyOf auis:uiLabel .
-aui:domainTxtTitle rdfs:subPropertyOf auis:uiLabel .
+aui:domainHdr rdfs:subPropertyOf auis:uiLabel .
+aui:domainHdrSub rdfs:subPropertyOf auis:uiLabel .
+aui:domainTxtAllObjects rdfs:subPropertyOf auis:uiLabel .
 
 ##### Topic Screen #####
 
diff --git a/rdf/ui/labels_nl.ttl b/rdf/ui/labels_nl.ttl
index 522873e..434b5f9 100644
--- a/rdf/ui/labels_nl.ttl
+++ b/rdf/ui/labels_nl.ttl
@@ -30,7 +30,9 @@ aui:about a auis:UI ;
 
 aui:domain a auis:UI ;
 	aui:domainPageTitle "Selecteer Domein"@nl ;
-	aui:domainTxtTitle "Aan welk domein wilt u informatie bijdragen?"@nl .
+	aui:domainTxtTitle "Aan welk domein wilt u informatie bijdragen?"@nl ;
+	aui:domainHdrSub "Is er een specifiek subdomein waaraan u informatie wilt bijdragen?"@nl ;
+	aui:domainTxtAllObjects "Alle kunstwerken in het "@nl .
 
 ##### Topic Screen #####
 
diff --git a/web/js/domain.js b/web/js/domain.js
index 61a8eb7..4aec835 100644
--- a/web/js/domain.js
+++ b/web/js/domain.js
@@ -22,7 +22,10 @@ function domainInit() {
 	});
 
 	function drawPage(userData) {
+		var userName = getUserName(userData.user);
+
 		setLinkLogo("profile");
+		populateNavbar(userName, [{link:"profile.html", name:"Profile"}], locale);
 
 		getDomains(domain)
 		.then(function(domains) {
@@ -34,14 +37,23 @@ function domainInit() {
 			return getLabels(locale, ui);
 		})
 		.then(function(labels) {
-			document.title = labels.domainPageTitle;
-			$("#domainTxtTitle").append(labels.domainTxtTitle);
-			var userName = getUserName(userData.user);
-			populateNavbar(userName, [{link:"profile.html", name:"Profile"}], locale);
+			initLabels(labels, domain)
 		});
 	}
 }
 
+function initLabels(labels, domain) {
+	document.title = labels.domainPageTitle;
+
+	if (domain === "generic") {
+		// show initial text
+		$("#domainTxtTitle").append(labels.domainHdr);
+	} else {
+		// show text for subdomains
+		$("#domainTxtTitle").append(labels.domainHdrSub);
+	}
+}
+
 function getDomains(domain) {
 	if (domain === "generic") {
 		return getAvailableDomains();
@@ -66,8 +78,6 @@ function populateDomains(locale, domainLabels) {
 		domainLabels.splice(domainLabels.indexOf("generic"), 1);
 	}
 
-	console.log("labels ", domainLabels);
-
 	// get domain settings for all the domains
 	for (var i=0; i<domainLabels.length; i++) {
 		// add a new row for every two domains
@@ -86,10 +96,8 @@ function populateDomains(locale, domainLabels) {
 
 function addDomain(row, locale) {
 	return function(domainData) {
-		console.log("row ", row, " data ", domainData);
 		return getLabels(locale, domainData.hasLabel)
 		.then(function(labels) {
-			console.log("label ", labels);
 			var topics = null;
 			var subDomains;
 
diff --git a/web/js/profile.js b/web/js/profile.js
index 0e29b2b..2010e3c 100644
--- a/web/js/profile.js
+++ b/web/js/profile.js
@@ -32,7 +32,6 @@ function profileInit() {
 		setLinkLogo("profile");
 		populateNavbar(userName, [], locale);
 
-
 		domainSettings(domain)
 		.then(function(domainData) {
 			return getLabels(locale, domainData.hasUI + "profile");