_getStatus is fixed.

"Duplicate" status is shown when a proposal is a duplicate AND
duplicates are visible OR the user has privileges to see them.

"Pending acceptance" status is shown if the proposal is not a duplicate
AND slot allocation is visible OR the user has privileges to see it.

OR even when the proposal is a duplicate but the user cannot see the
information now.

Change-Id: Id2a2626d2e3aa5e41c70a1f0d673a79c6b4e5c75
diff --git a/app/summerofcode/templates/proposal_list.py b/app/summerofcode/templates/proposal_list.py
index 254b85f..a66da64 100644
--- a/app/summerofcode/templates/proposal_list.py
+++ b/app/summerofcode/templates/proposal_list.py
@@ -202,15 +202,16 @@
       elif entity.key in student.student_data.to_be_accepted_proposals:
         # the student has another "to be accepted" proposal, so a duplicate
         # is reported
-        if student.student_data.has_duplicates:
-          if (data.is_developer or data.is_host or
-              data.program.duplicates_visible):
-            return _red(_DUPLICATE_STATUS)
+        if (student.student_data.has_duplicates and
+            (data.is_developer or data.is_host or
+             data.program.duplicates_visible)):
+          return _red(_DUPLICATE_STATUS)
         # no duplicates! this proposal is in "pending acceptance" status
-        else:
-          if (data.is_developer or data.is_host or
+        elif (data.is_developer or data.is_host or
-            return _green(_PENDING_ACCEPTANCE_STATUS)
+          return _green(_PENDING_ACCEPTANCE_STATUS)
+        else:
+          return str(entity.status)
         return str(entity.status)
     elif entity.is_ignored: