6
6
exclude-result-prefixes =" i18n mods xlink mcrxsl" >
7
7
<!-- copied from http://www.loc.gov/standards/mods/v3/MODS3-4_HTML_XSLT1-0.xsl -->
8
8
<xsl : include href =" layout-utils.xsl" />
9
-
9
+ < xsl : param name = " WebApplicationBaseURL " />
10
10
11
11
<xsl : template match =" /" >
12
12
<div id =" system_box" class =" detailbox" >
30
30
<xsl : with-param select =" mycoreobject/service/servdates/servdate[@type='createdate']" name =" nodes" />
31
31
<xsl : with-param select =" i18n:translate('metaData.createdAt')" name =" label" />
32
32
</xsl : call-template >
33
- <xsl : call-template name =" printMetaDate" >
34
- <xsl : with-param select =" mycoreobject/service/servflags/servflag[@type='createdby']" name =" nodes" />
35
- <xsl : with-param select =" i18n:translate('metaData.createdby')" name =" label" />
33
+
34
+ <xsl : call-template name =" print-user-info" >
35
+ <xsl : with-param name =" user" select =" document(concat('notnull:user:', mycoreobject/service/servflags/servflag[@type='createdby']))" />
36
+ <xsl : with-param name =" label" select =" i18n:translate('metaData.createdby')" />
37
+ <xsl : with-param name =" link-to-profile" select =" true()" />
36
38
</xsl : call-template >
39
+
37
40
<xsl : for-each select =" mycoreobject/metadata/def.modsContainer/modsContainer/mods:mods/mods:note" >
38
41
<xsl : variable name =" noteType" >
39
42
<xsl : choose >
65
68
<xsl : with-param select =" mycoreobject/service/servdates/servdate[@type='modifydate']" name =" nodes" />
66
69
<xsl : with-param select =" i18n:translate('metaData.lastChanged')" name =" label" />
67
70
</xsl : call-template >
68
- <xsl : call-template name =" printMetaDate" >
69
- <xsl : with-param select =" mycoreobject/service/servflags/servflag[@type='modifiedby']" name =" nodes" />
70
- <xsl : with-param select =" i18n:translate('metaData.modifiedBy')" name =" label" />
71
+
72
+ <xsl : call-template name =" print-user-info" >
73
+ <xsl : with-param name =" user" select =" document(concat('notnull:user:', mycoreobject/service/servflags/servflag[@type='modifiedby']))" />
74
+ <xsl : with-param name =" label" select =" i18n:translate('metaData.modifiedBy')" />
71
75
</xsl : call-template >
76
+
72
77
<!-- *** MyCoRe-ID and intern ID *************************** -->
73
78
<tr >
74
79
<td class =" metaname" >
129
134
</div >
130
135
</div >
131
136
</xsl : template >
132
- </xsl : stylesheet >
137
+
138
+ <xsl : template name =" print-user-info" >
139
+ <xsl : param name =" user" />
140
+ <xsl : param name =" label" />
141
+ <xsl : param name =" link-to-profile" select =" false()" />
142
+
143
+ <xsl : variable name =" display-name" >
144
+ <xsl : choose >
145
+ <xsl : when test =" $user/user/realName" >
146
+ <xsl : value-of select =" $user/user/realName" />
147
+ </xsl : when >
148
+ <xsl : otherwise >
149
+ <xsl : value-of select =" $user/user/@name" />
150
+ </xsl : otherwise >
151
+ </xsl : choose >
152
+ </xsl : variable >
153
+
154
+ <tr >
155
+ <td class =" metaname" >
156
+ <xsl : value-of select =" concat($label, ':')" />
157
+ </td >
158
+
159
+ <td class =" metavalue" >
160
+ <xsl : if test =" $user/user/realName" >
161
+ <xsl : attribute name =" title" >
162
+ <xsl : value-of select =" concat($user/user/@name, '@', $user/user/@realm)" />
163
+ </xsl : attribute >
164
+ </xsl : if >
165
+
166
+ <xsl : choose >
167
+ <xsl : when test =" $link-to-profile = true()" >
168
+ <a href =" {$WebApplicationBaseURL}/servlets/MCRUserServlet?action=show& id={$user/user/@name}" >
169
+ <xsl : value-of select =" $display-name" />
170
+ </a >
171
+ </xsl : when >
172
+ <xsl : otherwise >
173
+ <xsl : value-of select =" $display-name" />
174
+ </xsl : otherwise >
175
+ </xsl : choose >
176
+ </td >
177
+ </tr >
178
+ </xsl : template >
179
+
180
+ </xsl : stylesheet >
0 commit comments