Changed wording of some Print buttons and links to survive MU2 testing.
[openemr.git] / interface / main / calendar / modules / PostCalendar / pntemplates / default / views / global / fancy_navigation.html
blobcb2eead442b96afde949636feb632e10658c6230
1 <style>
2 a {
3 text-decoration:none;
5 td {
6 font-family: Arial, Helvetica, sans-serif;
8 .tacell {
9 font-size:10pt;
10 background-color:#e8eef7;
11 text-align:right;
13 .tucell {
14 font-size:10pt;
15 background-color:#f6c6c6;
16 text-align:right;
18 .eacell {
19 font-size:10pt;
20 background-color:#ffffff;
22 .eucell {
23 font-size:10pt;
24 background-color:#ebebeb;
26 .bordyy {
28 .bordyn {
29 border-top-width:0px;
30 padding-top:0px;
32 .bordny {
33 border-bottom-width:0px;
34 padding-bottom:0px;
36 .bordnn {
37 border-top-width:0px;
38 border-bottom-width:0px;
39 padding-top:0px;
40 padding-bottom:0px;
42 div.tiny { width:1px; height:1px; font-size:1px; }
44 /* (CHEMED) */
46 .selectors_container {
47 position: absolute;
48 top: 25px;
49 left: 0px;
50 z-index: 3;
51 float: right;
52 width: 600px;
53 height: 180px;
54 visibility: hidden;
55 background-color: #B0C4DE;
56 border-top: solid 2px #E8EEF7;
57 border-left: solid 2px #E8EEF7;
58 border-bottom: solid 2px #000000;
59 border-right: solid 2px #000000;
62 .selectors_lists_container {
63 float: left;
64 padding: 5px;
67 .selectors_cal_container {
68 float: left;
69 padding: 5px;
72 .selector_buttons {
73 position: absolute;
74 top: 0px;
75 left: 0px;
76 height: 30;
79 .navigation_buttons {
80 position: absolute;
81 top: 0px;
82 left: 40%;
83 height: 30;
86 .service_buttons {
87 position: absolute;
88 top: 0px;
89 right: 20px;
90 height: 30;
93 .viewtype_selected {
94 border: #000000 solid 1px;
97 .viewtype {
100 .apptstatus {
101 font-family: Verdana, Arial, Helvetica, sans-serif;
102 font-size: 9pt;
103 color: #000000;
104 font-weight: bold;
105 margin: 0px 2px 0px 2px;
108 .appttime {
109 font-family: Verdana, Arial, Helvetica, sans-serif;
110 font-size: 9pt;
111 margin-left: 2px;
112 border-left: solid 1px #000000;
115 .apptname {
116 font-family: Verdana, Arial, Helvetica, sans-serif;
117 font-size: 9pt;
118 margin-right: 2px;
119 border-right: solid 1px #000000;
121 .cal_date_range {
122 padding: 0px;
123 margin-top: 35px;
127 /*END (CHEMED) */
129 </style>
131 <style type="text/css">@import url(../../../library/dynarch_calendar.css);</style>
132 <script type="text/javascript" src="../../../library/dialog.js"></script>
133 <script type="text/javascript" src="../../../library/textformat.js"></script>
134 <script type="text/javascript" src="../../../library/dynarch_calendar.js"></script>
135 [-php-] include_once("{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); [-/php-]
136 <script type="text/javascript" src="../../../library/dynarch_calendar_setup.js"></script>
138 <script language='JavaScript'>
140 var mypcc = '[-php-] echo $GLOBALS['phone_country_code'] [-/php-]';
142 // This is called from the event editor popup.
143 function refreshme() {
144 top.restoreSession();
145 document.forms[0].submit();
148 function newEvt(startampm, starttimeh, starttimem, eventdate, providerid, catid) {
149 dlgopen('add_edit_event.php?startampm=' + startampm +
150 '&starttimeh=' + starttimeh + '&starttimem=' + starttimem +
151 '&date=' + eventdate + '&userid=' + providerid + '&catid=' + catid,
152 '_blank', 550, 310);
155 function oldEvt(eventdate, eventid) {
156 dlgopen('add_edit_event.php?date='+eventdate+'&eid=' + eventid, '_blank', 550, 310);
159 function goPid(pid) {
160 top.restoreSession();
161 [-php-]
162 if ($GLOBALS['concurrent_layout'])
165 echo " top.RTop.location = '../../patient_file/summary/demographics.php' " .
166 "+ '?set_pid=' + pid;\n";
168 } else {
169 echo " top.location = '../../patient_file/patient_file.php' " .
170 "+ '?set_pid=' + pid + '&pid=' + pid;\n";
172 [-/php-]
175 function GoToToday(theForm){
176 var todays_date = new Date();
177 var theMonth = todays_date.getMonth() + 1;
178 theMonth = theMonth < 10 ? "0" + theMonth : theMonth;
179 theForm.jumpdate.value = todays_date.getFullYear() + "-" + theMonth + "-" + todays_date.getDate();
180 top.restoreSession();
181 theForm.submit();
184 //(CHEMED)
185 function ShowFacility() {
186 var sel = document.getElementById('all_users');
187 if (sel) {sel.value = '__PC_ALL__';} //Show all the users in the facility when switching facilities
188 document.getElementById('cal_navigator').submit();
191 function ChangeViewType(viewtype) {
192 document.getElementById('viewtype').value = viewtype;
193 document.getElementById('cal_navigator').submit();
195 //END (CHEMED)
197 </script>
199 <!-- Required for the popup date selectors -->
200 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1;">&nbsp;</div>
202 [-php-]
204 // A_CATEGORY is an ordered array of associative-array categories.
205 // Keys of interest are: id, name, color, desc, event_duration.
207 // echo "<!-- A_CATEGORY = "; print_r($this->_tpl_vars['A_CATEGORY']); echo " -->\n"; // debugging
208 // echo "<!-- A_EVENTS = "; print_r($this->_tpl_vars['A_EVENTS']); echo " -->\n"; // debugging
210 $A_CATEGORY =& $this->_tpl_vars['A_CATEGORY'];
212 $A_EVENTS =& $this->_tpl_vars['A_EVENTS'];
213 // $S_EVENTS =& $this->_tpl_vars['S_EVENTS']; // Deleted by Rod
214 $providers =& $this->_tpl_vars['providers'];
215 $times =& $this->_tpl_vars['times'];
216 $interval = $this->_tpl_vars['interval'];
217 $viewtype = $this->_tpl_vars['VIEW_TYPE'];
218 $PREV_WEEK_URL = $this->_tpl_vars['PREV_WEEK_URL'];
219 $NEXT_WEEK_URL = $this->_tpl_vars['NEXT_WEEK_URL'];
220 $PREV_DAY_URL = $this->_tpl_vars['PREV_DAY_URL'];
221 $NEXT_DAY_URL = $this->_tpl_vars['NEXT_DAY_URL'];
223 $Date = postcalendar_getDate();
224 if (!isset($y)) $y = substr($Date, 0, 4);
225 if (!isset($m)) $m = substr($Date, 4, 2);
226 if (!isset($d)) $d = substr($Date, 6, 2);
228 // echo "<!-- There are " . count($A_EVENTS) . " A_EVENTS days -->\n";
230 // $MULTIDAY = count($A_EVENTS) > 1; // (CHEMED) not needed after week_view template changes
232 $provinfo = getProviderInfo('%', true, $_SESSION['pc_facility']); //(CHEMED)
234 [-/php-]
236 <form name='theform' id='cal_navigator' action='index.php?module=PostCalendar&func=view&tplview=default&pc_category=&pc_topic='
237 method='post' onsubmit='return top.restoreSession()'>
239 <div class='selector_buttons'>
241 <img src='../../pic/show_calendar.gif' id='img_jumpdate' align='absbottom'
242 width='24' height='22' border='0' alt='[?]' style='cursor:pointer'
243 title='[-php-] echo xl ("Click here to choose a date");[-/php-]'>
245 <input type='text' size='10' name='jumpdate' id='jumpdate'
246 value='[-php-] echo "$y-$m-$d";[-/php-]' title='yyyy-mm-dd date to go to'
247 onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />
249 <input type='submit' name='bnsubmit' value='[-php-] echo xl("Go"); [-/php-]' />
251 <input type='submit' name='bnsubmit' value='[-php-] echo xl("Today"); [-/php-]' onClick='GoToToday(theform);' />
253 </div>
255 <div class='navigation_buttons'>
256 <input name='viewtype' id='viewtype' type='hidden' value='[-php-] echo $viewtype[-/php-]' />
257 [-php-]
258 foreach ( array ('day' => xl("Day"), 'week' => xl("Week"), 'month' => xl("Month"), 'year' => xl("Year"))
259 as $key => $value) {
260 echo " <input type='button' onClick='javascript:ChangeViewType(\"$key\");' class='viewtype' value='$value' />";
262 [-/php-]
263 </div>
265 <div class='service_buttons'>
266 <input type='button' value='[-php-] echo xl("Add"); [-/php-]' onclick='newEvt(1, 9, 00, [-php-] echo $Date;[-/php-], 0, 0)' />
267 <input type='button' value='[-php-] echo xl("Search"); [-/php-]' onclick='top.restoreSession();location="index.php?module=PostCalendar&func=search"' />
269 <a href="[-pc_url action=$VIEW_TYPE print="true"-]">[-php-] echo xlt("View Printable Version"); [-/php-]</a>
271 </div>
273 <div class='selectors_container' id='selectors_container'>
274 <div class='selectors_cal_container' id='selectors_cal_container'>
275 </div>
277 <div class='selectors_lists_container'>
278 <input type='hidden' name='all_users' id='all_users' value='' />
279 <select multiple size='10' name='pc_username[]' >
280 <option value='__PC_ALL__'>[-php-] echo xl ("All Users"); [-/php-]</option>
281 [-php-]
282 foreach ($provinfo as $doc) {
283 $username = $doc['username'];
284 echo " <option value='$username'";
285 foreach ($providers as $provider)
286 if ($provider['username'] == $username) echo " selected";
287 echo ">" . $doc['fname'] . " " . $doc['lname'] . "</option>\n";
289 [-/php-]
290 </select>
292 [-php-]
293 // ==============================
294 // FACILITY FILTERING (lemonsoftware)(CHEMED)
295 // $facilities = getFacilities(); // (CHEMED) commented this out
296 // We only want to see facilities that are a 'service location',
297 // as 'billing location' facilities should not have any patient appointments
298 // TODO: Is the above statement true?
299 $facilities = getServiceFacilities();
300 [-/php-]
302 <select name='pc_facility' size='10' onchange='ShowFacility()'>
303 [-php-]
304 if ( !$_SESSION['pc_facility'] ) $selected = "selected='selected'";
305 echo " <option value='0' $selected>" .xl('All Facilities'). "</option>\n";
306 foreach ($facilities as $fa) {
307 $selected = ( $_SESSION['pc_facility'] == $fa['id']) ? "selected='selected'" : "" ;
308 echo " <option value='" .$fa['id']. "' $selected>" .$fa['name']. "</option>\n";
310 [-/php-]
311 </select>
313 </div>
315 </div>
317 </form>
319 <p align="center" class='cal_date_range'>
320 [-php-]
321 // Show the date/range and its previous- and next-day/week selectors.
322 $atmp = array_keys($A_EVENTS);
324 if ($MULTIDAY) {
325 echo "<a href='$PREV_WEEK_URL' onclick='top.restoreSession()'>&lt;&lt;</a>&nbsp;\n";
326 echo dateformat(strtotime($atmp[0]));
327 echo " - ";
328 echo dateformat(strtotime($atmp[count($atmp)-1]));
329 echo "&nbsp;<a href='$NEXT_WEEK_URL' onclick='top.restoreSession()'>&gt;&gt;</a>\n";
330 } else {
331 echo "<a href='$PREV_DAY_URL' onclick='top.restoreSession()'>&lt;&lt;</a>&nbsp;\n";
332 echo dateformat(strtotime($atmp[0]), true);
333 echo "&nbsp;<a href='$NEXT_DAY_URL' onclick='top.restoreSession()'>&gt;&gt;</a>\n";
336 [-/php-]
337 </p>
339 <script language='JavaScript'>
341 //(CHEMED) popup calendar
342 function dateChanged(calendar) {
343 // Beware that this function is called even if the end-user only
344 // changed the month/year. In order to determine if a date was
345 // clicked you can use the dateClicked property of the calendar:
346 if (calendar.dateClicked) {
347 // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php
348 var y = calendar.date.getFullYear();
349 var m = calendar.date.getMonth() + 1; // integer, 1..12
350 if (m < 10) {m = '0'+m;}
351 var d = calendar.date.getDate(); // integer, 1..31
352 if (d < 10) {d = '0'+d;}
353 // redirect...
354 document.getElementById("jumpdate").value = y + "-" + m + "-" + d;
358 var cal = Calendar.setup({flat: "selectors_cal_container", flatCallback: dateChanged});
359 var trig = document.getElementById("img_jumpdate");
360 document.getElementById("selectors_container").style.visibility = 'hidden';
361 cal.hide();
362 trig.onmouseover = function() {
363 if (document.getElementById("selectors_container").style.visibility == 'hidden') {
364 cal.show();
365 document.getElementById("selectors_container").style.visibility = 'visible';
366 } else {
367 document.getElementById("selectors_container").style.visibility = 'hidden';
368 cal.hide();
371 //END (CHEMED)
372 </script>