-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from uonafya/dev-setup
setup
- Loading branch information
Showing
21 changed files
with
472 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.94 KB
...is-web/dhis-web-commons-resources/src/main/webapp/icons/jphes-web-hierarchy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
dhis-2/dhis-web/jphes-web-apps/jphes-web-hierarchy/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
15 changes: 15 additions & 0 deletions
15
...s-web-apps/jphes-web-hierarchy/src/main/java/org/hisp/dhis/hierarchy/action/NoAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...-2/dhis-web/jphes-web-apps/jphes-web-hierarchy/src/main/resources/META-INF/dhis/beans.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
4 changes: 4 additions & 0 deletions
4
...pps/jphes-web-hierarchy/src/main/resources/org.hisp.dhis.hierarchy/i18n_module.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
22 changes: 22 additions & 0 deletions
22
dhis-2/dhis-web/jphes-web-apps/jphes-web-hierarchy/src/main/resources/struts.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
3 changes: 3 additions & 0 deletions
3
...eb/jphes-web-apps/jphes-web-hierarchy/src/main/webapp/WEB-INF/classes/velocity.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
123 changes: 123 additions & 0 deletions
123
dhis-2/dhis-web/jphes-web-apps/jphes-web-hierarchy/src/main/webapp/WEB-INF/web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
38 changes: 38 additions & 0 deletions
38
.../jphes-web-apps/jphes-web-hierarchy/src/main/webapp/jphes-web-hierarchy/addPartnerForm.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.