Project

General

Profile

« Previous | Next » 

Revision 4014

Added by berkley almost 16 years ago

javascript now remembers queries and can display xml or html versions of documents

View differences:

resultset.xsl
2 2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3 3

  
4 4
  <xsl:template match="/">
5
    <table>
5
    <table width="100%">
6
      <tr>
7
        <th>
8
          Document ID
9
        </th>
10
        <th>
11
          &#160;
12
        </th>
13
        <th>
14
          Title
15
        </th>
16
        <th>
17
          Document Type
18
        </th>
19
      </tr>
6 20
      <xsl:apply-templates select="//document"/>
7 21
    </table>
22
    
8 23
    <!-- page navigation-->
9 24
    <div class="resultnavbar">
10 25
      <!--previous-->
......
15 30
        <xsl:otherwise>
16 31
          <a>
17 32
            <xsl:attribute name="href">
18
              javascript:reloadSearchContent('/sms/metacat?action=query&amp;anytext=%25&amp;qformat=sms&amp;pagesize=10&amp;pagestart=<xsl:value-of select="//previouspage"/>');
33
              javascript:reloadSearchContent('/sms/metacat?action=query&amp;anytext=%25&amp;qformat=sms&amp;returnfield=dataset/title&amp;pagesize=10&amp;pagestart=<xsl:value-of select="//previouspage"/>');
19 34
            </xsl:attribute>
20 35
              &#8592; previous
21 36
          </a>
......
32 47
        <xsl:otherwise>
33 48
          <a>
34 49
          <xsl:attribute name="href">
35
            javascript:reloadSearchContent('/sms/metacat?action=query&amp;anytext=%25&amp;qformat=sms&amp;pagesize=10&amp;pagestart=<xsl:value-of select="//nextpage"/>');
50
            javascript:reloadSearchContent('/sms/metacat?action=query&amp;anytext=%25&amp;qformat=sms&amp;returnfield=dataset/title&amp;pagesize=10&amp;pagestart=<xsl:value-of select="//nextpage"/>');
36 51
          </xsl:attribute>
37 52
            next &#8594;
38 53
          </a>
......
45 60
  <xsl:template match="document">
46 61
    <tr>
47 62
      <td>
48
        <a>
63
        <a><!--docid-->
49 64
        <xsl:attribute name="href">
50 65
          /sms/metacat?action=read&amp;qformat=sms&amp;docid=<xsl:value-of select="docid"/>
51 66
        </xsl:attribute>
52 67
        <xsl:value-of select="docid"/>
53 68
        </a>
54 69
      </td>
55
      <td>
70
      <td><!--xml link-->
71
        <a>
72
          <xsl:attribute name="href">
73
            /sms/metacat?action=read&amp;qformat=xml&amp;docid=<xsl:value-of select="docid"/>
74
          </xsl:attribute>
75
          <img width="25px" src="style/skins/sms/xml-button.png"/>
76
        </a>
77
      </td>
78
      <td> <!--title of the doc if it's eml-->
56 79
        <xsl:choose>
80
          <xsl:when test="param[@name='dataset/title'] != ''">
81
            <xsl:value-of select="param[@name='dataset/title']"/>
82
          </xsl:when>
83
          <xsl:otherwise>
84
            No Title
85
          </xsl:otherwise>
86
        </xsl:choose>
87
      </td>
88
      <td><!--doc type-->
89
        <xsl:choose>
57 90
        <xsl:when test="doctype='eml://ecoinformatics.org/eml-2.0.1'">
58 91
          EML 2.0.1 Document
59 92
        </xsl:when>

Also available in: Unified diff