SUNScholar/XMLUI Theme/M1/Page Structure
Back to Mirage 1 Modification
Contents
Move front page search above front page community list
See:
- http://sourceforge.net/p/dspace/mailman/message/31869335/
- https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/SiteViewer.java
- https://github.com/DSpace/DSpace/commit/4b6322d361fcfc49743e5ab476408f3ddeb0a208
Hi Kev,
There are a couple of ways you could do that.
I'll write one that I think requires the least amount of work:
Put this in your theme's XSL file:
<xsl:template name="disable_front-page-search" match="dri:div[@id='aspect.discovery.SiteViewer.div.front-page-search']">
</xsl:template>
And the following block to the appropriate place in [dspace]/config/news-xmlui.xml.
This one assumes you have Discovery enabled; if you don't, just use the appropriate snippet from DRI and change the "id" attribute.
<div id="aspect.discovery.SiteViewer.div.front-page-search-custom" interactive="yes" rend="primary" action="/discover" n="front-page-search" method="get"> <head>Search DSpace</head> <p>Enter some text in the box below to search DSpace.</p> <p> <field id="aspect.discovery.SiteViewer.field.query" n="query" type="text"> <params/> </field> <field id="aspect.discovery.SiteViewer.field.submit" n="submit" type="button"> <params/> <value type="raw">Go</value> </field> </p> </div>
Regards,
~~helix84
Go to the following folder:
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/core
Open the following file:
nano navigation.xsl
Add the following to the top of the file:
<!-- Remove the "Community" link - H Gibson - 2012 --> <xsl:template name="disable-1st-link-in-browse-menu" match="dri:list[not(@type) and @id='aspect.browseArtifacts.Navigation.list.global']/dri:item[1]" mode="nested"> </xsl:template>
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Go to the following folder:
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/core
Open the following file:
nano navigation.xsl
Go to line 55 approx and comment out as follows or you can simply delete the text:
<!--
<form id="ds-search-form" method="post">
<xsl:attribute name="action">
<xsl:value-of
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='search'][@qualifier='simpleURL']"/>
</xsl:attribute>
<fieldset>
<input class="ds-text-field " type="text">
<xsl:attribute name="name">
<xsl:value-of
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='search'][@qualifier='queryField']"/>
</xsl:attribute>
</input>
<input class="ds-button-field " name="submit" type="submit" i18n:attr="value"
value="xmlui.general.go">
<xsl:attribute name="onclick">
<xsl:text>
var radio = document.getElementById("ds-search-form-scope-container");
if (radio != undefined && radio.checked)
{
var form = document.getElementById("ds-search-form");
form.action=
</xsl:text>
<xsl:text>"</xsl:text>
<xsl:value-of
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='contextPath']"/>
<xsl:text>/handle/" + radio.value + "</xsl:text>
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='search'][@qualifier='simpleURL']"/>
<xsl:text>" ; </xsl:text>
<xsl:text>
}
</xsl:text>
</xsl:attribute>
</input>
<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>
</fieldset>
</form>
-->
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Remove duplicate "Login" link above the top banner logo
Go to the following folder:
cd $HOME/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/core
Open the following file:
nano page-structure.xsl
Go to line 337 approx and comment out as follows or you can simply delete the text:
<!--
<xsl:choose>
<xsl:when test="/dri:document/dri:meta/dri:userMeta/@authenticated = 'yes'">
<div id="ds-user-box">
<p>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='url']"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.profile</i18n:text>
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='firstName']"/>
<xsl:text> </xsl:text>
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='lastName']"/>
</a>
<xsl:text> | </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='logoutURL']"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.logout</i18n:text>
</a>
</p>
</div>
</xsl:when>
<xsl:otherwise>
<div id="ds-user-box">
<p>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='loginURL']"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.login</i18n:text>
</a>
</p>
</div>
</xsl:otherwise>
</xsl:choose>
-->
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)