=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java 2012-10-14 17:22:01 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java 2012-11-06 14:03:24 +0000 @@ -151,6 +151,25 @@ { return firstName + " " + surname; } + + /** + * Checks whether the profile has been filled, which is defined as three + * not-null properties out of all optional properties. + */ + public boolean isProfileFilled() + { + Object[] props = { jobTitle, introduction, gender, birthday, + nationality, employer, education, interests, languages }; + + int count = 0; + + for ( Object prop : props ) + { + count = prop != null ? ( count + 1 ) : count; + } + + return count > 3; + } /** * Returns the first of the organisation units associated with the user. === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2012-11-06 13:08:45 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2012-11-06 14:03:24 +0000 @@ -4,7 +4,9 @@ var i18n_viewing = '$encoder.jsEscape( $i18n.getString( "viewing" ), "'")'; -

 $encoder.htmlEncode( $currentUser.name ) +

+  $encoder.htmlEncode( $currentUser.name ) +#if( !$currentUser.profileFilled )(update profile!) #end  •  $i18n.getString( "write_feedback" ) #if( $messageCount > 0 ) •  $messageCount #if( $messageCount > 1 )$i18n.getString( "unread_messages" )#else$i18n.getString( "unread_message" )#end #end  •  #if( $interpretationCount > 0 )$interpretationCount #if( $interpretationCount > 1 )$i18n.getString( "new_interpretations" )#else$i18n.getString( "new_interpretation" )#end === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2012-11-06 13:08:45 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2012-11-06 14:03:24 +0000 @@ -191,6 +191,11 @@ margin: 0 0 6px 4px; } +a.alert, .alert +{ + color: #E92B2B; +} + /*----------------------------------------------------------------------------*/ /* Message */ /*----------------------------------------------------------------------------*/