koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/koha-tmpl/intranet-tmpl/ccfls/en includes/... [dev_week]


From: Kyle Hall
Subject: [Koha-cvs] koha/koha-tmpl/intranet-tmpl/ccfls/en includes/... [dev_week]
Date: Fri, 18 May 2007 16:33:02 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Kyle Hall <kylemhall>   07/05/18 16:33:02

Modified files:
        koha-tmpl/intranet-tmpl/ccfls/en/includes: holidays-top.inc 
Added files:
        koha-tmpl/intranet-tmpl/ccfls/en/includes: holidays-bottom.inc 
        koha-tmpl/intranet-tmpl/ccfls/en/tools: holidays.tmpl 

Log message:
        Added new holidays templates.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/ccfls/en/includes/holidays-top.inc?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.1&r2=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/ccfls/en/includes/holidays-bottom.inc?cvsroot=koha&only_with_tag=dev_week&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/ccfls/en/tools/holidays.tmpl?cvsroot=koha&only_with_tag=dev_week&rev=1.1.2.1

Patches:
Index: includes/holidays-top.inc
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/ccfls/en/includes/Attic/holidays-top.inc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- includes/holidays-top.inc   21 Feb 2007 15:40:00 -0000      1.1.2.1
+++ includes/holidays-top.inc   18 May 2007 16:33:02 -0000      1.1.2.2
@@ -91,7 +91,7 @@
 
        function changeBranch () {
                var branch = 
document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value;
-               location.href='/cgi-bin/koha/holidays.pl?branch=' + branch;
+               location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + 
branch;
        }
 
        function additionalInformation (anExplanation) {

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        18 May 2007 16:33:02 -0000      1.1.2.1
@@ -0,0 +1,4 @@
+
+
+</body>
+</html>

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 18 May 2007 16:33:02 -0000      1.1.2.1
@@ -0,0 +1,347 @@
+<!-- TMPL_INCLUDE NAME="holidays-top.inc" -->
+<!-- TMPL_IF Name="borrowernumber" -->: Issuing to <!-- TMPL_VAR 
name="surname" -->, <!-- TMPL_VAR name="firstname" -->
+(<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --><!-- TMPL_INCLUDE 
NAME="doc-head-close.inc" --><!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<div id="main">
+
+
+
+<h1 class="reports">Holidays</h1>
+<h2>Define the holidays for branch <!-- TMPL_VAR name="BRANCHES" --></h2>
+
+       <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>
+
+
+<!-- *************************************** FLAT PANELS 
**************************************************** -->
+<!-- *****                      Makes all the flat panel to deal with holidays 
                         ***** -->
+<!-- 
********************************************************************************************************
 -->
+
+<!-- *************************** Panel for showing already loaded holidays 
********************************** -->
+<div class="panel" style="position:absolute" id="showHoliday">
+       <form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post" 
style="display:inline">
+                       <table style="background-color:#EFEFEF;border:1px" 
align="center">
+                       <tr>
+                               <th colspan="2">
+                                       <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>
+                               </th>
+                       </tr>
+                       <tr>
+                               <td>
+                                       Day name
+                               </td>
+                               <td>
+                                       Library
+                               </td>
+                       <tr>
+                       </tr>
+                               <td>
+                                       <input type="text" size="20" 
id="showDayname" name="showDayname" readonly
+                                                  
style="background-color:#FFFFFF;color:Black"/>
+                                       <input type="hidden" 
name="showWeekday"/>
+                               </td>
+                               <td>
+                                       <input type="text" size="20" 
id="showBranchName" name="showBranchName" readonly 
style="background-color:#FFFFFF;color:Black"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2">
+                                       <div style="display:inline">
+                                               Day&nbsp;<input type="text" 
size="4" id="showDay" name="showDay" readonly
+                                                      
style="background-color:#FFFFFF;color:Black"/>Month&nbsp<input type="text" 
size="4" id="showMonth" name="showMonth" readonly
+                                                       
style="background-color:#FFFFFF;color:Black"/> Year<input type="text" size="4" 
id="showYear" name="showYear" readonly
+                                                      
style="background-color:#FFFFFF;color:Black"/>           
+                                       </div>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2">
+                                       <div style="display:inline">            
                
+                                               Day title
+                                       </div>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2">
+                                   Description of holiday.
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2" align="center">
+                                       <textarea rows="4" cols="40" 
id="showDescription" name="showDescription" readonly ></textarea>  
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2" align="left">
+
+
+
+<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" bord
+er="0"   style="vertical-align:middle;cursor:pointer"
+                    onclick="javascript: additionalInformation('You can make 
an exception for this h
+oliday 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.')">
+                               </td>
+                       </tr>
+                       <tr>
+                               <td align="right">
+                                       <input type="submit" name="submit" 
id="submit" value="Save">
+                               </td>
+                               <td align="left">
+                                       <input type="button" name="cancel2" 
id="cancel2" value="Cancel" onclick="javascript: 
hidePanel('showHoliday');hidePanel('information')">
+                               </td>
+                       </tr>
+               </table>
+       </form>
+</div>
+
+<!-- ********************************** Panel to deal with new holidays 
**********************************  -->
+<div class="panel" style="position:absolute" id="newHoliday">
+       <form action="/cgi-bin/koha/tools/newHolidays.pl" method="post" 
style="display:inline">
+               <table style="background-color:#EFEFEF" align="center">
+                       <tr>
+                               <th colspan="2">
+                                       <p onclick="javascript: 
hidePanel('newHoliday');hidePanel('information')"
+                                          style="cursor:pointer">
+                                          Add new holiday - Hide details
+                                          <img src="<!-- TMPL_VAR 
NAME="themelang" -->/images/signClose.gif" hspace="0" vspace="0" border="0"     
+                                       style="vertical-align:middle">
+                                       </p>
+                               </th>
+                       </tr
+                       ><tr>
+                               <td>
+                                       Day name
+                               </td>
+                               <td>
+                                       Library
+                               </td>
+                       <tr>
+                       </tr>
+                               <td>
+                                       <input type="text" size="20" 
id="newDayname" name="newDayname" readonly
+                                                  
style="background-color:#FFFFFF;color:Black"/>
+                                       <input type="hidden" name="newWeekday"/>
+                               </td>
+                               <td>
+                                       <input type="text" size="20" 
id="newBranchName" name="newBranchName" readonly
+                                                  
style="background-color:#FFFFFF;color:Black"/>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2">
+                                       <div style="display:inline">
+                                               Day&nbsp<input type="text" 
size="4" id="newDay" name="newDay" readonly 
style="background-color:#FFFFFF;color:Black"/>Month&nbsp<input type="text" 
size="4" id="newMonth" name="newMonth"  readonly 
style="background-color:#FFFFFF;color:Black"/> Year&nbsp<input type="text" 
size="4" id="newYear" name="newYear" readonly 
style="background-color:#FFFFFF;color:Black"/>
+                                       </div>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2">
+                                       <div style="display:inline">            
                
+                                               Title day
+                                       </div>
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2">
+                                       Add a description to holiday day.
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2" align="center">
+                                       <textarea rows="4" cols="40" 
id="newDescription" name="newDescription"></textarea>      
+                               </td>
+                       </tr>
+                       <tr>
+                               <td colspan="2" align="left">
+                                       <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.')">
+                               </td>
+                       </tr>
+                       <tr>
+                               <td align="right">
+                                       <input type="submit" name="submit" 
id="submit" value="Save"/>
+                               </td>
+                               <td align="left">
+                                       <input type="button" name="cancel2" 
id="cancel2" value="Cancel" onclick="javascript: 
hidePanel('newHoliday');hidePanel('information')">
+                               </td>
+                       </tr>
+               </table>
+       </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              
                        ****** -->
+<!-- 
********************************************************************************************************
 -->
+
+
+
+
+<!-- 
********************************************************************************************************
 -->
+<!-- ******                                 MAIN SCREEN CODE                   
                        ****** -->
+<!-- 
********************************************************************************************************
 -->
+                       
+                       <br>
+                       <br>
+                       <table align="center" style="width:50%">
+                               <tr>
+                                       <th colspan="2">Calendar 
information</th>
+                               </tr>
+                               <tr valign="top" align="center">
+                                       <td align="center" valign="top" 
style="padding:2%">
+                                               <div id="calendar-container" 
align="center"></div>
+                                               <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>                       
                        
+                                       </td>
+                                       <td align="left" style="padding:2%">
+                                               <fieldset>
+                                                       
<legend>References</legend>
+                                                       <br>
+                                                       <div 
style="display:inline">
+                                                       <span 
class="normalday">Working day</span>
+                                                       </div>
+                                                       <br>
+                                                       <br>
+                                                               <div 
style="display:inline">
+                                                       <span 
class="holiday">Unique day</span>
+                                                       </div>
+                                                       <br>
+                                                       <br>
+
+                                               <div style="display:inline">
+                                                       <span 
class="repeatableday">Repeating Holiday</span>
+                                                       </div>
+                                                       <br>
+                                                       <br>
+
+
+                                               <div style="display:inline">
+                                                       <span 
class="exception">Holiday Exception</span>
+                                                       </div>
+                                                       <br>
+                                                       <br>
+
+
+                                               </fieldset>
+                                       </td>
+                               </tr>
+               </table>
+</div>
+<!-- TMPL_INCLUDE NAME="holidays-bottom.inc" -->




reply via email to

[Prev in Thread] Current Thread [Next in Thread]