Difference between revisions of "SUNScholar/XMLUI Theme/Common Elements"

From Libopedia
Jump to navigation Jump to search
m
 
(19 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
  '''[[SUNScholar/XMLUI_Theme|Back to XMLUI Theme]]'''
 
  '''[[SUNScholar/XMLUI_Theme|Back to XMLUI Theme]]'''
 
</center>
 
</center>
===Introduction===
+
==Introduction==
 +
'''Also see:''' http://wiki.lib.sun.ac.za/index.php/SUNScholar/XMLUI_Theme/M1/Language
 +
 
 
Some style elements are common to both XMLUI Mirage themes. This wiki page will assist you in defining the configuration for these elements.
 
Some style elements are common to both XMLUI Mirage themes. This wiki page will assist you in defining the configuration for these elements.
 +
 +
The configuration is done with the <tt>'''dspace.cfg'''</tt> file.
 +
 +
Edit the following file:
 +
nano $HOME/{{Source}}/dspace/config/dspace.cfg
 +
 +
==Show counters==
 +
Search for <tt>'''webui.strengths.show'''</tt> and change to <tt>'''true'''</tt>.
 +
==Show recommendations==
 +
Search for <tt>'''webui.suggest.enable'''</tt> and change to <tt>'''true'''</tt>.
 +
==Show file thumbnails with item lists==
 +
Search for <tt>'''xmlui.theme.mirage.item-list.emphasis'''</tt> and uncomment by removing the hash character in front, so that the emphasis becomes "file" not "metadata".
 +
==Remove the "Register" link from the right navigation box==
 +
In the DSpace config file, set the following and rebuild.
 +
xmlui.user.registration=false
 +
==Remove Recent Submissions==
 +
<pre>
 +
Hi Gary,
 +
 +
Remove org.dspace.app.webui.components.RecentSiteSubmissions from
 +
plugin.sequence.org.dspace.plugin.SiteHomeProcessor in
 +
[dspace]/config/dspace.cfg for home page.
 +
 +
and remove org.dspace.app.webui.components.RecentCommunitySubmissions
 +
from plugin.sequence.org.dspace.plugin.CommunityHomeProcessor for
 +
community home page.
 +
 +
Regards,
 +
Keiji Suzuki
 +
</pre>
 +
 +
==Create custom navigation list==
 +
Edit the following file:
 +
https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/core/navigation.xsl#L131
 +
And modify as follows:
 +
<pre>
 +
Hi Charlene,
 +
 +
In navigation.xsl, in the “dri:options” template, instead of:
 +
 +
                <!-- Once the search box is built, the other parts of the options are added -->
 +
                <xsl:apply-templates/>
 +
 +
You should just be able to do:
 +
 +
<xsl:apply-templates select="dri:list[@n='browse']"/>
 +
                <xsl:apply-templates select="dri:list[@n='discovery']"/>
 +
<xsl:apply-templates select="dri:list[@n='context']"/>
 +
<xsl:apply-templates select="dri:list[@n='administrative']"/>
 +
<xsl:apply-templates select="dri:list[@n='account']"/>
 +
 +
 +
If you have any other custom lists, you’ll need to be sure to select for those as well.
 +
 +
 +
Jacob Brown
 +
</pre>
 +
===Related Java Code===
 +
*https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/Navigation.java#L123
 +
*https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/browseArtifacts/Navigation.java#L111
 +
*https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/Navigation.java#L114
 +
 +
==References==
 +
*http://harmful.cat-v.org/software/xml
 +
*https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial
 +
*https://wiki.duraspace.org/display/DSPACE/XMLUI+How+To+Guides
 +
*https://wiki.duraspace.org/display/DSPACE/TechnicalFaq#TechnicalFaq-HowdoIremovethesearchboxfromthefrontpageinXMLUI
 +
[[Category:Customisation]]

Latest revision as of 12:02, 28 May 2016

Back to XMLUI Theme

Introduction

Also see: http://wiki.lib.sun.ac.za/index.php/SUNScholar/XMLUI_Theme/M1/Language

Some style elements are common to both XMLUI Mirage themes. This wiki page will assist you in defining the configuration for these elements.

The configuration is done with the dspace.cfg file.

Edit the following file:

nano $HOME/source/dspace/config/dspace.cfg

Show counters

Search for webui.strengths.show and change to true.

Show recommendations

Search for webui.suggest.enable and change to true.

Show file thumbnails with item lists

Search for xmlui.theme.mirage.item-list.emphasis and uncomment by removing the hash character in front, so that the emphasis becomes "file" not "metadata".

Remove the "Register" link from the right navigation box

In the DSpace config file, set the following and rebuild.

xmlui.user.registration=false

Remove Recent Submissions

Hi Gary,

Remove org.dspace.app.webui.components.RecentSiteSubmissions from
plugin.sequence.org.dspace.plugin.SiteHomeProcessor in 
[dspace]/config/dspace.cfg for home page.

and remove org.dspace.app.webui.components.RecentCommunitySubmissions
from plugin.sequence.org.dspace.plugin.CommunityHomeProcessor for
community home page.

Regards,
Keiji Suzuki

Create custom navigation list

Edit the following file:

https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/core/navigation.xsl#L131

And modify as follows:

Hi Charlene,
 
In navigation.xsl, in the “dri:options” template, instead of:

                <!-- Once the search box is built, the other parts of the options are added -->
                <xsl:apply-templates/>
 
You should just be able to do:
 
		<xsl:apply-templates select="dri:list[@n='browse']"/>
                <xsl:apply-templates select="dri:list[@n='discovery']"/>
		<xsl:apply-templates select="dri:list[@n='context']"/>
		<xsl:apply-templates select="dri:list[@n='administrative']"/>
		<xsl:apply-templates select="dri:list[@n='account']"/>

 
If you have any other custom lists, you’ll need to be sure to select for those as well.
 

Jacob Brown

Related Java Code

References