updates for page management
This commit is contained in:
parent
8ac0e93880
commit
5c3ab93bd5
3 changed files with 20 additions and 6 deletions
|
@ -242,15 +242,17 @@ public class ManagePageGenerator extends BaseEditConfigurationGenerator implemen
|
||||||
Resource dg = qs.getResource("dataGetter");
|
Resource dg = qs.getResource("dataGetter");
|
||||||
Resource dgType = qs.getResource("dataGetterType");
|
Resource dgType = qs.getResource("dataGetterType");
|
||||||
String dgClassName = getClassName(dgType.getURI());
|
String dgClassName = getClassName(dgType.getURI());
|
||||||
|
//literals in scope/on form and fields/ as well as
|
||||||
|
//json representation to be returned to template saved in json array
|
||||||
processExistingDataGetter(counter,
|
processExistingDataGetter(counter,
|
||||||
dg.getURI(),
|
dg.getURI(),
|
||||||
dgClassName, editConfig, queryModel, jsonArray);
|
dgClassName, editConfig, queryModel, jsonArray);
|
||||||
addJSONArrayToFormSpecificData(jsonArray, editConfig);
|
|
||||||
//Get the util class for this type and add
|
|
||||||
//Values in scope/Literals and URIs on form/Fields on form that correspond
|
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
//add json array to form specific data to be returned
|
||||||
|
addJSONArrayToFormSpecificData(jsonArray, editConfig);
|
||||||
|
|
||||||
|
|
||||||
} catch(Exception ex) {
|
} catch(Exception ex) {
|
||||||
log.error("Error occurred in executing query " + querystr, ex);
|
log.error("Error occurred in executing query " + querystr, ex);
|
||||||
|
|
|
@ -35,6 +35,13 @@ display:Home
|
||||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.BrowseDataGetter> .
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.BrowseDataGetter> .
|
||||||
|
|
||||||
########## Page Management ##########
|
########## Page Management ##########
|
||||||
|
display:pageListPage
|
||||||
|
a display:Page ;
|
||||||
|
display:title "Pages" ;
|
||||||
|
display:urlMapping "/pageList" ;
|
||||||
|
display:requiresBodyTemplate "pageList.ftl" ;
|
||||||
|
display:hasDataGetter display:pageListData .
|
||||||
|
|
||||||
display:pageListData
|
display:pageListData
|
||||||
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
a <java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>;
|
||||||
display:queryModel <vitro:contextDisplayModel> ;
|
display:queryModel <vitro:contextDisplayModel> ;
|
||||||
|
@ -50,4 +57,5 @@ display:pageListData
|
||||||
OPTIONAL{ ?pageUri display:title ?title. }
|
OPTIONAL{ ?pageUri display:title ?title. }
|
||||||
OPTIONAL {?pageUri display:requiresBodyTemplate ?template .}
|
OPTIONAL {?pageUri display:requiresBodyTemplate ?template .}
|
||||||
OPTIONAL {?menuItem display:toPage ?pageUri .}
|
OPTIONAL {?menuItem display:toPage ?pageUri .}
|
||||||
} """ .
|
} """ .
|
||||||
|
|
|
@ -18,12 +18,16 @@ var pageManagementUtils = {
|
||||||
this.bindEventListeners();
|
this.bindEventListeners();
|
||||||
this.initDisplay();
|
this.initDisplay();
|
||||||
//if edit, then generate existing content
|
//if edit, then generate existing content
|
||||||
if(this.menuAction != null) {
|
if(this.menuAction != null && this.menuAction == "Edit") {
|
||||||
this.initExistingContent();
|
this.initExistingContent();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initExistingContent:function() {
|
initExistingContent:function() {
|
||||||
this.generateExistingContentSections();
|
this.generateExistingContentSections();
|
||||||
|
//display more content button - will need to review how to hit save etc.
|
||||||
|
//Don't need to display this b/c already in appended section
|
||||||
|
//pageManagementUtils.moreContentButton.show();
|
||||||
|
//Need to have additional save button
|
||||||
},
|
},
|
||||||
initReverseURIToLabel:function() {
|
initReverseURIToLabel:function() {
|
||||||
if(this.dataGetterLabelToURI != null) {
|
if(this.dataGetterLabelToURI != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue