Skip to content

Commit

Permalink
Dashboard card repositioning (openemr#6884)
Browse files Browse the repository at this point in the history
* Dashboard card repositioning
- Change column sizes

* revert to calculate card size
add static expand icon to all cards

* make columns consistant

* add concant
  • Loading branch information
sjpadgett authored Sep 26, 2023
1 parent 58d1ec4 commit 0a9b2d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions interface/patient_file/summary/demographics.php
Original file line number Diff line number Diff line change
Expand Up @@ -1034,13 +1034,11 @@ function setMyPatient() {
$pl = (AclMain::aclCheckIssue('medical_problem')) ? 1 : 0;
$meds = (AclMain::aclCheckIssue('medication')) ? 1 : 0;
$rx = (!$GLOBALS['disable_prescriptions'] && AclMain::aclCheckCore('patients', 'rx')) ? 1 : 0;
$cards = $allergy + $pl + $meds + $rx;
$cards = $allergy + $pl + $meds;
$col = "p-1 ";

if ($cards > 0) {
$colInt = 12 / $cards;
$col = "col-" . $colInt;
}
$colInt = 12 / $cards;
$col .= "col-md-" . $colInt;

/**
* Helper function to return only issues with an outcome not equal to resolved
Expand Down Expand Up @@ -1192,7 +1190,7 @@ function filterActiveIssues(array $i): array
$viewArgs['content'] = ob_get_contents();
ob_end_clean();

echo "<div class=\"$col\">";
echo "<div class=\"col\">";
echo $t->render('patient/card/rx.html.twig', $viewArgs);
echo "</div>";
endif;
Expand Down
2 changes: 1 addition & 1 deletion templates/patient/card/card_base.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<section class="{{ card_container_class_list|default(['card', 'mb-2'])|join(' ') }} card mb-2 {{ card_bg_color }} {{ card_text_color }}">
<div class="card-body p-1">
<h6 class="card-title mb-0 d-flex p-1 justify-content-between">
<a class="text-left font-weight-bolder" href="#" {% if forceAlwaysOpen != true %}data-toggle="collapse" data-target="#{{ id|attr }}"{% endif %} aria-expanded="true" aria-controls="{{ id|attr }}">{{ title|text }}</a>
<a class="text-left font-weight-bolder" href="#" {% if forceAlwaysOpen != true %}data-toggle="collapse" data-target="#{{ id|attr }}"{% endif %} aria-expanded="true" aria-controls="{{ id|attr }}">{{ title|text }}<i class="ml-1 fa fa-fw fa-sm fa-expand">&nbsp;</i></a>
{% if auth %}
<span>
{% if card.canAdd() or btnLabel == "Add" %}
Expand Down

0 comments on commit 0a9b2d2

Please sign in to comment.