← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11040: Apps, showing notification when you have no apps installed

 

------------------------------------------------------------
revno: 11040
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-05-28 10:27:16 +0200
message:
  Apps, showing notification when you have no apps installed
modified:
  dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java
  dhis-2/dhis-web/dhis-web-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties
  dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm
  dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm
  resources/sql/integritychecks.sql


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java	2013-05-27 07:31:56 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AppListAction.java	2013-05-28 08:27:16 +0000
@@ -53,14 +53,14 @@
     // Input & Output
     // -------------------------------------------------------------------------
 
-    private List<App> appList;
+    private List<App> appList = new ArrayList<App>();
 
     public List<App> getAppList()
     {
         return appManagerService.getInstalledApps();
     }
 
-    private List<String> appFolderNames;
+    private List<String> appFolderNames = new ArrayList<String>();
 
     public List<String> getAppFolderNames()
     {
@@ -75,8 +75,6 @@
     public String execute()
         throws Exception
     {
-        appFolderNames = new ArrayList<String>();
-
         for ( App app : getAppList() )
         {
             appFolderNames.add( appManagerService.getAppFolderName( app ) );

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties	2013-05-27 07:35:21 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties	2013-05-28 08:27:16 +0000
@@ -12,3 +12,4 @@
 appmanager_delete_success=App Deleted Successfully
 appmanager_management=Manage Installed Apps
 appmanager_appname=Application Name
+appmanager_you_have_no_apps_installed=You have no apps installed at the moment

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm	2013-05-25 16:25:22 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/getApps.vm	2013-05-28 08:27:16 +0000
@@ -6,8 +6,8 @@
 });
 </script>
 <div>
-    <div style="float:left"><h3>$i18n.getString( "appmanager_go" ) #*openHelp( "appManager" )*#</h3></div>
-    <div style="float:right"> 
+    <h3>$i18n.getString( "appmanager_go" ) #*openHelp( "appManager" )*#</h3>
+    <div>
         <form id="uploadPackageForm" enctype="multipart/form-data" method="post">
         $i18n.getString( "appmanager_upload_app_package" ):<input type="file" id="upload" name="upload" accept="application/zip,.zip" />
         </form>

=== modified file 'dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm'
--- dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm	2013-05-23 00:18:55 +0000
+++ dhis-2/dhis-web/dhis-web-appmanager/src/main/webapp/dhis-web-appmanager/index.vm	2013-05-28 08:27:16 +0000
@@ -8,14 +8,18 @@
 <h3>$i18n.getString( "dhis-web-appmanager" ) #*openHelp( "appManager" )*#</h3>
 
 <ul class="introList">
+#if( $appList.isEmpty() )
+	<li style="margin-left: 15px; margin-top: 6px;">$i18n.getString( "appmanager_you_have_no_apps_installed" )</li>
+#else
     #foreach( $app in $appList )
     <li class="introItem" onclick="window.location.href='/apps/$appFolderNames.get($foreach.index)/$app.launchPath'">
         <span class="introItemHeader">
             <img style="float:left; margin-right:15px" src="/apps/$appFolderNames.get($foreach.index)/$app.icons.icon48">
-            $app.name
+            ${app.name}
         </span>
         <br>
-        $app.developer.name
+        ${app.developer.name}
     </li>
     #end
+#end
 </ul>

=== modified file 'resources/sql/integritychecks.sql'
--- resources/sql/integritychecks.sql	2013-03-19 19:56:11 +0000
+++ resources/sql/integritychecks.sql	2013-05-28 08:27:16 +0000
@@ -115,7 +115,7 @@
 
 select * from dataelementcategory where categoryid not in (select distinct categoryid from categories_categoryoptions);
 
--- Get categories without category combos
+-- Get categories without category combos (not an error but could be removed)
 
 select * from dataelementcategory where categoryid not in (select distinct categoryid from categorycombos_categories);