Skip to content

Commit

Permalink
TRUNK-2449 [Make Max Number of Encounters on Dashboard Configurable]
Browse files Browse the repository at this point in the history
  • Loading branch information
k-joseph committed Jul 8, 2013
1 parent c2a2419 commit b1177d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions webapp/src/main/webapp/WEB-INF/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ Encounter.enterer=Enterer
Encounter.id=Encounter Id
Encounter.no.previous=No Previous Encounters
Encounter.last.encounters=Last Three Encounters
Encounter.last.definedEncounters=Last {0} Encounters
Encounter.noFormDefined=(No form defined)
Encounter.page=Page {0}
Encounter.searchPhraseCannotBeNull=Search phrase cannot be null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<div id="formEntry" style="display:none;">

<openmrs:extensionPoint pointId="org.openmrs.patientDashboard.FormEntryTabHeader" type="html" parameters="patientId=${patient.patientId}" />
<openmrs:portlet url="personFormEntry" id="formEntryPortlet" personId="${patient.personId}" parameters="showDecoration=true|showLastThreeEncounters=true|returnUrl=${pageContext.request.contextPath}/patientDashboard.form"/>
<openmrs:portlet url="personFormEntry" id="formEntryPortlet" personId="${patient.personId}" parameters="showDecoration=true|showDefinedNumberOfEncounters=true|returnUrl=${pageContext.request.contextPath}/patientDashboard.form"/>

</div>
</openmrs:hasPrivilege>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Parameters
<c:if test="${enableFormEntryInEncounters && !model.hideFormEntry}">
<openmrs:hasPrivilege privilege="Form Entry">
<div id="formEntryDialog">
<openmrs:portlet url="personFormEntry" personId="${patient.personId}" id="encounterTabFormEntryPopup" parameters="showLastThreeEncounters=false|returnUrl=${model.formEntryReturnUrl}"/>
<openmrs:portlet url="personFormEntry" personId="${patient.personId}" id="encounterTabFormEntryPopup" parameters="showDefinedNumberOfEncounters=false|returnUrl=${model.formEntryReturnUrl}"/>
</div>

<button class="showFormEntryDialog" style="margin-left: 2em; margin-bottom: 0.5em"><openmrs:message code="FormEntry.fillOutForm"/></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%--
Parameters:
showDecoration (boolean): whether or not to put this in a box
showLastThreeEncounters (boolean): whether or not to show a snippet of encounters
showDefinedNumberOfEncounters (boolean): whether or not to show a snippet of encounters
returnUrl (String): where to go back to when a form has been cancelled or successfully filled out
--%>

Expand All @@ -18,9 +18,11 @@ Parameters:
<%-- hack because calling a portlet clears parameters --%>
<c:set var="showDecorationProp" value="${model.showDecoration}" />

<c:if test="${model.showLastThreeEncounters}">
<c:if test="${model.showDefinedNumberOfEncounters}"> <%-- showDefinedNumberOfEncounters shows the given number of encounters entered in the dashboard.encounters.maximumNumberToShow global property value --%>
<openmrs:hasPrivilege privilege="View Encounters">
<openmrs:portlet url="patientEncounters" id="patientDashboardEncounters" patientId="${patient.patientId}" parameters="num=3|hideHeader=true|title=Encounter.last.encounters|hideFormEntry=true" />
<openmrs:globalProperty var="maxEncs" key="dashboard.encounters.maximumNumberToShow" defaultValue="" />
<openmrs:message code="Encounter.last.definedEncounters" arguments="${ maxEncs }" />
<openmrs:portlet url="patientEncounters" id="patientDashboardEncounters" patientId="${patient.patientId}" parameters="num=${maxEncs}|title=Encounter.last.definedEncounters|formEntryReturnUrl=${pageContext.request.contextPath}/patientDashboard.form" />
<br/>
</openmrs:hasPrivilege>
</c:if>
Expand Down

0 comments on commit b1177d4

Please sign in to comment.