Skip to content

Commit

Permalink
Merge branch 'master' into geocat/trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Eichar committed Jun 22, 2012
2 parents d9784a9 + ba8abea commit 795c310
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ GeoNetwork.lang.en = {
'gazetteerAddressField1Label': "Postcode",
'gazetteerAddressField2Label': "Street",
'gazetteerAddressField3Label': "Place",
'gazetteerAddressField4Label': "'Gemeente'",
'gazetteerAddressField4Label': "Municipality",
'gazetteerAddressField5Label': "House number",
'searchOptionButton': "Search",
'resetSearchForm': "Reset search form values.",
Expand All @@ -129,7 +129,7 @@ GeoNetwork.lang.en = {
'errorTitle': "Error",
'SearchOptionLoadFailureMsg': "No results available. \n The service may be unavailable. \n",
'gazetteerTooltipTitle': "Search based on an address",
'gazetteerTooltipText': "Search for a location, based on postcode, street name, 'gemeente' or place.",
'gazetteerTooltipText': "Search for a location, based on postcode, street name, municipality or place.",
'SearchOptionNoResults': "No results found",
'zoomlayerTooltipTitle': "Zoom to layer",
'zoomlayerTooltipText': "Use this button to go to the full extent of the selected layer.",
Expand Down
31 changes: 15 additions & 16 deletions web/src/main/java/org/fao/geonet/kernel/DataManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3109,22 +3109,6 @@ private Element buildInfoElem(ServiceContext context, String id, String version)
if (version != null)
addElement(info, Edit.Info.Elem.VERSION, version);

// add operations
Element operations = accessMan.getAllOperations(context, id, context.getIpAddress());
Set<String> hsOper = accessMan.getOperations(context, id, context.getIpAddress(), operations);

addElement(info, Edit.Info.Elem.VIEW, String.valueOf(hsOper.contains(AccessManager.OPER_VIEW)));
addElement(info, Edit.Info.Elem.NOTIFY, String.valueOf(hsOper.contains(AccessManager.OPER_NOTIFY)));
addElement(info, Edit.Info.Elem.DOWNLOAD, String.valueOf(hsOper.contains(AccessManager.OPER_DOWNLOAD)));
addElement(info, Edit.Info.Elem.DYNAMIC, String.valueOf(hsOper.contains(AccessManager.OPER_DYNAMIC)));
addElement(info, Edit.Info.Elem.FEATURED, String.valueOf(hsOper.contains(AccessManager.OPER_FEATURED)));


if (!hsOper.contains(AccessManager.OPER_DOWNLOAD)) {
boolean gDownload = Xml.selectNodes(operations, "guestoperations/record[operationid="+AccessManager.OPER_DOWNLOAD+" and groupid='-1']").size() == 1;
addElement(info, Edit.Info.Elem.GUEST_DOWNLOAD, gDownload+"");
}

buildExtraMetadataInfo(context, id, info);

if(accessMan.isVisibleToAll(dbms, id)) {
Expand Down Expand Up @@ -3247,6 +3231,21 @@ public void buildExtraMetadataInfo(ServiceContext context, String id,
if (accessMan.isOwner(context, id)) {
addElement(info, Edit.Info.Elem.OWNER, "true");
}

Element operations = accessMan.getAllOperations(context, id, context.getIpAddress());
Set<String> hsOper = accessMan.getOperations(context, id, context.getIpAddress(), operations);

addElement(info, Edit.Info.Elem.VIEW, String.valueOf(hsOper.contains(AccessManager.OPER_VIEW)));
addElement(info, Edit.Info.Elem.NOTIFY, String.valueOf(hsOper.contains(AccessManager.OPER_NOTIFY)));
addElement(info, Edit.Info.Elem.DOWNLOAD, String.valueOf(hsOper.contains(AccessManager.OPER_DOWNLOAD)));
addElement(info, Edit.Info.Elem.DYNAMIC, String.valueOf(hsOper.contains(AccessManager.OPER_DYNAMIC)));
addElement(info, Edit.Info.Elem.FEATURED, String.valueOf(hsOper.contains(AccessManager.OPER_FEATURED)));

if (!hsOper.contains(AccessManager.OPER_DOWNLOAD)) {
boolean gDownload = Xml.selectNodes(operations, "guestoperations/record[operationid="+AccessManager.OPER_DOWNLOAD+" and groupid='-1']").size() == 1;
addElement(info, Edit.Info.Elem.GUEST_DOWNLOAD, gDownload+"");
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public Element exec(Element params, ServiceContext context) throws Exception {
}
// SOAP encoding
else if(params.getName().equals("Envelope")) {
Element soapBody = params.getChild("Body");
Element soapBody = params.getChild("Body",
org.jdom.Namespace.getNamespace("http://www.w3.org/2003/05/soap-envelope"));
List payloadList = soapBody.getChildren();
Element payload = (Element)payloadList.get(0);
operation = payload.getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public Element exec(Element params, ServiceContext context) throws Exception {
}
// SOAP encoding
else if(params.getName().equals("Envelope")) {
Element soapBody = params.getChild("Body");
Element soapBody = params.getChild("Body",
org.jdom.Namespace.getNamespace("http://www.w3.org/2003/05/soap-envelope"));
List payloadList = soapBody.getChildren();
Element payload = (Element)payloadList.get(0);
operation = payload.getName();
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/scripts/map/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ GeoNetwork.lang.en = {
'errorTitle': "Error",
'SearchOptionLoadFailureMsg': "No results available. \n The service may be unavailable. \n",
'gazetteerTooltipTitle': "Search based on an address",
'gazetteerTooltipText': "Search for a location, based on postcode, street name, 'gemeente' or place.",
'gazetteerTooltipText': "Search for a location, based on postcode, street name, municipality or place.",
'SearchOptionNoResults': "No results found",
'zoomlayerTooltipTitle': "Zoom to layer",
'zoomlayerTooltipText': "Use this button to go to the full extent of the selected layer.",
Expand Down
4 changes: 2 additions & 2 deletions web/src/main/webapp/xsl/searchform_advanced.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,14 @@
</input>
</td>
<td>
<input name="dynamic" id="dynamic" type="checkbox">
<input name="dynamic" id="dynamic" type="checkbox" value="true">
<xsl:if test="/root/gui/searchDefaults/dynamic='true'">
<xsl:attribute name="checked">CHECKED</xsl:attribute>
</xsl:if>
<label for="dynamic"><xsl:value-of select="/root/gui/strings/dynamic"/></label>
</input>
<br/>
<input name="download" id="download" type="checkbox">
<input name="download" id="download" type="checkbox" value="true">
<xsl:if test="/root/gui/searchDefaults/download='true'">
<xsl:attribute name="checked">CHECKED</xsl:attribute>
</xsl:if>
Expand Down

0 comments on commit 795c310

Please sign in to comment.