Revision: 1425
http://geonetwork.svn.sourceforge.net/geonetwork/?rev=1425&view=revAuthor: volkermische
Date: 2008-07-23 08:35:41 +0000 (Wed, 23 Jul 2008)
Log Message:
-----------
- New "XForms Editor" link in GeoNetwork
- XForms Editor: new documents can be created from templates and recently changed documents can be edited
Modified Paths:
--------------
sandbox/geonetworkui/BlueNetMEST/web/geonetwork/WEB-INF/config-metadata.xml
sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xml/user-profiles.xml
sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/banner.xsl
sandbox/geonetworkui/BlueNetMEST/web/orbeon/src/home.xhtml
Added Paths:
-----------
sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/xforms_metadata-recentadditions.xsl
Modified: sandbox/geonetworkui/BlueNetMEST/web/geonetwork/WEB-INF/config-metadata.xml
===================================================================
--- sandbox/geonetworkui/BlueNetMEST/web/geonetwork/WEB-INF/config-metadata.xml 2008-07-23 04:54:40 UTC (rev 1424)
+++ sandbox/geonetworkui/BlueNetMEST/web/geonetwork/WEB-INF/config-metadata.xml 2008-07-23 08:35:41 UTC (rev 1425)
@@ -207,6 +207,17 @@
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <service name="metadata.recent.additions.embedded.xml">
+ <output sheet="xforms_metadata-recentadditions.xsl" contentType="text/xml; charset=UTF-8">
+ <call name="latestUpdated" class=".guiservices.metadata.GetLatestUpdated">
+ <param name="maxItems" value="10" />
+ <param name="timeBetweenUpdates" value="10" />
+ </call>
+ </output>
+ </service>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
<service name="metadata.create.form">
<output sheet="metadata-create.xsl">
<call name="groups" class=".guiservices.groups.GetMine"/>
Modified: sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xml/user-profiles.xml
===================================================================
--- sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xml/user-profiles.xml 2008-07-23 04:54:40 UTC (rev 1424)
+++ sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xml/user-profiles.xml 2008-07-23 08:35:41 UTC (rev 1425)
@@ -197,6 +197,7 @@
<allow service="metadata.show"/>
<allow service="metadata.show.embedded"/> <!-- ETj -->
<allow service="metadata.recent.additions.embedded"/>
+ <allow service="metadata.recent.additions.embedded.xml"/>
<allow service="remote.show"/>
<allow service="rating.popup"/>
Modified: sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/banner.xsl
===================================================================
--- sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/banner.xsl 2008-07-23 04:54:40 UTC (rev 1424)
+++ sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/banner.xsl 2008-07-23 08:35:41 UTC (rev 1425)
@@ -23,6 +23,8 @@
<td class="banner-menu">
<a class="banner" onclick="return checkReset();" href="{/root/gui/locService}/main.home"><xsl:value-of select="/root/gui/strings/home"/></a>
|
+ <a class="banner" href="/orbeon/gn/home?geonetwork={/root/gui/env/server/host}:{/root/gui/env/server/port}{/root/gui/url}">XForms Editor</a>
+ |
<xsl:if test="/root/gui/services/service/@name='metadata.add.form'">
<a class="banner" href="javascript:void(0)" onclick="popEditorViewer('{/root/gui/locService}/metadata.create.form')"><xsl:value-of select="/root/gui/strings/newMetadata"/></a>
|
Added: sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/xforms_metadata-recentadditions.xsl
===================================================================
--- sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/xforms_metadata-recentadditions.xsl (rev 0)
+++ sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/xforms_metadata-recentadditions.xsl 2008-07-23 08:35:41 UTC (rev 1425)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
+ xmlns:xh="
http://www.w3.org/1999/xhtml"
+ xmlns:xf="
http://www.w3.org/2002/xforms"
+ xmlns:ev="
http://www.w3.org/2001/xml-events"
+ xmlns:widget="
http://orbeon.org/oxf/xml/widget"
+
+ xmlns:geonet="
http://www.fao.org/geonetwork"
+ xmlns:gmd="
http://www.isotc211.org/2005/gmd"
+ xmlns:gco="
http://www.isotc211.org/2005/gco"
+ exclude-result-prefixes="#all"
+ >
+
+ <xsl:param name="geonetwork-location" select="concat('
http://',/root/gui/env/server/host,':',/root/gui/env/server/port,/root/gui/url)"/>
+ <xsl:param name="username"/>
+ <xsl:param name="password"/>
+
+ <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
+
+
+
+ <xsl:template match="/">
+ <recent-documents>
+ <item>
+ <label>Please select a metadata document</label>
+ <value>-1</value>
+ </item>
+ <xsl:for-each select="/root/gui/latestUpdated/*">
+ <item>
+ <label><xsl:value-of select="gmd:metadataStandardName/gco:CharacterString"/></label>
+ <value><xsl:value-of select="geonet:info/id"/></value>
+ </item>
+ </xsl:for-each>
+ </recent-documents>
+
+ </xsl:template>
+</xsl:stylesheet>
Property changes on: sandbox/geonetworkui/BlueNetMEST/web/geonetwork/xsl/xforms_metadata-recentadditions.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/xsl
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: sandbox/geonetworkui/BlueNetMEST/web/orbeon/src/home.xhtml
===================================================================
--- sandbox/geonetworkui/BlueNetMEST/web/orbeon/src/home.xhtml 2008-07-23 04:54:40 UTC (rev 1424)
+++ sandbox/geonetworkui/BlueNetMEST/web/orbeon/src/home.xhtml 2008-07-23 08:35:41 UTC (rev 1425)
@@ -6,25 +6,59 @@
<head>
<title>GeoNetwork XForms Metadata Editor</title>
<xf:model xmlns:xforms="
http://www.w3.org/2002/xforms">
- <!-- for storing username, password -->
+ <!-- for storing username, password, location of GeoNetwork,
+ URL for recent documents, ID of the currently selected document -->
<xf:instance id="data">
<data xmlns="">
<username/>
<password/>
<geonetwork-location/>
+ <recent-documents-url/>
+ <id>-1</id>
</data>
</xf:instance>
- <!-- for storing the link to the edit metadata page temporary -->
- <xf:instance id="edit-page">
+
+ <!-- for storing the recent documents -->
+ <xf:instance id="recent-documents-request">
+ <data xmlns="">
+ <username/>
+ <password/>
+ </data>
+ </xf:instance>
+
+ <!-- for storing the recent documents -->
+ <xf:instance id="recent-documents">
+ <recent-documents xmlns="">
+ <item>
+ <label>Please enter username and password and click on "Get list of recently changed documents"</label>
+ <value>-1</value>
+ </item>
+ </recent-documents>
+ </xf:instance>
+
+
+ <!-- for storing the link to the next page (either editing or creating
+ new metadata) -->
+ <xf:instance id="next-page">
<url xmlns=""/>
</xf:instance>
+
+ <!-- for storing the link to the recent documents page temporary -->
+ <xf:instance id="recent-documents-page">
+ <url xmlns=""/>
+ </xf:instance>
<xf:action ev:event="xforms-model-construct-done">
- <xf:setvalue ref="instance('data')/geonetwork-location" value="xxforms:get-request-parameter('geonetwork')" />
+ <xf:setvalue ref="instance('data')/geonetwork-location" value="xxforms:get-request-parameter('geonetwork')"/>
+ <xf:setvalue ref="instance('data')/recent-documents-url" value="concat('
http://', instance('data')/geonetwork-location, '/srv/en/metadata.recent.additions.embedded.xml')"/>
</xf:action>
+ <!-- XXX action with {}-syntax (Attribute Value Templates (AVT) is non-standard and Orbeon specific! instance('data')/recent-documents-url-->
+ <xf:submission id="get-recent-documents"
+ method="get" action="{instance('recent-documents-page')}"
+ replace="instance" instance="recent-documents" ref="instance('data')/geonetwork-location"/>
</xf:model>
</head>
<body>
@@ -37,15 +71,43 @@
</xf:input>
</xf:group>
- <xf:trigger>
- <xf:label>Create new document</xf:label>
- <xf:action ev:event="DOMActivate">
- <xf:setvalue ref="instance('edit-page')" value="concat('/gn/new&geonetwork=', instance('data')/geonetwork-location, '&username=', instance('data')/username, '&password=', instance('data')/password)"/>
- <xf:load ref="instance('edit-page')"/>
- </xf:action>
- </xf:trigger>
+ <xf:group class="gn-group">
+ <xf:trigger>
+ <xf:label>Create new document</xf:label>
+ <xf:action ev:event="DOMActivate">
+ <xf:setvalue ref="instance('next-page')" value="concat('/gn/new&geonetwork=', instance('data')/geonetwork-location, '&username=', instance('data')/username, '&password=', instance('data')/password)"/>
+ <xf:load ref="instance('next-page')"/>
+ </xf:action>
+ </xf:trigger>
+ </xf:group>
+
+ <xf:group class="gn-group">
+ <xf:submit submission="get-recent-documents">
+ <xf:label>Get list of recently changed documents</xf:label>
+ <xf:action ev:event="DOMActivate">
+ <xf:setvalue ref="instance('recent-documents-page')" value="concat(instance('data')/recent-documents-url, '?username=', instance('data')/username, '&password=', instance('data')/password)"/>
+ </xf:action>
+ </xf:submit>
+
-<!--
+ <xf:select1 ref="instance('data')/id">
+ <xf:label>Recent changes</xf:label>
+ <xf:itemset nodeset="instance('recent-documents')/item">
+ <xf:label ref="label"/>
+ <xf:value ref="value"/>
+ </xf:itemset>
+ </xf:select1>
+
+ <xf:trigger>
+ <xf:label>Edit this document</xf:label>
+ <xf:action ev:event="DOMActivate">
+ <xf:setvalue ref="instance('next-page')" value="concat('/gn/edit/', instance('data')/id, '&geonetwork=', instance('data')/geonetwork-location, '&username=', instance('data')/username, '&password=', instance('data')/password)"/>
+ <xf:load ref="instance('next-page')"/>
+ </xf:action>
+ </xf:trigger>
+
+ </xf:group>
+<!--
<widget:xforms-instance-inspector xmlns:widget="
http://orbeon.org/oxf/xml/widget"/>
-->
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
GeoNetwork-commit mailing list
GeoNetwork-commit@...
https://lists.sourceforge.net/lists/listinfo/geonetwork-commit