Update of /var/cvs/contributions/didactor2/src/core/templates/shared
In directory james.mmbase.org:/tmp/cvs-serv1929
Modified Files:
onlineReporter.jsp
Log Message:
making it work better if not logged in
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/templates/shared
Index: onlineReporter.jsp
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/templates/shared/onlineReporter.jsp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- onlineReporter.jsp 28 Aug 2008 15:12:50 -0000 1.19
+++ onlineReporter.jsp 29 Aug 2008 08:00:41 -0000 1.20
@@ -3,8 +3,11 @@
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
xmlns:di="http://www.didactor.nl/ditaglib_1.0">
<jsp:directive.page buffer="100kb" />
- <mm:content postprocessor="none" expires="0">
- <mm:cloud rank="didactor user">
+ <online>
+ <mm:content postprocessor="none"
+ type="application/xml"
+ expires="0">
+ <mm:cloud method="asis">
<mm:isgreaterthan referid="user" value="0">
<mm:node referid="user">
@@ -17,6 +20,27 @@
</mm:node>
+ <mm:present referid="education">
+ <mm:present referid="class">
+ <mm:compare referid="class" value="">
+ <mm:list fields="classrel.number,classrel.lastlogin"
path="people,classrel,educations"
+ max="1" constraints="people.number=${user} and
educations.number=${education}"
+ orderby="classrel.lastlogin" directions="down">
+ <jsp:directive.include file="onlineStat.jsp" />
+ </mm:list>
+ </mm:compare>
+ <mm:compare referid="class" value="" inverse="true">
+ <mm:list fields="classrel.number,classrel.lastlogin"
path="people,classrel,classes"
+ max="1" constraints="people.number=${user} and
classes.number=${class}"
+ orderby="classrel.lastlogin" directions="down">
+ <jsp:directive.include file="onlineStat.jsp" />
+ </mm:list>
+ </mm:compare>
+ </mm:present>
+ </mm:present>
+ </mm:isgreaterthan>
+
+
<!--
If the parameter 'add' is present (which is if di:setting("core",
"pagereporter") is true.
Then also a pagestays objet will be updated (and created if
necessary).
@@ -27,7 +51,7 @@
<mm:import externid="content" />
<mm:import externid="page" />
<mm:listnodescontainer type="pagestays">
- <mm:constraint field="user" value="$user" />
+ <mm:constraint field="user" operator="${empty user or user le 0 ?
'NULL' : EQ}" value="$user" />
<mm:constraint field="content" operator="${empty content ? 'NULL'
: 'EQ'}" value="$content" />
<mm:constraint field="page" value="$page" />
<mm:listnodes max="1">
@@ -35,7 +59,7 @@
</mm:listnodes>
<mm:notpresent referid="pagestay">
<mm:createnode type="pagestays" id="pagestay">
- <mm:setfield name="user">${user}</mm:setfield>
+ <mm:setfield name="user"><mm:write referid="user"
/></mm:setfield>
<mm:setfield name="content">${content}</mm:setfield>
<mm:setfield name="page"><mm:write referid="page"
escape="none" /></mm:setfield>
</mm:createnode>
@@ -44,29 +68,13 @@
<mm:field name="duration" write="false">
<mm:setfield name="duration">${_ + add}</mm:setfield>
</mm:field>
+ <node>${_node}</node>
+ <user><mm:field name="user" /></user>
+ <duration><mm:field name="duration" /></duration>
</mm:node>
</mm:listnodescontainer>
</mm:present>
-
- <mm:present referid="education">
- <mm:present referid="class">
- <mm:compare referid="class" value="">
- <mm:list fields="classrel.number,classrel.lastlogin"
path="people,classrel,educations"
- max="1" constraints="people.number=${user} and
educations.number=${education}"
- orderby="classrel.lastlogin" directions="down">
- <jsp:directive.include file="onlineStat.jsp" />
- </mm:list>
- </mm:compare>
- <mm:compare referid="class" value="" inverse="true">
- <mm:list fields="classrel.number,classrel.lastlogin"
path="people,classrel,classes"
- max="1" constraints="people.number=${user} and
classes.number=${class}"
- orderby="classrel.lastlogin" directions="down">
- <jsp:directive.include file="onlineStat.jsp" />
- </mm:list>
- </mm:compare>
- </mm:present>
- </mm:present>
- </mm:isgreaterthan>
</mm:cloud>
</mm:content>
+ </online>
</jsp:root>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs