Update of 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/webapp/editors/newsletter/module
In directory 
james.mmbase.org:/tmp/cvs-serv16798/portlets-newsletter/src/webapp/editors/newsletter/module

Modified Files:
        globals.jsp report_newsletter_list.jsp 
        report_newsletter_subscriptions.jsp report_overview.jsp 
Added Files:
        pager_index.jsp 
Log Message:
CMSC-818 basic function implement,move service initial to spring.


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/webapp/editors/newsletter/module
See also: http://www.mmbase.org/jira/browse/CMSC-818


pager_index.jsp is new



Index: globals.jsp
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/webapp/editors/newsletter/module/globals.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- globals.jsp 17 Jan 2008 21:47:15 -0000      1.2
+++ globals.jsp 5 May 2008 02:40:11 -0000       1.3
@@ -1,7 +1,12 @@
+<%@ page import="com.finalist.cmsc.mmbase.PropertiesUtil" %>
 <[EMAIL PROTECTED] file="../../globals.jsp" %>
 
 <[EMAIL PROTECTED] language="java" contentType="text/html;charset=utf-8"%>
 
 <fmt:setBundle basename="newsletter-module" scope="request" />
 
+<c:set var="pagesize">
+   <%=PropertiesUtil.getProperty("repository.search.results.per.page")%>
+</c:set>
+
 <cmscedit:head title="Newsletter" />
\ No newline at end of file


Index: report_newsletter_list.jsp
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/webapp/editors/newsletter/module/report_newsletter_list.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- report_newsletter_list.jsp  17 Jan 2008 21:47:15 -0000      1.1
+++ report_newsletter_list.jsp  5 May 2008 02:40:11 -0000       1.2
@@ -1,29 +1,93 @@
 <[EMAIL PROTECTED] file="globals.jsp" %>
 
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>
+<%@ taglib uri="http://finalist.com/cmsc"; prefix="cmsc" %>
+<%@ taglib uri="http://jsptags.com/tags/navigation/pager"; prefix="pg" %>
+
 <cmscedit:head title="reactions.title">
-       <fmt:message key="newsletteroverview.title" />
 </cmscedit:head>
 
-<br><br>
-
-<table width="75%">
+<div class="tabs">
+   <div class="tab_active">
+      <div class="body">
+         <div>
+            <a href="#"><fmt:message 
key="newsletter.subscription.manage.newsletteroverview"/></a>
+         </div>
+      </div>
+   </div>
+</div>
+<div class="editor">
+   <c:if test="${fn:length(results) gt pagesize || not empty 
param.query_parameter_title }">
+   <div class="body">
+      <form method="POST" name="form" action="SubscriptionManagement.do">
+         <input type="hidden" name="action" value="newsletterOverview"/>
+         <table border="0">
        <tr>    
-               <th></th>
-               <th align="left"><fmt:message 
key="newsletteroverview.newsletter" /></tk>
-               <th align="left"><fmt:message 
key="newsletteroverview.numberofthemes" /></tk>
-               <th align="left"><fmt:message 
key="newsletteroverview.numberofpublications" /></tk>
-               <th align="left"><fmt:message 
key="newsletteroverview.numberofsubscriptions" /></tk>
+               <td style="width: 150px">Title</td>
+               <td><input type="text" name="query_parameter_title" 
value="${param.query_parameter_title}"
+                          style="width: 250px"/></td>
+            </tr>
+            <tr>
+               <td colspan="2">
+                  <input type="submit" name="submitButton"
+                         onclick="document.forms['form'].submit()" 
value="Search"/>
+               </td>
        </tr>
-       <c:forEach var="bean" items="${newsletterOverviewBeans}">
-       <c:url var="url" 
value="ReportNewsletterSubscriptions.do?number=${bean.number}" />
+         </table>
+      </form>
+
+      <div class="ruler_green">
+         <div>Reactions found</div>
+      </div>
+      </c:if>
+      <div class="body">
+         <form method="POST" name="operationform" 
action="SubscriptionManagement.do">
+            <input type="hidden" name="action" id="action"/>
+            <input type="hidden" name="type" id="type" value="newsletter"/>
+            <pg:pager maxPageItems="${pagesize}" 
url="SubscriptionManagement.do">
+               <pg:param name="action" value="newsletterOverview"/>
+               <pg:param name="query_parameter_title" 
value="${param.query_parameter_title}"/>
+               <table>
+                  <thead>
+                     <th></th>
+                     <th>title</th>
+                     <th>number of publications</th>
+                     <th>sent publications</th>
+                     <th>number of subscriptions</th>
+                  </thead>
+                  <tbody>
+                        <[EMAIL PROTECTED] id="results" 
type="java.util.List"--%>
+                     <c:forEach items="${results}" var="result">
+                        <pg:item>
        <tr>
-               <td><cmsc:checkbox var="checked" value="${bean.number}" /></td>
-               <td><a href="${url}"><jsp:getProperty name="bean" 
property="title" /></a></td>
-               <td><jsp:getProperty name="bean" property="numberOfThemes" 
/></td>
-               <td><jsp:getProperty name="bean" 
property="numberOfPublications" /></td>
-               <td><jsp:getProperty name="bean" 
property="numberOfSubscriptions" /></td>
+                              <td><input type="checkbox" name="newsletterIds" 
value="${result.id}"/></td>
+                              <td><a 
href="SubscriptionManagement.do?action=newsletterDetail&nesletterId=${result.id}">${result.title}</a></td>
+                              <td>${result.countpublications}</td>
+                              <td>${result.countSentPublicatons}</td>
+                              <td>${result.countSubscriptions}</td>
        </tr>
+                        </pg:item>
        </c:forEach>
-</table>
+                  </tbody>
+               </table>
+               <%@ include file="pager_index.jsp" %>
+            </pg:pager>
+
+            <ul>
+               <li>
+                  <input type="submit" name="submitButton"
+                         
onclick="document.getElementById('action').value='exportSusbscriptions';document.forms['operationform'].submit()"
+                         value="Export subscriptions"/>
+               </li>
+               <li>
+                  <a href="#">Unsubscribe selected subscriptions</a>
+               </li>
+            </ul>
+         </form>
+      </div>
+
+   </div>
+</div>
+
 
-<p><a href="SubscribtionAction.do?action=unsubscribe"><fmt:message 
key="newsletteroverview.link.deleteallsubscriptions" /></a><p>


Index: report_newsletter_subscriptions.jsp
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/webapp/editors/newsletter/module/report_newsletter_subscriptions.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- report_newsletter_subscriptions.jsp 20 Jan 2008 22:48:35 -0000      1.2
+++ report_newsletter_subscriptions.jsp 5 May 2008 02:40:11 -0000       1.3
@@ -1,23 +1,90 @@
 <[EMAIL PROTECTED] file="globals.jsp" %>
 
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>
+<%@ taglib uri="http://finalist.com/cmsc"; prefix="cmsc" %>
+<%@ taglib uri="http://jsptags.com/tags/navigation/pager"; prefix="pg" %>
+
 <cmscedit:head title="reactions.title">
-       <fmt:message key="newsletterdetail.title" />: 
${newsletterDetailBean.title}
 </cmscedit:head>
 
-<br><br>
-
-<table width="50%">
+<div class="tabs">
+   <div class="tab_active">
+      <div class="body">
+         <div>
+            <a href="#">${requestScope.newsletter}</a>
+         </div>
+      </div>
+   </div>
+</div>
+<div class="editor">
+   <c:if test="${fn:length(results) gt pagesize || not empty 
param.query_parameter_name || not empty param.query_parameter_email }">
+   <div class="body">
+      <form method="POST" name="form" action="SubscriptionManagement.do">
+         <input type="hidden" name="action" value="newsletterDetail"/>
+         <table border="0">
        <tr>
-               <th></th>
-               <th align="left"><fmt:message key="newsletterdetail.username" 
/></tk>
-               <th align="left"><fmt:message 
key="newsletterdetail.numberofthemes" /></tk>
+               <td style="width: 150px">Title</td>
+               <td>
+                  <input type="text" name="query_parameter_name" 
value="${param.query_parameter_name}"
+                         style="width: 250px"/>
+               </td>
        </tr>
-       <c:forEach var="subscriber" items="${subscriberOverviewBeans}">
-       <c:url var="url" 
value="ReportSubscriberSubscriptions.do?username=${subscriber.userName}" />
        <tr>
-               <td><cmsc:checkbox var="checked" value="${subscriber.userName}" 
/></td>
-               <td><a href="${url}"><jsp:getProperty name="subscriber" 
property="userName" /></a></td>
-               <td><jsp:getProperty name="subscriber" 
property="numberOfThemes" /></td>
+               <td colspan="2">
+                  <input type="submit" name="submitButton"
+                         onclick="document.forms['form'].submit()" 
value="Search"/>
+               </td>
        </tr>
+         </table>
+      </form>
+
+      <div class="ruler_green">
+         <div>Reactions found</div>
+      </div>
+      </c:if>
+      <div class="body">
+         <form method="POST" name="operationform" 
action="SubscriptionManagement.do">
+            <input type="hidden" name="action" value="exportSusbscriptions"/>
+            <input type="hidden" name="type" value="subscription"/>
+            <pg:pager maxPageItems="${pagesize}" 
url="SubscriptionManagement.do">
+               <pg:param name="action" value="newsletterOverview"/>
+               <pg:param name="query_parameter_title" 
value="${param.query_parameter_title}"/>
+               <table>
+                  <thead>
+                     <th></th>
+                     <th>user name</th>
+                     <th>full name</th>
+                     <th>email</th>
+                  </thead>
+                  <tbody>
+                        <[EMAIL PROTECTED] id="results" 
type="java.util.List"--%>
+                     <c:forEach items="${results}" var="result">
+                        <pg:item>
+                           <tr>
+                              <td><input type="checkbox" name="subscriptionId" 
value="${result.id}"/></td>
+                              <td>${result.username}</td>
+                              <td>${result.fullname}</td>
+                              <td>${result.email}</td>
+                           </tr>
+                        </pg:item>
        </c:forEach>
-</table>
\ No newline at end of file
+                  </tbody>
+               </table>
+               <%@ include file="pager_index.jsp" %>
+            </pg:pager>
+
+            <ul>
+               <li>
+                  <input type="submit" name="submitButton"
+                         onclick="document.forms['operationform'].submit()"
+                         value="Export subscriptions"/>
+               </li>
+            </ul>
+         </form>
+      </div>
+
+   </div>
+</div>
+
+


Index: report_overview.jsp
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer_Portlets/portlets-newsletter/src/webapp/editors/newsletter/module/report_overview.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- report_overview.jsp 17 Jan 2008 21:47:15 -0000      1.1
+++ report_overview.jsp 5 May 2008 02:40:11 -0000       1.2
@@ -1,34 +1,61 @@
 <[EMAIL PROTECTED] file="globals.jsp" %>
 
 <cmscedit:head title="reactions.title">
-       <fmt:message key="globalstats.title" />
 </cmscedit:head>
 
-<br><br>
-
-<jsp:useBean id="globalOverviewBean" scope="request" 
type="com.finalist.newsletter.module.bean.GlobalOverviewBean" />
-
-<table width="50%">
+<div class="tabs">
+   <div class="tab_active">
+      <div class="body">
+         <div>
+            <a href="#"><fmt:message key="globalstats.title"/></a>
+         </div>
+      </div>
+   </div>
+</div>
+<div class="editor">
+   <div class="body">
+      <table width="50%">
        <tr>
-               <td><fmt:message key="globalstats.total.newsletters" /></td>
-               <td><jsp:getProperty name="globalOverviewBean" 
property="numberOfNewsletters"  /></td>
+            <td><fmt:message key="globalstats.total.newsletters"/></td>
+            <td>${requestScope.newslettercount}</td>
        </tr>
        <tr>
-               <td><fmt:message key="globalstats.total.themes" /></td>
-               <td><jsp:getProperty name="globalOverviewBean" 
property="numberOfThemes"  /></td>
+            <td><fmt:message key="globalstats.total.themes"/></td>
+            <td>${requestScope.termcount}</td>
        </tr>
        <tr>
-               <td><fmt:message key="globalstats.total.publications" /></td>
-               <td><jsp:getProperty name="globalOverviewBean" 
property="numberOfPublications"  /></td>
+            <td><fmt:message key="globalstats.total.publications"/></td>
+            <td>${requestScope.publicationcount}</td>
        </tr>
        <tr>
-               <td><fmt:message key="globalstats.total.subscriptions" /></td>
-               <td><jsp:getProperty name="globalOverviewBean" 
property="numberOfSubscribtions"  /></td>
+            <td><fmt:message key="globalstats.total.subscriptions"/></td>
+            <td>${requestScope.subscriptioncount}</td>
        </tr>
-</table>
+      </table>
+
+      <br/>
 
-<br />
-<div>
-       <p><a href="ReportNewsletterList.do"><fmt:message 
key="index.link.newsletteroverview" /></a></p>
-       <p><a href="ReportSubscriberList.do"><fmt:message 
key="index.link.subscriptionoverview" /></a></p>
+      <div>
+         <p>
+            <a href="SubscriptionManagement.do?action=newsletterOverview">
+               <fmt:message key="index.link.newsletteroverview"/>
+            </a>
+         </p>
+         <p>
+            <a href="SubscriptionManagement.do?action=subscriberOverview">
+               <fmt:message key="index.link.subscriptionoverview"/>
+            </a>
+         </p>
+         <p>
+            <a href="SubscriptionManagement.do?action=exportSusbscriptions">
+               <fmt:message key="index.link.exportall"/>
+            </a>
+         </p>
+         <p>
+            <a href="SubscriptionManagement.do?action=import">
+               <fmt:message key="index.link.import"/>
+            </a>
+         </p>
+      </div>
+   </div>
 </div>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to