This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -692,6 +692,23 @@ public function userpageAction()
692
692
$ filteredCommunities [] = $ community ;
693
693
}
694
694
}
695
+
696
+ // If this is the user's own page, show any pending community invitations
697
+ if ($ this ->logged && $ this ->userSession ->Dao ->getKey () == $ userDao ->getKey ())
698
+ {
699
+ $ invitations = $ userDao ->getInvitations ();
700
+ $ communityInvitations = array ();
701
+ foreach ($ invitations as $ invitation )
702
+ {
703
+ $ community = $ this ->Community ->load ($ invitation ->getCommunityId ());
704
+ if ($ community )
705
+ {
706
+ $ communityInvitations [] = $ community ;
707
+ }
708
+ }
709
+ $ this ->view ->communityInvitations = $ communityInvitations ;
710
+ }
711
+
695
712
$ this ->view ->userCommunities = $ filteredCommunities ;
696
713
$ this ->view ->folders = array ();
697
714
if (!empty ($ this ->userSession ->Dao ) && ($ userDao ->getKey () == $ this ->userSession ->Dao ->getKey () || $ this ->userSession ->Dao ->isAdmin ()))
Original file line number Diff line number Diff line change @@ -178,9 +178,25 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/common/common.bro
178
178
<ul> " ;
179
179
180
180
foreach ($ this ->userCommunities as $ community )
181
- {
182
- echo "<li><a href=' {$ this ->webroot }/community/ {$ community ->getKey ()}'> {$ community ->getName ()}</a></li> " ;
183
- }
181
+ {
182
+ echo "<li><a href=' {$ this ->webroot }/community/ {$ community ->getKey ()}'> {$ community ->getName ()}</a></li> " ;
183
+ }
184
+ echo "
185
+ </ul>
186
+ </div> " ;
187
+ }
188
+
189
+ if (!empty ($ this ->communityInvitations ))
190
+ {
191
+ echo "
192
+ <div class='sideElement genericCommunities'>
193
+ <h1> {$ this ->t ('Community Invitations ' )}</h1>
194
+ <ul> " ;
195
+
196
+ foreach ($ this ->communityInvitations as $ community )
197
+ {
198
+ echo "<li><a href=' {$ this ->webroot }/community/ {$ community ->getKey ()}'> {$ community ->getName ()}</a></li> " ;
199
+ }
184
200
echo "
185
201
</ul>
186
202
</div> " ;
You can’t perform that action at this time.
0 commit comments