Skip to content

Commit

Permalink
General fixes to main nursing page correctly initialising variables etc
Browse files Browse the repository at this point in the history
  • Loading branch information
timschofield committed Jul 12, 2016
1 parent 6587b8b commit ed96e59
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions modules/nursing/nursing.php
Expand Up @@ -17,7 +17,7 @@
// Load the wards info
$ward_obj=new Ward;
$items='nr,ward_id,name, dept_nr';
$ward_info=&$ward_obj->getAllWardsItemsObject($items, $_SESSION['department_nr']);
$ward_info=$ward_obj->getAllWardsItemsObject($items, $_SESSION['department_nr']);

$_SESSION['sess_file_return']=$top_dir.basename(__FILE__);
/* Set this file as the referer */
Expand All @@ -36,17 +36,18 @@

# Create a helper smarty object without reinitializing the GUI
$smarty2 = new smarty_care('common', FALSE);

require_once($root_path.'include/core/inc_default_smarty_values.php');
/**
* available wards, create the data
*/

if(is_object($ward_info))
{
$sWardInfo='';
while($stations=$ward_info->FetchRow()) {
$sWardInfo = $sWardInfo.'<tr><td><a href="'.strtr('nursing-station-pass.php'.URL_APPEND.'&rt=pflege&edit=1&station='.$stations['ward_id'].'&location_id='.$stations['ward_id'].'&ward_nr='.$stations['nr'].'&dept_nr='.$stations['dept_nr'],' ',' ').'"><div class="wardname"><li>'.strtoupper($stations['ward_id']).'&nbsp;</div></a> ';
$sWardInfo = $sWardInfo."\n";
$sWardInfo = $sWardInfo.'</td><td>'.$stations['name'].'</td></tr>';
$sWardInfo = $sWardInfo.'</td><td>'.$stations['name'].'</td></tr>';
}
$sWardInfo = $sWardInfo.'<tr><td colspan="3" <img '.createComIcon($root_path,'redpfeil.gif','0','absmiddle').'> <a href="nursing-station-manage-pass.php'.URL_APPEND.'">'.$LDClk2CreateAnotherWard.'</a></td></tr>';
} else {
Expand All @@ -56,6 +57,8 @@

# Toolbar title
$smarty->assign('sToolbarTitle',$LDNursing );
$smarty->assign('sWindowTitle',$LDNursing );
$smarty->assign('sTitleImage','<img '.createComIcon($root_path,'nurse.gif','0').'>');

# href for help button
$smarty->assign('pbHelp','javascript:gethelp(\'nursing.php\',\''.$LDNursing.'\')');
Expand Down Expand Up @@ -96,7 +99,7 @@
while(list($x,$v)=each($aSubMenuItem)){
$sTemp='';
ob_start();
if($cfg['icons'] != 'no_icon') $smarty2->assign('sIconImg','<img '.$aSubMenuIcon[$iRunner].'>');
$smarty2->assign('sIconImg','<img '.$aSubMenuIcon[$iRunner].'>');
$smarty2->assign('sSubMenuItem',$v);
$smarty2->assign('sSubMenuText',$aSubMenuText[$iRunner]);
$smarty2->display('common/submenu_row.tpl');
Expand Down

0 comments on commit ed96e59

Please sign in to comment.