Changeset 2912


Ignore:
Timestamp:
05/22/13 04:09:46 (11 years ago)
Author:
mwindhouwer
Message:

M mod-ISOcat-interface-rest/representations/atom/DC-history.xsl
M mod-ISOcat-interface-rest/representations/html/DC-history.xsl

  • removed milliseconds from the timestamp
  • fall back to unknown if the editor isn't known
Location:
cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/atom/DC-history.xsl

    r2911 r2912  
    5454        </xsl:function>
    5555       
     56        <xsl:function name="isocat:timestamp">
     57                <xsl:param name="ts"/>
     58                <xsl:sequence select="replace($ts,'\..*','')"/>
     59        </xsl:function>
     60       
    5661        <xsl:template match="change">
    5762                <atom:entry>
     
    7075                        <atom:title>
    7176                                <xsl:text>Change by </xsl:text>
    72                                 <xsl:value-of select="user/name"/>
     77                                <xsl:value-of select="if (normalize-space(user/name)!='') then (user/name) else ('unknown')"/>
    7378                                <xsl:text> at </xsl:text>
    74                                 <xsl:value-of select="@timestamp"/>
     79                                <xsl:value-of select="isocat:timestamp(@timestamp)"/>
    7580                        </atom:title>
    7681                        <atom:author>
    7782                                <atom:name>
    78                                         <xsl:value-of select="user/name"/>
     83                                        <xsl:value-of select="if (normalize-space(user/name)!='') then (user/name) else ('unknown')"/>
    7984                                </atom:name>
    8085                        </atom:author>
    8186                        <atom:updated>
    82                                 <xsl:value-of select="@timestamp"/>
     87                                <xsl:value-of select="isocat:timestamp(@timestamp)"/>
    8388                        </atom:updated>
    8489                        <atom:content type="text">
     
    98103                        </atom:title>
    99104                        <atom:published>
    100                                 <xsl:value-of select="(change)[last()]/@timestamp"/>
     105                                <xsl:value-of select="isocat:timestamp((change)[last()]/@timestamp)"/>
    101106                        </atom:published>
    102107                        <xsl:if test="count(change) gt 1">
    103108                                <atom:updated>
    104                                         <xsl:value-of select="(change)[1]/@timestamp"/>
     109                                        <xsl:value-of select="isocat:timestamp((change)[1]/@timestamp)"/>
    105110                                </atom:updated>
    106111                        </xsl:if>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/html/DC-history.xsl

    r2906 r2912  
    4949                </span>
    5050        </xsl:function>
     51       
     52        <xsl:function name="isocat:timestamp">
     53                <xsl:param name="ts"/>
     54                <xsl:sequence select="replace($ts,'\..*','')"/>
     55        </xsl:function>
    5156
    5257        <xsl:template match="change">
    5358                <dt>
    5459                        <a name="c{@isocat:id}">
    55                                 <xsl:value-of select="@timestamp"/>
     60                                <xsl:value-of select="isocat:timestamp(@timestamp)"/>
    5661                                <xsl:text> - </xsl:text>
    5762                                <xsl:choose>
Note: See TracChangeset for help on using the changeset viewer.