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.
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.
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