Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 4509

Show
Ignore:
Timestamp:
06/02/08 15:51:29 (7 months ago)
Author:
bwolfe
Message:

Added portlet option to BoxExt extension - #780
Author: Keelhaul

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/trunk/src/web/org/openmrs/module/web/extension/BoxExt.java

    r4095 r4509  
    2121                return Extension.MEDIA_TYPE.html; 
    2222        } 
     23         
     24        /** 
     25         * @return The message code of the label of this link 
     26         */ 
     27        public abstract String getPortletUrl(); 
    2328         
    2429        /** 
  • openmrs/trunk/src/web/org/openmrs/module/web/taglib/ExtensionPointTag.java

    r4095 r4509  
    129129                                        for (Extension ext : extensionList) { 
    130130                                                if (!clazz.isAssignableFrom(ext.getClass())) { 
    131                                                         throw new ClassCastException("Extension at this point (" + pointId + ") are " + 
     131                                                        throw new ClassCastException("Extensions at this point (" + pointId + ") are " + 
    132132                                                                                     "required to be of " + clazz + " or a subclass. " + 
    133133                                                                                     ext.getClass() + " is not."); 
  • openmrs/trunk/web/WEB-INF/view/portlets/patientOverview.jsp

    r4185 r4509  
    1313        <openmrs:hasPrivilege privilege="${extension.requiredPrivilege}"> 
    1414                <div class="boxHeader${model.patientVariation}"><spring:message code="${extension.title}" /></div> 
    15                 <div class="box${model.patientVariation}"><spring:message code="${extension.content}" /></div> 
     15                <div class="box${model.patientVariation}"><spring:message code="${extension.content}" /> 
     16                        <c:if test="${extension.portletUrl != null}"> 
     17                                <openmrs:portlet url="${extension.portletUrl}" moduleId="${extension.moduleId}" id="${extension.portletUrl}" patientId="${patient.patientId}" parameters="allowEdits=true"/> 
     18                        </c:if> 
     19                </div> 
    1620                <br /> 
    1721        </openmrs:hasPrivilege>