[Koha-cvs] koha/koha-tmpl/intranet-tmpl/default/en include... [rel_2_2]

Antoine Farnault antoine at koha-fr.org
Fri May 4 18:19:29 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Antoine Farnault <toins>	07/05/04 16:19:29

Modified files:
	koha-tmpl/intranet-tmpl/default/en/includes: menus.inc 
	koha-tmpl/intranet-tmpl/default/en/parameters: admin-home.tmpl 
Added files:
	koha-tmpl/intranet-tmpl/default/en/includes: holidays-bottom.inc 
	                                             holidays-top.inc 
	koha-tmpl/intranet-tmpl/default/en/tools: holidays.tmpl 

Log message:
	synchronizing default & npl

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menus.inc?cvsroot=koha&only_with_tag=rel_2_2&r1=1.1.2.6&r2=1.1.2.7
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/holidays-bottom.inc?cvsroot=koha&only_with_tag=rel_2_2&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/holidays-top.inc?cvsroot=koha&only_with_tag=rel_2_2&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/parameters/admin-home.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.34.2.3&r2=1.34.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/holidays.tmpl?cvsroot=koha&only_with_tag=rel_2_2&rev=1.1.4.1

Patches:
Index: includes/menus.inc
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/includes/Attic/menus.inc,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -b -r1.1.2.6 -r1.1.2.7
--- includes/menus.inc	10 Aug 2006 12:39:38 -0000	1.1.2.6
+++ includes/menus.inc	4 May 2007 16:19:29 -0000	1.1.2.7
@@ -55,7 +55,9 @@
 	<a href="/cgi-bin/koha/loadmodules.pl?module=addbiblio&amp;type=intranet" class="submenu catalogue" onMouseOver="CancelTimeOut(TID)" onMouseOut="LaunchSetOff(2)">Add biblio</a>
 	<hr>
 	<a class="submenu bull" href="/cgi-bin/koha/bull-home.pl" onMouseOver="CancelTimeOut(TID)" onMouseOut="LaunchSetOff(2)">Subscriptions</a>
+	<a class="submenu bull" href="/cgi-bin/koha/bull/claims.pl" onMouseOver="CancelTimeOut(TID)" onMouseOut="LaunchSetOff(2)">Claims</a>
 	<a href="/cgi-bin/koha/bull/lateissues.pl" class="submenu bull" onMouseOver="CancelTimeOut(TID)" onMouseOut="LaunchSetOff(2)">Late issues</a>
+    <a href="/cgi-bin/koha/bull-home.pl?routing=1" class="submenu bull" onMouseOver="CancelTimeOut(TID)" onMouseOut="LaunchSetOff(2)">Routing List</a>
 	<hr />
 	<a href="/cgi-bin/koha/bookshelves/shelves.pl" class="submenu catalogue" onMouseOver="CancelTimeOut(TID)" onMouseOut="LaunchSetOff(2)">Virtual shelves</a>
 </div>

Index: parameters/admin-home.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/parameters/Attic/admin-home.tmpl,v
retrieving revision 1.34.2.3
retrieving revision 1.34.2.4
diff -u -b -r1.34.2.3 -r1.34.2.4
--- parameters/admin-home.tmpl	6 Feb 2006 21:28:24 -0000	1.34.2.3
+++ parameters/admin-home.tmpl	4 May 2007 16:19:29 -0000	1.34.2.4
@@ -117,6 +117,10 @@
 			<td> Exporting in MARC format.</td>
 		</tr>
 		<tr>
+            <td valign="top" width="25%"><a href="/cgi-bin/koha/export/export-holdings.pl">Export Holdings to CSV or XML</a></td>
+            <td>Export Holdings to CSV or XML.</td>
+        </tr>
+		<tr>
 		<th colspan="2">Import</th>
 		</tr>
 		<tr valign="top">
@@ -132,6 +136,11 @@
 			<td>the barcode generator deals with generating barcodes for items you acquire
 			</td>
 		</tr>
+        <th colspan="2">Holidays</th>      
+        <tr valign="top">
+        <td width="20%"><a href="/cgi-bin/koha/tools/holidays.pl">Holidays</a></td>
+        <td>Holidays management</td>
+        </tr>    
 	</table>
 <!-- /TMPL_IF -->
 </div>

Index: includes/holidays-bottom.inc
===================================================================
RCS file: includes/holidays-bottom.inc
diff -N includes/holidays-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ includes/holidays-bottom.inc	4 May 2007 16:19:29 -0000	1.1.4.1
@@ -0,0 +1,4 @@
+
+
+</body>
+</html>

Index: includes/holidays-top.inc
===================================================================
RCS file: includes/holidays-top.inc
diff -N includes/holidays-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ includes/holidays-top.inc	4 May 2007 16:19:29 -0000	1.1.4.1
@@ -0,0 +1,5 @@
+
+
+
+
+

Index: tools/holidays.tmpl
===================================================================
RCS file: tools/holidays.tmpl
diff -N tools/holidays.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/holidays.tmpl	4 May 2007 16:19:29 -0000	1.1.4.1
@@ -0,0 +1,377 @@
+<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
+
+
+<!-- ******************************** FLAT PANELS ******************************************* -->
+<!-- *****           Makes all the flat panel to deal with holidays                     ***** -->
+<!-- **************************************************************************************** -->
+
+<!-- ********************** Panel for showing already loaded holidays *********************** -->
+
+<style type="text/css">
+.normalday { 
+    background-color: #EDEDED;
+    color: Black; 
+    border:1px solid #000000;
+}
+
+.exception {
+    background-color: #EDEDED;
+    color: Black;       
+    border:1px solid #000000;
+}
+
+.holiday { 
+    background-color: red;
+    color: Black; 
+    border:1px solid #000000;
+}
+
+.repeatableday { 
+    background-color: yellow;
+    color: Black; 
+    border:1px solid #000000;
+}
+
+.information {
+    z-index:1;
+    background-color: #DCD2F1;
+    width:300px;
+    display:none;
+    border:1px solid #000000;
+    color: #000000;
+    font-size: 8pt;
+    font-weight: bold;
+    background-color: #FFD700;
+    cursor: pointer;
+    padding:2px;
+}
+
+.panel {
+    z-index:1;
+    width:500px;
+    display:none;
+    border:1px solid #000000;
+    padding:0px;
+}
+
+</style>
+
+<!-- calendar addition.start -->
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
+<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>
+<!-- calendar addition end -->
+
+<script language="JavaScript" type="text/javascript">
+    // Captura el evento onmousemove para cualquier navegador
+    if (document.layers) { // Netscape
+        document.captureEvents(Event.MOUSEMOVE);
+        document.onmousemove = captureMousePosition;
+    } else if (document.all) { // Internet Explorer
+        document.onmousemove = captureMousePosition;
+    } else if (document.getElementById) { // Netcsape 6
+        document.onmousemove = captureMousePosition;
+    }
+
+    var mouseXMax = 0;
+    var mouseYMax = 0;
+    var mouseX = 0;
+    var mouseY = 0;
+
+    function captureMousePosition(e) {
+        if (document.layers) {
+            mouseX = e.pageX;
+            mouseY = e.pageY;
+            mouseXMax = window.innerWidth + window.pageXOffset;
+            mouseYMax = window.innerHeight + window.pageYOffset;
+        } else if (document.all) {
+            mouseX = window.event.x + document.body.scrollLeft;
+            mouseY = window.event.y + document.body.scrollTop;
+            mouseXMax = document.body.clientWidth + document.body.scrollLeft;
+            mouseYMax = document.body.clientHeight + document.body.scrollTop;
+        } else if (document.getElementById) {
+            mouseX = e.pageX;
+            mouseY = e.pageY;
+            mouseXMax = window.innerWidth + window.pageXOffset;
+            mouseYMax = window.innerHeight + window.pageYOffset;
+        }
+    }
+
+    function holidayOperation(formObject, opType) {
+        var op = document.getElementsByName('operation');
+        op[0].value = opType;
+        formObject.submit();
+    }
+
+    // This function shows the "Show Holiday" panel //
+    function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description) {
+        
+        var panel = document.getElementById('showHoliday');
+        panel.style.display = 'inline';
+        document.getElementById('newHoliday').style.display = 'none';
+        panel.style.top = 100;//mouseYMax/2;
+        panel.style.left = 100;//(mouseXMax/2) - 250;
+        document.getElementById('showDayname').value = dayName;
+        document.getElementById('showBranchName').value = document.getElementById('branch').value;
+        document.getElementById('showDay').value = day;
+        document.getElementById('showMonth').value = month;
+        document.getElementById('showYear').value = year;
+        document.getElementById('showDescription').value = description;
+        document.getElementsByName('showWeekday')[0].value = weekDay;
+        document.getElementById('showTitle').value = title;
+        
+        if (exceptionPosibility == 1) {
+            document.getElementById('exceptionPosibility').style.display = 'inline';
+        } else {
+            document.getElementById('exceptionPosibility').style.display = 'none';
+        }
+    }
+
+    // This function shows the "Add Holiday" panel //
+    function newHoliday (dayName, day, month, year, weekDay) {
+        var panel = document.getElementById('newHoliday');
+        panel.style.display = 'inline';
+        document.getElementById('showHoliday').style.display = 'none';
+        panel.style.top = mouseYMax/2;
+        panel.style.left = (mouseXMax/2)  - 250;
+        document.getElementById('newDayname').value = dayName;
+        document.getElementById('newBranchName').value = document.getElementById('branch').value;
+        document.getElementById('newDay').value = day;
+        document.getElementById('newMonth').value = month;
+        document.getElementById('newYear').value = year;
+        document.getElementsByName('newWeekday')[0].value = weekDay;
+    }
+
+    function hidePanel(aPanelName) {
+        document.getElementById(aPanelName).style.display = 'none';
+    }
+
+    function changeBranch () {
+        var branch = document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value;
+        location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch;
+    }
+
+    function additionalInformation (anExplanation) {
+        var panel = document.getElementById('information');
+        var paragraph = document.getElementById('explanation');
+        panel.style.display = 'inline'
+        panel.style.top = mouseY;
+        panel.style.left = mouseX;
+        var info = document.createTextNode(anExplanation);
+        if (paragraph.hasChildNodes()) {
+            paragraph.removeChild(paragraph.lastChild);
+        }
+        paragraph.appendChild(info);
+    }
+
+    function Help() {
+        newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+    }
+</script>
+
+<div class="mainbloc">
+<div class="panel" id="showHoliday">
+ 	<form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post" style="display:inline">
+		<p onclick="javascript: hidePanel('showHoliday');hidePanel('information')" style="cursor:pointer">
+			Hide Details
+			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/signClose.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle">
+		</p>
+		<p>
+			<label>Day name</label>
+			<input type="text" size="20" id="showDayname" name="showDayname" readonly
+						   style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+			<input type="hidden" name="showWeekday"/>
+		</p>
+		<p>
+			<label>Library</label>
+			<input type="text" size="20" id="showBranchName" name="showBranchName" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+		</p>
+		<div style="display:inline">
+			Day <input type="text" size="2" id="showDay" name="showDay" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+			Month <input type="text" size="2" id="showMonth" name="showMonth" readonly
+						        style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+			Year <input type="text" size="4" id="showYear" name="showYear" readonly
+						       style="background-color:#FFFFFF;color:Black;font-size:10px;"/>		
+		</div>
+	    <p>Add a description to holiday day.</p>
+		<p>
+			<textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>	
+		</p>
+		<div id="exceptionPosibility" style="position:static">
+			<input type="radio" name="showOperation" value="exception"> Generate an exception to this holiday
+			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0"   style="vertical-align:middle;cursor:pointer"
+					onclick="javascript: additionalInformation('You can make an exception for this holiday rule. This means that you will be able to say for a repeatable holiday, that there is one of those days that is going to be an exception.')">
+			<br>
+		</div>
+		<input type="radio" name="showOperation" value="delete" checked> Delete this holiday.
+		<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
+			onclick="javascript: additionalInformation('This will delete this holiday rule. In case it is a repeatable holiday, this option checks for posible exceptions. In case those exists, this option take care of set this exceptions to regular holidays.')">
+		<p>
+			<input type="submit" name="submit" id="submit" value="Save">
+			<input type="button" name="cancel2" id="cancel2" value="Cancel" onclick="javascript: hidePanel('showHoliday');hidePanel('information')">
+		</p>
+	</form>
+</div>
+
+<!-- ***************************** Panel to deal with new holidays **********************  -->
+<div class="panel" style="position:absolute;background-color:#CCCCCC" id="newHoliday">
+ 	<form action="/cgi-bin/koha/tools/newHolidays.pl" method="post" style="display:inline">
+		<h2>
+			Add new holiday
+		</h2>
+		<p>
+			<label>Day name</label>
+			<input type="text" size="20" id="newDayname" name="newDayname" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+			<input type="hidden" name="newWeekday"/>
+		</p>
+		<p>
+			<label>Library</label>
+			<input type="text" size="20" id="newBranchName" name="newBranchName" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+		</p>
+		<div style="display:inline">
+			Day <input type="text" size="2" id="newDay" name="newDay" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+			Month <input type="text" size="2" id="newMonth" name="newMonth"  readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+			Year <input type="text" size="4" id="newYear" name="newYear" readonly style="background-color:#FFFFFF;color:Black;font-size:10px;"/>
+		</div>
+		<p>
+			<label>Add a description to holiday day</label>
+			<textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
+		</p>
+			<input type="radio" name="newOperation" value="holiday" checked> Holiday only on this day.
+			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
+			onclick="javascript: additionalInformation('This will take this date to make it holiday just for this time. Through this option, you can set a single holiday. For example, suppose you are in August 1st, and only for this year you want to make it holiday.')">
+			<br>
+			<input type="radio" name="newOperation" value="weekday"> Holiday repeated every same day of the week
+			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer" onclick="javascript: additionalInformation('This will take this week day and make it holiday. No matter what date it is, this option will repeat this rule for every week. For example, if this date correspond to a saturday, every saturdays will be holidays.')">
+			<br>
+			<input type="radio" name="newOperation" value="repeatable">Holiday repeated yearly on the same date.
+			<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer" onclick="javascript: additionalInformation('This will take this day and month as a reference to make it holiday. Through this option, you can repeat this rule for every year. For example, if this date correspond to a August 1st, every August 1st will be holiday, no matter what year you are.')">
+			<p>
+				<input type="submit" name="submit" id="submit" value="Save"/>
+				<input type="button" name="cancel2" id="cancel2" value="Cancel" onclick="javascript: hidePanel('newHoliday');hidePanel('information')">
+			</p>
+ 	</form>
+</div>
+
+
+<!-- *************************************************************************************** -->
+<!-- ******                          END OF FLAT PANELS                               ****** -->
+<!-- *************************************************************************************** -->
+
+
+
+<!-- *************************************************************************************** -->
+<!-- ******                     START OF INFORMATION PANEL                            ****** -->
+<!-- *************************************************************************************** -->
+
+<div class="information" style="position:absolute" id="information" onclick="javascript: hidePanel('information')" onblur="javascript: hidePanel('information')">
+	<table>
+		<tr>
+			<td valign="top">
+				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/info.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle">
+			</td>
+			<td valign="top">
+				<p id="explanation" style="display:inline;align:justify"></p>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<!-- ************************************************************************************** -->
+<!-- ******                      END OF INFORMATION PANEL                            ****** -->
+<!-- ************************************************************************************** -->
+
+
+
+<h1>Define the holidays for branch <!-- TMPL_VAR name="BRANCHES" --></h1>
+	<ul>
+		<li>Search in the calendar the day you want to set as holiday.</li>
+		<li>Complete the information in the right area.</li>
+		<li>Once you finish the steps above, click Save.</li>
+	</ul>
+	<p>
+		<span class="normalday">Working day</span>
+		<span class="holiday">Unique holiday</span>
+		<span class="repeatableday">Repeatable holiday</span>
+		<span class="exception">Holiday exception</span>
+	</p>
+
+<!-- ************************************************************************************** -->
+<!-- ******                              MAIN SCREEN CODE                            ****** -->
+<!-- ************************************************************************************** -->
+<h2>Calendar information</h2>
+<div id="calendar-container">
+<script type="text/javascript">
+	/* Creates all the structures to deal with all diferents kinds of holidays */
+	var week_days = new Array();
+	var holidays = new Array();
+	var exception_holidays = new Array();
+	var day_month_holidays = new Array();
+	var hola= "<!-- TMPL_VAR NAME="code" -->";
+	<!-- TMPL_LOOP NAME="WEEK_DAYS_LOOP" -->
+	week_days["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+	<!-- /TMPL_LOOP -->
+	<!-- TMPL_LOOP NAME="HOLIDAYS_LOOP" -->
+	holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+	<!-- /TMPL_LOOP -->
+	<!-- TMPL_LOOP NAME="EXCEPTION_HOLIDAYS_LOOP" -->
+	exception_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+	<!-- /TMPL_LOOP -->
+	<!-- TMPL_LOOP NAME="DAY_MONTH_HOLIDAYS_LOOP" -->
+	day_month_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+	<!-- /TMPL_LOOP -->
+
+	/* This function gives css clases to each kind of day */
+	function dateStatusHandler(date) {
+		var day = date.getDate();
+		var month = date.getMonth() + 1;
+		var year = date.getFullYear();
+		var weekDay = date.getDay();
+		var dayMonth = month + '/' + day;
+		var dateString = year + '/' + month + '/' + day;
+		if (exception_holidays[dateString] != null) {
+			return 'exception';
+		} else if ((week_days[weekDay] != null) || (day_month_holidays[dayMonth] != null)) {
+			return 'repeatableday';
+		} else if (holidays[dateString] != null) {
+			return 'holiday';
+		} else {
+			return 'normalday';
+		}
+	}
+
+	/* This function is in charge of showing the correct panel considering the kind of holiday */
+	function dateChanged(calendar) {
+		var day = calendar.date.getDate();
+		var month = calendar.date.getMonth() + 1;
+		var year = calendar.date.getFullYear();
+		var weekDay = calendar.date.getDay();
+		var dayName = calendar.date.print('%A');
+		var dayMonth = month + '/' + day;
+		var dateString = year + '/' + month + '/' + day;
+		if (calendar.dateClicked) {
+			if (holidays[dateString] != null) {
+				showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, 	holidays[dateString].description);
+			} else if (exception_holidays[dateString] != null) {
+				showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description);
+			} else if (week_days[weekDay] != null) {
+				showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, 	week_days[weekDay].description);
+			} else if (day_month_holidays[dayMonth] != null) {
+				showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description);
+			} else {
+				newHoliday(dayName, day, month, year, weekDay);
+			}
+		}
+	};
+	Calendar.setup(
+		{
+			flat : "calendar-container",
+			flatCallback : dateChanged,
+			dateStatusFunc : dateStatusHandler
+		}
+	);
+</script>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->





More information about the Koha-cvs mailing list