Created
August 4, 2009 09:47
-
-
Save whalesalad/161132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (self.groups) { | |
| var g = new Array(), g_strings = new Array(); | |
| for (group in self.groups) { | |
| g.push({ id: group, name: self.groups[group] }); | |
| } | |
| for (var i=0; i < g.length; i++) { | |
| var g_suffix = (i == g.length) ? ' and ' : ''; | |
| var g_string = '<a href="/dashboard/ents/'+g[i].id+'/">'+g[i].name+'</a>'+g_suffix; | |
| g_strings.push(g_string); | |
| }; | |
| self.content.push('<p>'+self.getShortName()+' belongs to the '+g_strings.join('')+' group'+g.length.pluralize()+'.</p>'); | |
| } else { | |
| self.content.push('<p>This member isn\'t a part of a group.'); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment