Project

General

Profile

« Previous | Next » 

Revision 5701

use simple mode - just read events tallied

View differences:

lib/style/common/log.xsl
25 25
	<xsl:param name="qformat">default</xsl:param>
26 26
	<xsl:param name="contextURL" />
27 27
	<xsl:param name="cgi-prefix" />
28
	<xsl:param name="simple">true</xsl:param>
28 29
	
30
	
29 31
	<xsl:variable name="this" select="/"/>
30 32
	
31 33
	<xsl:template match="/">
......
40 42
			</head>
41 43

  
42 44
			<body>
43
				<table class="subGroup subGroup_border">
44
					
45
					<xsl:for-each select="distinct-values(./log/logEntry/docid)" >
46
						<xsl:variable name="uniqueDocid" select="string(.)"/>
47
						<tr>
48
							<th colspan="2">
49
								Usage Statistics
50
							</th>
51
						</tr>
52
						<tr>
53
							<td>
54
								Doc Id:
55
							</td>
56
							<td>	 
57
								<xsl:value-of select="$uniqueDocid" />
58
							</td>
59
						</tr>
60
						<tr>
61
							<td>
62
								Read:
63
							</td>
64
							<td>	 
65
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='read'])" />
66
							</td>
67
						</tr>
68
						<tr>
69
							<td>									
70
								Insert: 
71
							</td>
72
							<td>	
73
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='insert'])" />
74
							</td>
75
						</tr>
76
						<tr>
77
							<td>
78
								Update: 
79
							</td>
80
							<td>	
81
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='update'])" />
82
							</td>
83
						</tr>
84
						<tr>
85
							<td>
86
								Delete: 
87
							</td>
88
							<td>	
89
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='delete'])" />
90
							</td>
91
						</tr>
92
						<tr>
93
							<td>
94
								Total: 
95
							</td>
96
							<td>	
97
								<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid])" />
98
							</td>
99
						</tr>
45
			
46
				<xsl:choose>
47
					<xsl:when test="$simple='true'">
48
						Views:
49
						<xsl:for-each select="distinct-values(./log/logEntry/docid)" >
50
							<xsl:variable name="uniqueDocid" select="string(.)"/>
51
							<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='read'])" />
52
						</xsl:for-each>	
53
					</xsl:when>
54
					<xsl:otherwise>
55
						<table class="subGroup subGroup_border">
56
							
57
							<xsl:for-each select="distinct-values(./log/logEntry/docid)" >
58
								<xsl:variable name="uniqueDocid" select="string(.)"/>
59
								<tr>
60
									<th colspan="2">
61
										Usage Statistics
62
									</th>
63
								</tr>
64
								<tr>
65
									<td>
66
										Doc Id:
67
									</td>
68
									<td>	 
69
										<xsl:value-of select="$uniqueDocid" />
70
									</td>
71
								</tr>
72
								<tr>
73
									<td>
74
										Read:
75
									</td>
76
									<td>	 
77
										<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='read'])" />
78
									</td>
79
								</tr>
80
								<tr>
81
									<td>									
82
										Insert: 
83
									</td>
84
									<td>	
85
										<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='insert'])" />
86
									</td>
87
								</tr>
88
								<tr>
89
									<td>
90
										Update: 
91
									</td>
92
									<td>	
93
										<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='update'])" />
94
									</td>
95
								</tr>
96
								<tr>
97
									<td>
98
										Delete: 
99
									</td>
100
									<td>	
101
										<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid and event='delete'])" />
102
									</td>
103
								</tr>
104
								<tr>
105
									<td>
106
										Total: 
107
									</td>
108
									<td>	
109
										<xsl:value-of select="count($this/log/logEntry[docid=$uniqueDocid])" />
110
									</td>
111
								</tr>
112
								
113
							</xsl:for-each>
100 114
						
101
					</xsl:for-each>
102
				
103
				</table>
115
						</table>
116
					</xsl:otherwise>
117
				</xsl:choose>	
104 118
			</body>
105 119
			
106 120
		</html>

Also available in: Unified diff