Hi Don,

On 10/28/2016 02:20 AM, Donald Bynum wrote:
Two issues here (maybe not issues, but certainly odd).  I am using xmlui in DSpace 5.5.  I added a new bitstream format for zip files.  I associated the .zip extension.  When I submit an item with a zip file, it picks up the format, but when I view the associated item, the Format tag has the MIME Type text rather than the Name or Description as specified in the format metadata.  How can I change that, so the Name or Description rather the Mime Type is displayed in the Format tag in the item view?

If I upload a .docx bitstream, it picks up the Microsoft Word XML format type (that is the only one with a .docx extension).  However, in the item view the Format tag has Microsoft Word 2007.  I cannot for the life of me see where the "Microsoft Word 2007" is coming from.  If I look at the Bitstream format it has "Microsoft Word XML" as the Name and Description and quite a lengthy Mime Type.

Between the two issues above, I don't see a consistency in what is in the format definitions and what is being displayed on the item view page.

What theme are you using? The format text shown on item pages at least in the Mirage / Mirage 2 themes doesn't come from the bitstream format registry. For Mirage 2, you can see how it works here: https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/item-view.xsl#L733

The getFileTypeDesc template takes the mimetype and concatenates it to form an i18n key. The value for these keys (where they exist) are in the main messages.xml file, see https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-xmlui/src/main/webapp/i18n/messages.xml#L2278 -- you can see the .docx one here: https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-xmlui/src/main/webapp/i18n/messages.xml#L2296
 <message key="xmlui.dri2xhtml.mimetype.application/vnd.openxmlformats-officedocument.wordprocessingml.document">Microsoft Word 2007</message>


So you'd just add your own entry to messages.xml for the zip file mimetype if you'd like that to be shown on the item page. As always, if you've copied the [dspace-src]/dspace-xmlui/src/main/webapp/i18n/messages.xml file to the corresponding directory under [dspace-src]/dspace/modules/xmlui, edit the copy rather than the original.

cheers,
Andrea

-- 
Dr Andrea Schweer
Lead Software Developer, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
+64-7-837 9120


--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to