← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2197: Removed "default" visually from the concept list

 

------------------------------------------------------------
revno: 2197
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2010-11-28 01:16:14 +0700
message:
  Removed "default" visually from the concept list
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/concept.vm


--
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-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/GetDataElementCategoryListAction.java	2010-11-27 18:16:14 +0000
@@ -32,7 +32,6 @@
 import java.util.List;
 
 import org.hisp.dhis.dataelement.DataElementCategory;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.comparator.DataElementCategoryNameComparator;
 
@@ -80,12 +79,11 @@
 
     public String execute()
     {
-        defaultCategory = dataElementCategoryService
-            .getDataElementCategoryByName( DataElementCategoryCombo.DEFAULT_CATEGORY_COMBO_NAME );
+        defaultCategory = dataElementCategoryService.getDataElementCategoryByName( DataElementCategory.DEFAULT_NAME );
 
         dataElementCategories = new ArrayList<DataElementCategory>( dataElementCategoryService
             .getAllDataElementCategories() );
-        
+
         Collections.sort( dataElementCategories, new DataElementCategoryNameComparator() );
 
         return SUCCESS;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java	2010-09-04 07:26:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/concept/GetConceptListAction.java	2010-11-27 18:16:14 +0000
@@ -66,16 +66,26 @@
         return concepts;
     }
 
+    private Concept defaultConcept;
+
+    public Concept getDefaultConcept()
+    {
+        return defaultConcept;
+    }
+
     // -------------------------------------------------------------------------
     // Action implemantation
     // -------------------------------------------------------------------------
 
     public String execute()
     {
+        defaultConcept = conceptService.getConceptByName( Concept.DEFAULT_CONCEPT_NAME );
+        
         concepts = new ArrayList<Concept>( conceptService.getAllConcepts() );
 
         Collections.sort( concepts, new ConceptNameComparator() );
 
         return SUCCESS;
     }
+
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/concept.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/concept.vm	2010-09-21 06:16:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/concept.vm	2010-11-27 18:16:14 +0000
@@ -23,6 +23,7 @@
                 </thead>
 				<tbody id="list">
 				#foreach( $concept in $concepts )
+				#if( $concept.id != $defaultConcept.id )
 				<tr id="tr${concept.id}">
 					<td onclick="javascript:showConceptDetails( $concept.id )">$encoder.htmlEncode( $concept.name )</td>
 					<td style="text-align:center"><a href="showUpdateConceptForm.action?id=$concept.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/></a></td>
@@ -30,6 +31,7 @@
 					<td style="text-align:center"><a href="javascript:showConceptDetails( $concept.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"/></a></td>
 				</tr>
 				#end
+				#end
 				</tbody>
 			</table>
 		</td>