Can this edit button go in top right? lot of space can be saved

Can this edit button go in top right? lot of space can be saved. We can have more space vertically for data to be visible.

regards.

1 Like

if anyone can guide how n where to edit the code…

Hi Robert James,

1.add new index edit_button in arrOeUiSettings array in interface\patient_file\history\history.php

$arrOeUiSettings = array(
‘heading_title’ => xl(‘History and Lifestyle’),
‘include_patient_name’ => true,
‘expandable’ => false,
‘expandable_files’ => array(),//all file names need suffix _xpd
‘action’ => “”,//conceal, reveal, search, reset, link or back
‘action_title’ => “”,
‘action_href’ => “”,//only for actions - reset, link or back
‘show_help_icon’ => true,
‘help_file_name’ => “history_dashboard_help.php”,
‘edit_button’=>‘< a href=“history_full.php” class=“btn btn-primary btn-edit oe-pull-away m-2” onclick=“top.restoreSession()”>Edit’
);

2.Go to file src\OeUI\OemrUI.php add this line in public constuct function

$this->edit_btn=$arrOeUiSettings[‘edit_button’] ?? null;

3.go to pageHeading() function add below code.

public function pageHeading()
{
$heading = text($this->heading);
$edit_btn=$this->edit_btn;
if (!empty($heading)) {
$arrexpandIcon = $this->expandIcon();// returns and array containing expandable icon string and container class string
$action_icon = $this->actionIcon();
$help_icon = $this->helpIcon();
$expandable_icon = $arrexpandIcon[0];
$heading = “< h2 >”$heading $expandable_icon $action_icon $help_icon $edit_btn“; } else {
$heading = “< h2 >” . xlt(“Please supply a heading”) . " ”;
}
return $heading;
}

I attached src\OeUI\OemrUI.php and interface\patient_file\history\history.php for your reference.
history.php (5.0 KB)
OemrUI.php (23.0 KB)

output:

You can see result.

Thanks,
Param,
help@capminds.com

2 Likes

Thanks a ton. :slight_smile: Looks awesome.