[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/koha-tmpl/intranet-tmpl/prog/en/tools clea... [rel_3_0]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/koha-tmpl/intranet-tmpl/prog/en/tools clea... [rel_3_0] |
Date: |
Thu, 16 Nov 2006 10:10:47 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 06/11/16 10:10:46
Added files:
koha-tmpl/intranet-tmpl/prog/en/tools: cleanborrowers.tmpl
Log message:
New script: tools/cleanborrowers.pl
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/tools/cleanborrowers.tmpl?cvsroot=koha&only_with_tag=rel_3_0&rev=1.1.2.1
Patches:
Index: cleanborrowers.tmpl
===================================================================
RCS file: cleanborrowers.tmpl
diff -N cleanborrowers.tmpl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cleanborrowers.tmpl 16 Nov 2006 10:10:46 -0000 1.1.2.1
@@ -0,0 +1,249 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- CLEAN BORROWERS
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- Additions to enable Calendar system -->
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"
-->/includes/calendar/calendar-system.css">
+<!-- End of additions --><!-- Additions to enable Calendar system -->
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"
-->/includes/calendar/calendar.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"
-->/includes/calendar/calendar-en.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang"
-->/includes/calendar/calendar-setup.js"></script>
+
+<!-- End of additions -->
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
+
+
+<h1>Delete some old infos</h1>
+
+<fieldset>
+<legend>Search a borrower</legend>
+ <div id="quicksearch">
+ <form name="f" action="/cgi-bin/koha/tools/cleanborrowers.pl"
method="POST" onsubmit="return checkForm(this);">
+ <label for="quick-search">Search a member: </label>
+ <input id="quick-search" name="query" type="text"/>
+ <input type="hidden" name="do_search" value="1" />
+ <label for="orderby">order by: </label>
+ <select id="orderby" name="orderby">
+ <option value="surname" selected=selected>Surname</option>
+ <option value="firstname" >Firstname</option>
+ <option value="cardnumber" >Card number</option>
+ <option value="categorycode" >Category</option>
+ <option value="dateexpiry" >Date expiry</option>
+ <option value="dateenrolled" >Date enrolled</option>
+ </select>
+
+ <br />
+ <em>Leave the search box blank to search among all borrowers</em>
+ <br /><br />
+ <input type="radio" id="old-issue" name="radio" value="old-issue" />
+ <label for="old-issue">who has a reading history older than: </label>
+ <input size="10" id="to" name="filterdate1" value="<!-- TMPL_VAR
NAME="filterdate1"-->" type="text" />
+ <img src="<!-- TMPL_VAR Name="themelang"
-->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;"
valign="top" border="0" hspace="0" vspace="0">
+ <script type="text/javascript">
+ Calendar.setup(
+ {
+ inputField : "to",
+ ifFormat : "%Y-%m-%d",
+ button : "openCalendarTo",
+ }
+ );
+ </script>
+ <br />
+
+ <input type="radio" id="old-borrower" name="radio" checked="true"
value="old-borrower"/>
+ <label for="old-borrower">who has not borrowed since: </label>
+ <input size="10" id="to" name="filterdate2" value="<!-- TMPL_VAR
NAME="filterdate2"-->" type="text" />
+ <img src="<!-- TMPL_VAR Name="themelang"
-->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;"
valign="top" border="0" hspace="0" vspace="0">
+ <script type="text/javascript">
+ Calendar.setup(
+ {
+ inputField : "to",
+ ifFormat : "%Y-%m-%d",
+ button : "openCalendarTo",
+ }
+ );
+ </script>
+ <input type="submit" value="search" style="float:right;"/>
+ </form>
+</fieldset>
+
+<!-- TMPL_IF NAME="total" -->
+ <div id="results" class="searchresults">
+ <br />
+ <b><!-- TMPL_VAR NAME="total" --> members found</b> when searching
"<!-- TMPL_VAR NAME="query" -->" order by <!-- TMPL_VAR
NAME="orderby" --><br />
+
+ <br />
+ <div id="action">
+ <form name="action-form"
action="/cgi-bin/koha/tools/cleanborrowers.pl" method="POST"
+ <!-- TMPL_IF NAME="checkborrower"--> onsubmit="return
confirmDelete();"<!-- /TMPL_IF-->>
+ For borrowers checked : <br />
+ <!-- TMPL_IF NAME="checkborrower"-->
+ <label for="submit"><b>Delete it : </b></label>
+ <input type="hidden" name="do_delete" value="true"/>
+
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="checkissue" -->
+ <label for="submit"><b>Anonymise issue history older than <!--
TMPL_VAR NAME="filterdate1" --> :</b></label>
+
+ <input type="hidden" value="true" name="do_anonym" />
+ <input type="hidden" name="filterdate1" value="<!-- TMPL_VAR
NAME="filterdate1"-->" />
+ <!-- /TMPL_IF -->
+ <input type="hidden" name="filterdate1" value="<!--TMPL_VAR
NAME="filterdate1"-->" />
+ <input type="hidden" name="filterdate2" value="<!--TMPL_VAR
NAME="filterdate2"-->" />
+ <input type="submit" value=" OK " />
+ </div>
+ <br />
+ <a href="JavaScript:checkAll(true);">Check All</a> <a
href="JavaScript:checkAll(false);">Uncheck All</a>
+ <table name="result-table">
+ <tr>
+ <th>
+
+ </th>
+ <th>
+ cardnumber
+ </th>
+ <th>
+ Firstname
+ </th>
+ <th>
+ Surname
+ </th>
+ <th>
+ Category
+ </th>
+ <th>
+ Additional infos
+ </th>
+ </tr>
+ <!-- TMPL_LOOP NAME="membersloop" -->
+ <tr name="line" onclick="JavaScript:SelectThisLine(<!-- TMPL_VAR
NAME="borrowernumber" -->);">
+ <td>
+ <input name="checkbox<!-- TMPL_VAR NAME="borrowernumber" -->"
type="checkbox" value="<!-- TMPL_VAR NAME="borrowernumber" -->" id="<!--
TMPL_VAR NAME="borrowernumber"-->" />
+ </td>
+ <td>
+ <!-- TMPL_VAR NAME="cardnumber" -->
+ </td>
+ <td>
+ <!-- TMPL_VAR NAME="firstname" -->
+ </td>
+ <td>
+ <!-- TMPL_VAR NAME="surname" -->
+ </td>
+ <td>
+ <!-- TMPL_VAR NAME="categorycode" -->
+ </td>
+ <td>
+ <!-- TMPL_IF NAME="neverborrowed" -->
+ * has never borrowed.<br />
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="notborrowedsince" -->
+ * has not borrowed since <!-- TMPL_VAR NAME="filterdate2"
--><br />
+ <small>The last was on <!-- TMPL_VAR NAME="lastissued"
--></small><br />
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="oldreadinghistory" -->
+ * has borrowed <!-- TMPL_VAR NAME="oldreadinghistory" -->
times before <!-- TMPL_VAR NAME="filterdate1" -->
+ <!-- /TMPL_IF -->
+ </td>
+ </tr>
+ <!-- /TMPL_LOOP -->
+ </table>
+ </form>
+ </div> <!-- results -->
+
+<!-- TMPL_ELSE --> <!-- if total -->
+ <!-- TMPL_IF NAME="query" -->
+ <b>No result found.</b>
+ <!-- /TMPL_IF -->
+<!-- /TMPL_IF --> <!-- if total -->
+
+<!-- TMPL_IF NAME="deleted" -->
+ <br /><b>All checked members has been deleted.</b>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="anonym" -->
+ <!-- TMPL_IF NAME="error" -->
+ Error : <span class="problem"><!-- TMPL_VAR NAME="error"--></span>
+ <!-- TMPL_ELSE -->
+ <br /><b>Issue history before than <!--TMPL_VAR NAME="filterdate1"--> for
checked members has been anonymised.</b>
+ <!-- TMPL_IF -->
+<!-- /TMPL_IF -->
+
+<script type="text/javascript" language="JavaScript">
+// <![CDATA[
+ /**
+ * SelectThisLine.
+ * This function check the box on the current line and apply a specific
style.
+ */
+ function SelectThisLine(num){
+ var checkbox = document.getElementById(num);
+ var line = checkbox.parentNode.parentNode;
+ var classLine = line.getAttribute("class");
+ if(classLine==="lineSelected"){
+ line.removeAttribute("class");
+ checkbox.checked=false;
+ }
+ else{
+ line.setAttribute("class","lineSelected");
+ checkbox.checked=true;
+ }
+ }
+ /**
+ * checkAll(bool)
+ * check all the checkbox in the result if bool is true.
+ * Uncheck all if false.
+ */
+ function checkAll(bool){
+ var lines = document.getElementsByName('line');
+ for(var i=0,len=lines.length;i<len;i++){
+ var line = lines[i];
+ if(bool){
+ line.setAttribute("class","lineSelected");
+ }
+ else{
+ line.removeAttribute("class");
+ }
+ var checkbox = line.firstChild.nextSibling.firstChild.nextSibling;
+ checkbox.checked = bool;
+ }
+ }
+ /**
+ * checkForm(form)
+ * this function checks if the form to submit is correctly filled.
+ */
+ function checkForm(form){
+ if(form.radio[0].checked){
+ if(!form.filterdate1.value){
+ alert("you should enter a date to filter on.");
+ form.filterdate1.focus;
+ return false; //don't submit.
+ }
+ }
+ if(form.radio[1].checked){
+ if(!form.filterdate2.value){
+ alert("you should enter a date to filter on");
+ form.filterdate2.focus;
+ return false; //don't submit.
+ }
+ }
+ return true;
+ }
+ /**
+ * confirmDelete
+ * this function display a window.confirm to be sure the user know what
it does.
+ */
+ function confirmDelete() {
+ try{
+ document.getElementById('submit-delete');
+ }
+ catch(e){
+ return;
+ }
+ if (window.confirm("Are you sure you want to delete all the checked
member ?")){
+ return true;
+ }
+ return false;
+ }
+ // ]]>
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/koha-tmpl/intranet-tmpl/prog/en/tools clea... [rel_3_0],
Antoine Farnault <=