Hello Christian & Claudia,
I corrected this problem in my DSpace 1.7.2 instance by modifying the
Navigation.java code in the "viewArtifacts" aspect as follows:
-bash-3.2$ svn diff -r 4826:4833
Index:
dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/viewArtifacts/Navigation.java
===================================================================
---
dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/viewArtifacts/Navigation.java
(revision 4826)
+++
dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/viewArtifacts/Navigation.java
(revision 4833)
@@ -146,6 +146,13 @@
pageMeta.addMetadata("focus","container").addContent("hdl:"+dso.getHandle());
this.getObjectManager().manageObject(dso);
}
+
+ // Try to add a missing metadata element that governs search
box labelling
+ if (dso instanceof Community)
+ {
+
pageMeta.addMetadata("focus","containerType").addContent("type:community");
+ }
+
}
}
}
Regards,
Scott
On 10/10/2011 7:31 AM, � wrote:
> Hello Christian,
>
> seems as if no element 'focus' with the qualifier 'containerType' is
> added to the pageMeta, so the check in navigation.xsl will result in
> collection.
>
> Hope that helps
>
> Claudia J�rgen
>
>
> Am 10.10.2011 14:58, schrieb Christian Voelker:
>> Hello,
>>
>> in Mirage theme, the search box on the upper right hand contains a context
>> radio button and is defined in lib/xsl/core/navigation.xsl. The correspoding
>> code snippet follows below. It should make a difference whether you are in a
>> Community or in a Collection and expose different labels on the radio
>> button. The corresponding messages are as follows:
>>
>> <message key="xmlui.dri2xhtml.structural.search">Search DSpace</message>
>> <message key="xmlui.dri2xhtml.structural.search-advanced">Advanced
>> Search</message>
>> <message key="xmlui.dri2xhtml.structural.search-in-community">This
>> Community</message>
>> <message key="xmlui.dri2xhtml.structural.search-in-collection">This
>> Collection</message>
>>
>> However, it does not work. You can verify the effect by looking at
>> demo.dspace.org. I have the same here in my local 1.7.2, in either english
>> oder localized version:
>>
>> <http://demo.dspace.org/xmlui/handle/10673/6648>
>>
>> I dont really understand what is going wrong. I was just searching for an
>> example to decide on the status of being logged in from within a .xsl file
>> when I came across this. I was not able to fix it myself and cant provide a
>> patch. The XSL looks fine for me, but I am a total beginner at XSL, started
>> to modify a theme for the first time only yesterday.
>>
>>
>> While reporting this issue I want to mention a whish. Splitting up the
>> "xmlui.dri2xhtml.structural.search" in two separate messages could help to
>> improve the interface. The current message should stay the same as now and
>> be used only for the search box headline. The button label for sitewide
>> search should use a new message which is more destinctive and read something
>> like this I guess:
>>
>> <message key="xmlui.dri2xhtml.structural.search-in-whole-site">Complete
>> Repository</message>
>>
>> Bye, Christian
>>
>>
>> <h1 id="ds-search-option-head" class="ds-option-set-head">
>> <i18n:text>xmlui.dri2xhtml.structural.search</i18n:text>
>> </h1>
>> (�)
>> <xsl:if
>> test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='focus'][@qualifier='container']">
>> <label>
>> <input id="ds-search-form-scope-all"
>> type="radio" name="scope" value=""
>> checked="checked"/>
>>
>> <i18n:text>xmlui.dri2xhtml.structural.search</i18n:text>
>> </label>
>> <br/>
>> <label>
>> <input
>> id="ds-search-form-scope-container" type="radio" name="scope">
>> <xsl:attribute name="value">
>> <xsl:value-of
>>
>> select="substring-after(/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='focus'][@qualifier='container'],':')"/>
>> </xsl:attribute>
>> </input>
>> <xsl:choose>
>> <xsl:when
>>
>> test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='focus'][@qualifier='containerType']/text()
>> = 'type:community'">
>>
>> <i18n:text>xmlui.dri2xhtml.structural.search-in-community</i18n:text>
>> </xsl:when>
>> <xsl:otherwise>
>>
>> <i18n:text>xmlui.dri2xhtml.structural.search-in-collection</i18n:text>
>> </xsl:otherwise>
>>
>> </xsl:choose>
>> </label>
>> </xsl:if>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure contains a
>> definitive record of customers, application performance, security
>> threats, fraudulent activity and more. Splunk takes this data and makes
>> sense of it. Business sense. IT sense. Common sense.
>> http://p.sf.net/sfu/splunk-d2dcopy1
>> _______________________________________________
>> DSpace-tech mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
--
Scott Thurston [email protected]
NOAA / NGDC / WDC http://www.ngdc.noaa.gov/
Marine Geology& Geophysics 303-497-4411 (phone)
325 Broadway E/GC3 303-497-6513 (fax)
Boulder, CO 80305-3337
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech