Skip to content

Commit

Permalink
Merge pull request #1 from uonafya/dev-setup
Browse files Browse the repository at this point in the history
setup
  • Loading branch information
bangadennis authored Dec 30, 2016
2 parents c91271e + 964f33f commit f2a270f
Show file tree
Hide file tree
Showing 21 changed files with 472 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ dhis-web-maintenance-in=Configuration
dhis-web-linelisting-mp=Manpower
dhis-web-maintenance-rbf=Maintenance RBF

#-- Jphes modules ----------------------------------------------------------#

jphes-web-hierarchy=Partner Hierarchy

#-- Intro modules -------------------------------------------------------------#

intro_dhis-web-maintenance-datadictionary=Maintain data elements, indicators, categories and groups.
Expand Down Expand Up @@ -105,6 +109,7 @@ intro_dhis-web-spreadsheet-reporting=Generate and import data based on predefine
intro_dhis-web-event-reports=Query for events and create aggregated, dimensional analysis of events.
intro_dhis-web-event-capture=Capture information about single events.
intro_dhis-web-tracker-capture=Capture information about trackable entities.
intro_jphes-web-hierarchy=Creates the attribution hierarchy and its association to partners and programs.

#-- Intro functions -------------------------------------------------------------#

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ M_dhis-web-event-capture=See Event Capture module
M_dhis-web-tracker-capture=See Tracker Capture module
M_dhis-web-event-visualizer=See Event Visualizer module
M_dhis-web-cache-cleaner=See Browser Cache Cleaner module

M_jphes-web-hierarchy=See JPHES Hierarchy module
#-- User action privilegies ---------------------------------------------------#

F_CONCEPT_ADD=Add/Update Concept
Expand Down Expand Up @@ -423,3 +423,6 @@ search_orgunit=Search organisation units
save=Save
close=Close
success=Success

#-- User module ---------------------------------------------------------------#
hierarchy=Hierarchy
10 changes: 10 additions & 0 deletions dhis-2/dhis-web/dhis-web-portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@
<version>${project.version}</version>
<type>war</type>
</dependency>

<!--JPHES Web Modules-->
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>jphes-web-hierarchy</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>


</dependencies>
<properties>
<rootDir>../../</rootDir>
Expand Down
62 changes: 62 additions & 0 deletions dhis-2/dhis-web/jphes-web-apps/jphes-web-hierarchy/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.hisp.dhis</groupId>
<artifactId>jphes-web-apps</artifactId>
<version>2.25</version>
</parent>

<artifactId>jphes-web-hierarchy</artifactId>
<packaging>war</packaging>
<name>JPHES Hierarchy App</name>

<build>
<finalName>jphes-web-hierarchy</finalName>
</build>

<description>JPHES Hierarchy Web App.</description>

<dependencies>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>


<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-api</artifactId>
</dependency>
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-web-commons</artifactId>
</dependency>
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-web-commons-resources</artifactId>
<type>war</type>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-web-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hisp.dhis</groupId>
<artifactId>dhis-service-core</artifactId>
</dependency>

</dependencies>


<properties>
<rootDir>../../../</rootDir>
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.hisp.dhis.hierarchy.action;


import com.opensymphony.xwork2.Action;

/**
* Created by banga on 06/12/16.
*/
public class NoAction implements Action
{
@Override public String execute() throws Exception
{
return SUCCESS;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd">

<bean id="org.hisp.dhis.partner.action.NoAction" class="org.hisp.dhis.hierarchy.action.NoAction" scope="prototype" />

</beans>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#- Hierarchy Module ----------------------------------------------#
hierarchy=Hierarchy
partners=Partners
intro_hierarchy=Create, modify, delete and view all hierarchies
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>

<include file="dhis-web-commons.xml" />

<package name="jphes-web-hierarchy" extends="dhis-web-commons" namespace="/jphes-web-hierarchy">

<!-- JPHES Web APP -->

<action name="index" class="org.hisp.dhis.hierarchy.action.NoAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/jphes-web-hierarchy/index.vm</param>
<param name="menu">/jphes-web-hierarchy/menu.vm</param>
</action>



</package>
</struts>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource.loader = dev
dev.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader
dev.resource.loader.path = src/main/webapp,../../dhis-web-commons-resources/src/main/webapp
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>JPHES Hierarchy App</display-name>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/META-INF/dhis/beans.xml</param-value>
</context-param>
<context-param>
<param-name>automaticAccessType</param-name>
<param-value>ghostAdmin</param-value>
</context-param>

<filter>
<filter-name>RedirectFilter</filter-name>
<filter-class>org.hisp.dhis.servlet.filter.HttpRedirectFilter</filter-class>
<init-param>
<param-name>redirectPath</param-name>
<param-value>jphes-web-app/index.action</param-value>
</init-param>
</filter>
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
<filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter>
<filter-name>shallowEtagHeaderFilter</filter-name>
<filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
<init-param>
<param-name>excludeUriRegex</param-name>
<param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
</init-param>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter>
<filter-name>Struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>appCacheFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>

<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>RedirectFilter</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>OpenSessionInViewFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>OpenSessionInViewFilter</filter-name>
<url-pattern>/api/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>shallowEtagHeaderFilter</filter-name>
<url-pattern>/api/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Struts</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>appCacheFilter</filter-name>
<url-pattern>*.appcache</url-pattern>
</filter-mapping>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.hisp.dhis.system.startup.StartupListener</listener-class>
</listener>

<!-- Web API -->

<servlet>
<servlet-name>webapiServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/META-INF/dhis/servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>webapiServlet</servlet-name>
<url-pattern>/api</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>webapiServlet</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>

</web-app>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<h3>Add Partner</h3>

<form id="addPartnerForm" name="addPartnerForm" action="addPartner.action" method="post" class="inputForm">
<table>
<col style="width: 120px"/>
<col style="width: 500px;"/>
<col/>
<col style="width: 500px;"/>

<tr>
<th colspan="2">$i18n.getString( "details" )</th>
<td colspan="2"></td>
</tr>

<tr>
<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td colspan="3"><input type="text" id="name" name="name"></td>
</tr>

<tr>
<td><label for="code">$i18n.getString( "code" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td colspan="3"><input type="text" id="code" name="code"></td>
</tr>

<tr>
<td><label for="displayName">Display Name</label></td>
<td colspan="3"><input type="text" id="displayName" name="displayName"></td>
</tr>

<tr>
<td></td>
<td valign="top">
<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
<input type="button" value="$i18n.getString( 'cancel' )" onclick="dhis2.commons.redirectCurrentPage( 'allPartner.action' )" style="width:10em"/>
</td>
</tr>
</table>
</form>
Loading

0 comments on commit f2a270f

Please sign in to comment.