Author: andre
Date: 2010-06-28 12:16:29 +0200 (Mon, 28 Jun 2010)
New Revision: 42728

Added:
   openimages/trunk/src/main/webapp/editors/plays.jspx
Modified:
   openimages/trunk/src/main/webapp/editors/edit.jspx
   openimages/trunk/src/main/webapp/editors/inc/navigation.jspx
Log:
started with adding stats

Modified: openimages/trunk/src/main/webapp/editors/edit.jspx
===================================================================
--- openimages/trunk/src/main/webapp/editors/edit.jspx  2010-06-28 10:15:16 UTC 
(rev 42727)
+++ openimages/trunk/src/main/webapp/editors/edit.jspx  2010-06-28 10:16:29 UTC 
(rev 42728)
@@ -173,6 +173,49 @@
           <div id="sidebar">
             <mm:present referid="nr">
               <mm:node number="$nr">
+                <!-- stats -->
+                <mm:hasrelationmanager sourcemanager="$type" 
destinationmanager="stats" role="related">
+                  <mm:relatednodescontainer type="stats" role="related" 
searchdirs="destination">
+                    <mm:sortorder field="created" direction="DOWN" />
+                    <table summary="Statistics for this node" border="0" 
cellspacing="0" cellpadding="3" class="stats">
+                      <thead>
+                        <tr>
+                          <th>date</th>
+                          <th># of plays</th>
+                        </tr>
+                      </thead>
+                      <tbody>
+                        <mm:relatednodes>
+                        
+                          <mm:import id="jaar" reset="true"><mm:field 
name="created"><mm:time format="yyyy" /></mm:field></mm:import>
+                          <mm:import id="maand" reset="true"><mm:field 
name="created"><mm:time format="M" /></mm:field></mm:import>
+                          <mm:import id="week" reset="true"><mm:field 
name="created"><mm:time format="w" /></mm:field></mm:import>
+                          <mm:import id="day" reset="true"><mm:field 
name="created"><mm:time format="D" /></mm:field></mm:import>
+                          <mm:import id="hour" reset="true"><mm:field 
name="created"><mm:time format="k" /></mm:field></mm:import>
+                          
+                          <mm:index write="false">
+                            <c:choose>
+                              <c:when test="${(_ mod 2) eq 0}"><c:set 
var="tdclass" value="even" /></c:when>
+                              <c:otherwise><c:set var="tdclass" value="odd" 
/></c:otherwise>
+                            </c:choose>
+                          </mm:index>
+                          <tr class="${tdclass}">
+                            <td class="date">
+                              <mm:field name="created"><mm:time 
format="dd-MM-yyyy k" />:00</mm:field>
+                            </td>
+                            <td class="total">
+                              <mm:field name="total" />
+                            </td>
+                          </tr>
+                        </mm:relatednodes>
+                      </tbody>
+                    </table>
+                  </mm:relatednodescontainer>
+
+                
+                </mm:hasrelationmanager>
+                <!-- /stats -->
+                
                 <mm:hasrelationmanager sourcemanager="$type" 
destinationmanager="images" role="posrel">
                   <p>
                     <mm:include page="inc/searchrelate.jspx" referids="nr">
@@ -256,6 +299,7 @@
                       </mm:link>
                     </p>                      
                     <ul>
+                      
                       <mm:relatednodescontainer type="${ttype}" role="langrel" 
searchdirs="destination">
                         <mm:relatednodes>
                           <li id="node_${_node}">
@@ -274,7 +318,7 @@
                         </mm:relatednodes>
                       </mm:relatednodescontainer>
                       
-                      </ul>
+                    </ul>
                     <div id="create_translation" class="displaynone">  </div>
                   </mm:hasrelationmanager>
                 </mm:hasnodemanager>
@@ -283,11 +327,6 @@
           </div><!-- /#sidebar -->
         </div><!-- /#wrap -->
 
-        <mm:link page="/editors/sr/searchrelate.js.jsp">
-          <mm:param name="editor">/editors/edit.jspx</mm:param>
-          <script type="text/javascript" src="${_}"><!-- for ie --></script>
-        </mm:link>
-
       </body>
     </html>
   </mm:cloud>

Modified: openimages/trunk/src/main/webapp/editors/inc/navigation.jspx
===================================================================
--- openimages/trunk/src/main/webapp/editors/inc/navigation.jspx        
2010-06-28 10:15:16 UTC (rev 42727)
+++ openimages/trunk/src/main/webapp/editors/inc/navigation.jspx        
2010-06-28 10:16:29 UTC (rev 42728)
@@ -27,6 +27,7 @@
      <li id="tab8"><mm:link page="edit.jspx"><mm:param 
name="type">attachments</mm:param><a href="${_}">bijlagen</a></mm:link></li>
      <li id="tab9"><mm:link page="edit.jspx"><mm:param 
name="type">tags</mm:param><a href="${_}">tags</a></mm:link></li>
      <li id="tab10"><mm:link page="edit.jspx"><mm:param 
name="type">licenses</mm:param><a href="${_}">licenses</a></mm:link></li>
+     <li id="tab11"><mm:link page="plays.jspx"><a href="${_}"># of 
plays</a></mm:link></li>
    </ul>
  </div>
 

Added: openimages/trunk/src/main/webapp/editors/plays.jspx
===================================================================
--- openimages/trunk/src/main/webapp/editors/plays.jspx                         
(rev 0)
+++ openimages/trunk/src/main/webapp/editors/plays.jspx 2010-06-28 10:16:29 UTC 
(rev 42728)
@@ -0,0 +1,35 @@
+<mm:content 
+    xmlns:jsp="http://java.sun.com/JSP/Page";
+    xmlns:c="http://java.sun.com/jsp/jstl/core";
+    xmlns:fn="http://java.sun.com/jsp/jstl/functions";
+    xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
+    xmlns:sr="http://www.mmbase.org/tags/mm/searchrelate";
+    expires="0" type="text/html" language="client" postprocessor="none">
+<jsp:output doctype-root-element="html"
+      doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; />
+<mm:cloud loginpage="login.jspx" rank="project manager">
+
+<mm:import externid="type">stats</mm:import>
+<mm:import externid="nr" />
+<mm:import externid="msg" />
+
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="nl">
+<mm:include page="inc/head.jspx" referids="type,pagetitle?" />
+<body class="${type}">
+<jsp:include page="inc/navigation.jspx" />
+<div id="wrap">
+  <div id="content">
+    <h2># of plays</h2>
+    
+    
+  
+  
+  </div><!-- /#content -->
+  <div id="sidebar"> <jsp:text>  </jsp:text> </div><!-- /#sidebar -->
+</div><!-- /#wrap -->
+
+</body>
+</html>
+</mm:cloud>
+</mm:content>

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to