Show a different message depending on whether we didn't find  
accepted/rejected/outstanding invites.

        Patch by rww. 

diffs (37 lines):

diff -r e17211d8b1f5 -r 98841c035b6a htdocs/community/sentinvites.bml
--- a/htdocs/community/sentinvites.bml  Thu Jun 10 19:12:59 2010 +0800
+++ b/htdocs/community/sentinvites.bml  Thu Jun 10 19:48:47 2010 +0800
@@ -121,10 +121,17 @@ body<=
     }
 
     # hop out if there were no invites
-    unless (%users) {
+    unless ( %users ) {
+        # display a different message depending on what category of 
invitations we're looking for
         return "$ret<?h1 $ML{'.none.title'} h1?><?p " .
-               BML::ml('.none.body', { aopts => 
"href='/community/members?authas=$c->{user}'" }) .
-               " p?>";
+            BML::ml( '.none.'.$GET{show}.'.body', { aopts => 
"href='/community/members?authas=$c->{user}'" } ) .
+            " p?>"
+            if ( $GET{show} eq 'accepted' || $GET{show} eq 'rejected' || 
$GET{show} eq 'outstanding' );
+
+        # return with a general message if we didn't match one of the above 
special cases
+        return "$ret<?h1 $ML{'.none.title'} h1?><?p " .
+            BML::ml( '.none.body', { aopts => 
"href='/community/members?authas=$c->{user}'" } ) .
+            " p?>";
     }
     
     # sorting method;
diff -r e17211d8b1f5 -r 98841c035b6a htdocs/community/sentinvites.bml.text
--- a/htdocs/community/sentinvites.bml.text     Thu Jun 10 19:12:59 2010 +0800
+++ b/htdocs/community/sentinvites.bml.text     Thu Jun 10 19:48:47 2010 +0800
@@ -43,6 +43,9 @@
 .key.unmoderated=Unmoderated
 
 .none.body=No invites have been sent in the past 30 days.  If you wish to 
invite people to this community, please visit the <a [[aopts]]>Members page</a>.
+.none.accepted.body=No invites have been accepted in the past 30 days.  If you 
wish to invite people to this community, please visit the <a [[aopts]]>Members 
page</a>.
+.none.rejected.body=No invites have been rejected in the past 30 days.  If you 
wish to invite people to this community, please visit the <a [[aopts]]>Members 
page</a>.
+.none.outstanding.body=No outstanding invites have been found from the past 30 
days.  If you wish to invite people to this community, please visit the <a 
[[aopts]]>Members page</a>.
 
 .none.title=No Invites Found
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to