Switching from JSPUI to XMLUI - Customize the Simple Item record

450 views
Skip to first unread message

Tom Avino

unread,
Oct 5, 2016, 11:38:03 AM10/5/16
to DSpace Technical Support
We are new to XMLUI.  We are in the process of upgrading dspace 3.3(JSPUI) to 5.5(XMLUI).
I am trying to customize which metadata items are displayed in the Simple item records screen.  JSPUI uses the dspace.cfg file to do this.  
Can someone point me in the right direction to customize this using XMLUI?

Thank you,

LITES II Application Developer | SAIC

o: 757.864-8495 | thomas....@nasa.gov

f:  757.864-6649 | thomas...@saic.com

Copeland, Matthew M

unread,
Oct 5, 2016, 1:59:08 PM10/5/16
to Tom Avino, DSpace Technical Support

As far as I know, the only way to modify that view in the xmlui is to modify the xsl file.   Assuming you are on a unix based system, you can do the following command at the base of your source tree to find the file.

 

Ø  find . –name item-view.xsl –print

 

You will most likely see multiple files, and need to pick the one appropriate for the theme you are working with.  Also, be sure that if you modify the file, you keep the changes in the modules directory version, to make updating later easier  (Learned this the hard way), rather than modifying it in place.

 

Matthew

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Hilton Gibson

unread,
Oct 6, 2016, 8:22:12 AM10/6/16
to Copeland, Matthew M, Tom Avino, DSpace Technical Support
Hi Tom,

Assuming that you are using Mirage 2 as your theme.
And see attached for our custom version.

Cheers

hg
--
Hilton Gibson
Stellenbosch University Library
item-view.xsl

Tom Avino

unread,
Oct 6, 2016, 9:30:23 AM10/6/16
to DSpace Technical Support, mat...@ku.edu, toma...@gmail.com
Hilton,

We are using Mirage, not Mirage 2.  What do I need to do to install Mirage 2?

Thanks,

Tom

Hilton Gibson

unread,
Oct 6, 2016, 9:39:01 AM10/6/16
to Tom Avino, DSpace Technical Support, mat...@ku.edu
Hi Tom,


Cheers

hg

Tom Avino

unread,
Oct 6, 2016, 10:35:24 AM10/6/16
to DSpace Technical Support, toma...@gmail.com, mat...@ku.edu
One quick question, we are running Dspace 5 on a RedHat 6, not Ubuntu.  How does this affect installing the "sudo apt-get install git curl maven ruby-compass default-jdk default-jre" command?
We also already have Maven installed.

Thanks

Hilton Gibson

unread,
Oct 6, 2016, 11:00:43 AM10/6/16
to Tom Avino, DSpace Technical Support, mat...@ku.edu
Hi Tom,

I believe Deadbat (Redhat) uses "yum" for software management.

Cheers

hg

Shaun donovan

unread,
Oct 7, 2016, 4:09:56 AM10/7/16
to Tom Avino, DSpace Technical Support, mat...@ku.edu
Hi Tom.

Without changing to Mirage2, you can edit [dspace]/webapps/xmlui/themes/Mirage/lib/xsl/aspect/artifactbrowser/item-view.xsl

For example, I added the dc.type field to the short item view by adding the following at about line 292:

          <xsl:when test="$clause = 5 and (dim:field[@element='type' and not(@qualifier) and descendant::text()])">
                <div class="simple-item-view-type">
                   <span class="bold"><i18n:text>xmlui.dri2xhtml.METS-1.0.item-type</i18n:text>:</span>
                   <span>
                   <xsl:for-each select="dim:field[@element='type' and not(@qualifier)]">
                      <xsl:copy-of select="./node()"/>
                   </xsl:for-each>
                   </span>
               </div>
              <xsl:call-template name="itemSummaryView-DIM-fields">
                <xsl:with-param name="clause" select="($clause + 1)"/>
                <xsl:with-param name="phase" select="$otherPhase"/>
              </xsl:call-template>
          </xsl:when>

You must just be careful with the $clause parameter. If you insert a field, all of the $clause parameters after the inserted one must be incremented, and further down in the file you will see:

            <!-- IMPORTANT: This test should be updated if clauses are added! -->
            <xsl:if test="$clause &lt; 10">

You need to increment the clause there as well for each field added.

You can edit this file in place, but if you want it to survive re-builds, you need to add it to [dspace-src]/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/aspect/artifactbrowser/item-view.xsl
I personally just rsync my [dspace]/webapps/xmlui/themes/ directory to [dspace-src]/dspace-xmlui/src/main/webapp/themes/ directory, so any changes will survive a re-build.

Cheers.

Shaun.
--

Shaun donovan managing director

sha...@teqcle.co.za /

Teqcle Information Technologies (Pty) Ltd
Mobile: +27 83 388 4447 / Office: +27 12 665 2723 / Fax: +27 86 637 5495
Unit 21; Cambridge Office Park; 5 Bauhinia Street; Highveld Techno Park; Centurion
www.teqcle.co.za


The views expressed in this email including attachments are, unless otherwise stated, those of the author. The information in this email is confidential and is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted in reliance on this, is prohibited and may be unlawful. Whilst all reasonable steps are taken to ensure the accuracy and integrity of information and data transmitted electronically and to preserve the confidentiality thereof, no liability or responsibility whatsoever is accepted if information or data is, for whatever reason, corrupted or does not reach its intended destination.


If you are satisfied with our service, please search for Teqcle on Google and leave a review”


Tom Avino

unread,
Oct 10, 2016, 10:20:43 AM10/10/16
to DSpace Technical Support, toma...@gmail.com, mat...@ku.edu
Thank you so much.  That worked very well!  I think I have a better understanding now.
Reply all
Reply to author
Forward
0 new messages