french translation, updated
[koha.git] / koha-tmpl / intranet-tmpl / prog / fr / modules / tools / holidays.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Outils &rsaquo; Jours de fermeture</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <script language="JavaScript" type="text/javascript">
6         // Captura el evento onmousemove para cualquier navegador
7         if (document.layers) { // Netscape
8                 document.captureEvents(Event.MOUSEMOVE);
9             document.onmousemove = captureMousePosition;
10         } else if (document.all) { // Internet Explorer
11             document.onmousemove = captureMousePosition;
12         } else if (document.getElementById) { // Netcsape 6
13             document.onmousemove = captureMousePosition;
14         }
15
16         var mouseXMax = 0;
17         var mouseYMax = 0;
18         var mouseX = 0;
19         var mouseY = 0;
20
21         function captureMousePosition(e) {
22             if (document.layers) {
23                     mouseX = e.pageX;
24                         mouseY = e.pageY;
25                 mouseXMax = window.innerWidth + window.pageXOffset;
26                     mouseYMax = window.innerHeight + window.pageYOffset;
27             } else if (document.all) {
28                     mouseX = window.event.x + document.body.scrollLeft;
29                 mouseY = window.event.y + document.body.scrollTop;
30                 mouseXMax = document.body.clientWidth + document.body.scrollLeft;
31                 mouseYMax = document.body.clientHeight + document.body.scrollTop;
32             } else if (document.getElementById) {
33                 mouseX = e.pageX;
34                     mouseY = e.pageY;
35                 mouseXMax = window.innerWidth + window.pageXOffset;
36                 mouseYMax = window.innerHeight + window.pageYOffset;
37             }
38         }
39
40         function holidayOperation(formObject, opType) {
41                 var op = document.getElementsByName('operation');
42                 op[0].value = opType;
43                 formObject.submit();
44         }
45
46         // This function shows the "Show Holiday" panel //
47         function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description) {
48                 
49                 var panel = document.getElementById('showHoliday');
50                 panel.style.display = 'inline';
51                 document.getElementById('newHoliday').style.display = 'none';
52                 panel.style.top = mouseYMax/2;
53                 panel.style.left = (mouseXMax/2) - 250;
54                 document.getElementById('showDayname').value = dayName;
55                 document.getElementById('showBranchName').value = document.getElementById('branch').value;
56                 document.getElementById('showDay').value = day;
57                 document.getElementById('showMonth').value = month;
58                 document.getElementById('showYear').value = year;
59                 document.getElementById('showDescription').value = description;
60                 document.getElementsByName('showWeekday')[0].value = weekDay;
61                 document.getElementById('showTitle').value = title;
62                 
63                 if (exceptionPosibility == 1) {
64                         document.getElementById('exceptionPosibility').style.display = 'inline';
65                 } else {
66                         document.getElementById('exceptionPosibility').style.display = 'none';
67                 }
68         }
69
70         // This function shows the "Add Holiday" panel //
71         function newHoliday (dayName, day, month, year, weekDay) {
72                 var panel = document.getElementById('newHoliday');
73                 panel.style.display = 'inline';
74                 document.getElementById('showHoliday').style.display = 'none';
75                 panel.style.top = mouseYMax/2;
76                 panel.style.left = (mouseXMax/2)  - 250;
77                 document.getElementById('newDayname').value = dayName;
78                 document.getElementById('newBranchName').value = document.getElementById('branch').value;
79                 document.getElementById('newDay').value = day;
80                 document.getElementById('newMonth').value = month;
81                 document.getElementById('newYear').value = year;
82                 document.getElementsByName('newWeekday')[0].value = weekDay;
83         }
84
85         function hidePanel(aPanelName) {
86                 document.getElementById(aPanelName).style.display = 'none';
87         }
88
89         function changeBranch () {
90                 var branch = document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value;
91                 location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch;
92         }
93
94         function additionalInformation (anExplanation) {
95                 var panel = document.getElementById('information');
96                 var paragraph = document.getElementById('explanation');
97                 panel.style.display = 'inline'
98                 panel.style.top = mouseY;
99                 panel.style.left = mouseX;
100                 var info = document.createTextNode(anExplanation);
101                 if (paragraph.hasChildNodes()) {
102                         paragraph.removeChild(paragraph.lastChild);
103                 }
104                 paragraph.appendChild(info);
105         }
106
107         function Help() {
108                 newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
109         }
110 </script>
111
112 <style type="text/css">
113 .normalday { 
114         background-color :  #EDEDED;
115         color :  Black; 
116         border : 1px solid #000000;
117 }
118
119 .exception {
120         background-color :  #EDEDED;
121         color :  Black;                 
122         border : 1px solid #000000;
123 }
124
125 .holiday { 
126         background-color :  red;
127         color :  Black; 
128         border : 1px solid #000000;
129 }
130
131 .repeatableday { 
132         background-color :  yellow;
133         color :  Black; 
134         border : 1px solid #000000;
135 }
136
137 .information {
138         z-index : 1;
139         background-color :  #DCD2F1;
140         width : 300px;
141         display : none;
142         border : 1px solid #000000;
143         color :  #000000;
144         font-size :  8pt;
145         font-weight :  bold;
146     background-color :  #FFD700;
147         cursor :  pointer;
148         padding : 2px;
149 }
150
151 .panel {
152         z-index : 1;
153         width : 500px;
154         display : none;
155         border : 1px solid #000000;
156         padding : 0px;
157 }
158
159 </style>
160 </head>
161 <body>
162 <!-- TMPL_INCLUDE NAME="header.inc" -->
163 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
164
165 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl"> Accueil </a> &rsaquo;<a href="/cgi-bin/koha/reports/tools-home.pl">Outils</a> &rsaquo; Jours de fermeture</div>
166
167 <div id="doc3" class="yui-t2">
168    
169    <div id="bd">
170         <div id="yui-main">
171         <div class="yui-b">
172
173
174 <!-- ******************************** FLAT PANELS ******************************************* -->
175 <!-- *****           Makes all the flat panel to deal with holidays                     ***** -->
176 <!-- **************************************************************************************** -->
177
178 <!-- ********************** Panel for showing already loaded holidays *********************** -->
179 <div class="panel" style="position:absolute;background-color:#CCCCCC" id="showHoliday">
180         <form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post">
181                 <p onclick=" hidePanel('showHoliday');hidePanel('information')" style="cursor:pointer">
182                         Cacher les détails
183                         <img src="<!-- TMPL_VAR NAME="themelang" -->/images/signClose.gif" border="0" alt="" style="vertical-align:middle" />
184                 </p>
185                 <p>
186                         <label for="showDayname">Nom du jour</label>
187                         <input type="text" size="20" id="showDayname" name="showDayname" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
188                         <input type="hidden" name="showWeekday" />
189                 </p>
190                 <p>
191                         <label for="showBranchName">Site</label>
192                         <input type="text" size="20" id="showBranchName" name="showBranchName" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
193                 </p>
194                 <div style="display:inline">
195                         <label for="showDay">Jour</label> <input type="text" size="2" id="showDay" name="showDay" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
196                         <label for="showMonth">Mois</label> <input type="text" size="2" id="showMonth" name="showMonth" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
197                         <label for="showYear">Année</label> <input type="text" size="4" id="showYear" name="showYear" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />              
198                 </div>
199             <p><label for="showDescription">Ajouter une description au jour de fermeture</label></p>
200                 <p>
201                         <textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>    
202                 </p>
203                 <div id="exceptionPosibility" style="position:static">
204                         <input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Créer une exception à ce jour de fermeture</label>
205                         <a href="#" onclick=" 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.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
206                 </div>
207                 <input type="radio" name="showOperationDel" value="delete" checked="checked" /> <label for="showOperationDel">Supprimer ce jour de fermeture</label>.  <a href="#" onclick=" 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.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
208                 <p>
209                         <input type="submit" name="submit" value="Valider">
210                         <input type="button" name="cancel2" value="Annuler" onclick=" hidePanel('showHoliday');hidePanel('information')">
211                 </p>
212         </form>
213 </div>
214
215 <!-- ***************************** Panel to deal with new holidays **********************  -->
216 <div class="panel" style="position:absolute;background-color:#CCCCCC" id="newHoliday">
217         <form action="/cgi-bin/koha/tools/newHolidays.pl" method="post">
218                 <h2>
219                         Ajouter un nouveau jour férié
220                 </h2>
221                 <p>
222                         <label for="newDayname">Nom du jour</label>
223                         <input type="text" size="20" id="newDayname" name="newDayname" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
224                         <input type="hidden" name="newWeekday" />
225                 </p>
226                 <p>
227                         <label for="newBranchName">Site</label>
228                         <input type="text" size="20" id="newBranchName" name="newBranchName" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
229                 </p>
230                 <div style="display:inline">
231                         <label for="newDay">Jour</label> <input type="text" size="2" id="newDay" name="newDay" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
232                         <label for="newMonth">Mois</label> <input type="text" size="2" id="newMonth" name="newMonth"  readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
233                         <label for="newYear">Année</label> <input type="text" size="4" id="newYear" name="newYear" readonly="readonly" style="background-color:#FFFFFF;color:Black;font-size:10px;" />
234                 </div>
235                 <p>
236                         <label for="newDescription">Ajouter la description d'un jour férié</label>
237                         <textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
238                 </p>
239                         <input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" /> <label for="newOperationOnce">Fermeture seulement ce jour là</label>.  <a href="#" onclick=" 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.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
240                         <br />
241                         <input type="radio" name="newOperation" id="newOperationDay" value="weekday" /> <label for="newOperationDay">Jour de fermeture répété toujours le même jour de la semaine</label>
242                         <a href="#" onclick=" 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.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
243                         <br />
244                         <input type="radio" name="newOperation" id="newOperationYear" value="repeatable" /><label for="newOperationYear">Jour de fermeture répété chaque année à la même date</label>.  <a href="#" onclick=" 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.')"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" border="0" alt="Plus d'information"></a>
245                         <p>
246                                 <input type="submit" name="submit" value="Valider">
247                                 <input type="button" name="cancel2" value="Annuler" onclick=" hidePanel('newHoliday');hidePanel('information')">
248                         </p>
249         </form>
250 </div>
251
252
253 <!-- *************************************************************************************** -->
254 <!-- ******                          END OF FLAT PANELS                               ****** -->
255 <!-- *************************************************************************************** -->
256
257
258
259 <!-- *************************************************************************************** -->
260 <!-- ******                     START OF INFORMATION PANEL                            ****** -->
261 <!-- *************************************************************************************** -->
262
263 <div class="information" style="position:absolute" id="information" onclick=" hidePanel('information')">
264         <table>
265                 <tr>
266                         <td>
267                                 <img src="<!-- TMPL_VAR NAME="themelang" -->/images/info.gif" border="0" style="vertical-align:middle" alt="" />
268                         </td>
269                         <td>
270                                 <p id="explanation" style="display:inline;align:justify"></p>
271                         </td>
272                 </tr>
273         </table>
274 </div>
275
276 <!-- ************************************************************************************** -->
277 <!-- ******                      END OF INFORMATION PANEL                            ****** -->
278 <!-- ************************************************************************************** -->
279
280
281
282 <h1>Définir les jours fériés du site <!-- TMPL_VAR name="BRANCHES" --></h1>
283         <ul>
284                 <li>Rechercher dans le calendrier le jour que vous voulez définir comme férié.</li>
285                 <li>Compléter l'information dans le champ adéquat.</li>
286                 <li>Après avoir fini l'étape ci-dessus, cliquer sur Valider.</li>
287         </ul>
288         <p>
289                 <span class="normalday">Jour ouvrable</span>
290                 <span class="holiday">Jour férié unique</span>
291                 <span class="repeatableday">Jour férié répétable</span>
292                 <span class="exception">Exception à un jour férié</span>
293         </p>
294
295 <!-- ************************************************************************************** -->
296 <!-- ******                              MAIN SCREEN CODE                            ****** -->
297 <!-- ************************************************************************************** -->
298 <h2>Calendrier</h2>
299 <div id="calendar-container">
300 <script type="text/javascript">
301         /* Creates all the structures to deal with all diferents kinds of holidays */
302         var week_days = new Array();
303         var holidays = new Array();
304         var exception_holidays = new Array();
305         var day_month_holidays = new Array();
306         var hola= "<!-- TMPL_VAR NAME="code" -->";
307         <!-- TMPL_LOOP NAME="WEEK_DAYS_LOOP" -->
308         week_days["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
309         <!-- /TMPL_LOOP -->
310         <!-- TMPL_LOOP NAME="HOLIDAYS_LOOP" -->
311         holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
312         <!-- /TMPL_LOOP -->
313         <!-- TMPL_LOOP NAME="EXCEPTION_HOLIDAYS_LOOP" -->
314         exception_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
315         <!-- /TMPL_LOOP -->
316         <!-- TMPL_LOOP NAME="DAY_MONTH_HOLIDAYS_LOOP" -->
317         day_month_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
318         <!-- /TMPL_LOOP -->
319
320         /* This function gives css clases to each kind of day */
321         function dateStatusHandler(date) {
322                 var day = date.getDate();
323                 var month = date.getMonth() + 1;
324                 var year = date.getFullYear();
325                 var weekDay = date.getDay();
326                 var dayMonth = month + '/' + day;
327                 var dateString = year + '/' + month + '/' + day;
328                 if (exception_holidays[dateString] != null) {
329                         return 'exception';
330                 } else if ((week_days[weekDay] != null) || (day_month_holidays[dayMonth] != null)) {
331                         return 'repeatableday';
332                 } else if (holidays[dateString] != null) {
333                         return 'holiday';
334                 } else {
335                         return 'normalday';
336                 }
337         }
338
339         /* This function is in charge of showing the correct panel considering the kind of holiday */
340         function dateChanged(calendar) {
341                 var day = calendar.date.getDate();
342                 var month = calendar.date.getMonth() + 1;
343                 var year = calendar.date.getFullYear();
344                 var weekDay = calendar.date.getDay();
345                 var dayName = calendar.date.print('%A');
346                 var dayMonth = month + '/' + day;
347                 var dateString = year + '/' + month + '/' + day;
348                 if (calendar.dateClicked) {
349                         if (holidays[dateString] != null) {
350                                 showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title,  holidays[dateString].description);
351                         } else if (exception_holidays[dateString] != null) {
352                                 showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description);
353                         } else if (week_days[weekDay] != null) {
354                                 showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title,    week_days[weekDay].description);
355                         } else if (day_month_holidays[dayMonth] != null) {
356                                 showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description);
357                         } else {
358                                 newHoliday(dayName, day, month, year, weekDay);
359                         }
360                 }
361         };
362         Calendar.setup(
363                 {
364                         flat : "calendar-container",
365                         flatCallback : dateChanged,
366                         dateStatusFunc : dateStatusHandler
367                 }
368         );
369 </script>
370 </div>
371 </div>
372 </div>
373 <div class="yui-b">
374 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
375 </div>
376 </div>
377 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->