diff options
| author | Sylvie Greverend <sylvieg@users.sourceforge.net> | 2006-07-25 18:11:39 +0000 |
|---|---|---|
| committer | Sylvie Greverend <sylvieg@users.sourceforge.net> | 2006-07-25 18:11:39 +0000 |
| commit | 57ae5b92d87b65ca4dda696e04a7710ec7b5f895 (patch) | |
| tree | ed1192a860d28fd26896cbda25942bdf208bf6d9 /templates | |
| parent | d9bb66869350dbb49001f27dbd0459e24afb58bf (diff) | |
| download | users-57ae5b92d87b65ca4dda696e04a7710ec7b5f895.tar.gz users-57ae5b92d87b65ca4dda696e04a7710ec7b5f895.tar.bz2 users-57ae5b92d87b65ca4dda696e04a7710ec7b5f895.zip | |
'My Users Groups' becomes 'My group' where you can both see your user groups and your system groups and if there are public groups can assign/unassigna public group
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/menu_users.tpl | 4 | ||||
| -rw-r--r-- | templates/my_groups_list.tpl | 177 |
2 files changed, 118 insertions, 63 deletions
diff --git a/templates/menu_users.tpl b/templates/menu_users.tpl index 2207a37..f650fe5 100644 --- a/templates/menu_users.tpl +++ b/templates/menu_users.tpl @@ -114,13 +114,11 @@ </a> </li> {/if} - {if $gBitUser->hasPermission( 'p_users_create_personal_groups' )} <li> <a class="item" href="{$smarty.const.USERS_PKG_URL}my_groups.php"> - {biticon ipackage=users iname=groups iexplain="My User Groups" iforce=icon}{if !$icons_only} {tr}My User Groups{/tr}{/if} + {biticon ipackage=users iname=groups iexplain="My Groups" iforce=icon}{if !$icons_only} {tr}My Groups{/tr}{/if} </a> </li> - {/if} {if $gBitSystem->isPackageActive('gatekeeper')} <li> <a class="item" href="{$smarty.const.GATEKEEPER_PKG_URL}"> diff --git a/templates/my_groups_list.tpl b/templates/my_groups_list.tpl index 36986a7..e7e6bdc 100644 --- a/templates/my_groups_list.tpl +++ b/templates/my_groups_list.tpl @@ -1,6 +1,7 @@ +{strip} <div class="admin users"> <div class="header"> - <h1>{tr}List of existing groups{/tr}</h1> + <h1>{tr}My Groups{/tr}</h1> </div> {include file="bitpackage:users/my_bitweaver_bar.tpl"} @@ -8,70 +9,126 @@ <div class="body"> {formfeedback success=$successMsg error=$errorMsg} - <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?action=create">{tr}Add new group{/tr}</a> + {jstabs} + {jstab title="My System Groups"} + <table class="data"> + <tr> + <th>{tr}My Groups{/tr}</th> + <th>{tr}Description{/tr}</th> + {if $canRemovePublic} + <th>{tr}Action{/tr}</th> + {/if} + </tr> + {foreach from=$systemGroups key=groupId item=group} + <tr class="{cycle values="odd,even"}"> + <td>{$group.group_name}</td> + <td>{$group.group_desc}</td> + {if $canRemovePublic} + <td> + {if $group.public eq 'y'} + <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?remove_public_group=y&public_group_id={$groupId}" + onclick="return confirm('{tr}Are you sure you want to delete this group?{/tr}')">{biticon ipackage=liberty iname="delete" iexplain="remove"}</a> + {else} + + {/if} + </td> + {/if} + </tr> + {/foreach} + </table> - <table class="data"> - <tr> - <th> - <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?offset={$offset}&sort_mode={if $sort_mode eq 'group_name_desc'}group_name_asc{else}group_name_desc{/if}">{tr}Name{/tr}</a>, & - {tr}Description{/tr}</a> - </th> - {if $gBitUser->hasPermission( 'p_users_assign_group_members' )} - <th>{tr}Members{/tr}</th> - {/if} - {if $gBitUser->hasPermission( 'p_users_assign_group_perms' )} - <th>{tr}Permissions{/tr}</th> - {/if} - <th>{tr}Action{/tr}</th> - </tr> + {if $canAddPublic} + <br /> + <table class="data"> + <tr> + <th>{tr}Public Groups{/tr}</th> + <th>{tr}Description{/tr}</th> + <th>{tr}Action{/tr}</th> + </tr> + {foreach from=$publicGroups key=groupId item=group} + {if $group.used ne 'y' and $group.is_default ne 'y'} + <tr class="{cycle values="odd,even"}"> + <td>{$group.group_name}</td> + <td>{$group.group_desc}</td> + <td><a href="{$smarty.const.USERS_PKG_URL}my_groups.php?add_public_group=y&public_group_id={$group.group_id}" title="{tr}Assign Group{/tr}">{biticon ipackage=liberty iname="permissions" iexplain="assign group"}</a></td> + </tr> + {/if} + {/foreach} + </table> + {/if} + {/jstab} + + {if $gBitUser->hasPermission( 'p_users_create_personal_groups' )} - {foreach from=$groups key=groupId item=group} - <tr class="{cycle values="odd,even"}"> - <td> - <strong>{$group.group_name}</strong>{if $group.is_default eq 'y'}<em class="warning"> *{tr}Default group{/tr}*</em>{/if}<br /> - {$group.group_desc}<br /> - {if $group.group_home}{tr}Home Page{/tr}:<strong> {$group.group_home}</strong><br />{/if} - {if $group.included} - {tr}Included Groups{/tr} - <ul> - {foreach from=$group.included key=incGroupId item=incGroupName} - <li>{$incGroupName}</li> - {/foreach} - </ul> - {/if} - </td> + {jstab title="My User Groups"} + <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?action=create">{tr}Add new group{/tr}</a> - {if $gBitUser->hasPermission( 'p_users_assign_group_members' )} - <td> - {foreach from=$groupUsers key=userId item=user} - {displayname hash=$user}<br /> - {foreachelse} - <strong>{tr}none{/tr}</strong> - {/foreach} - </td> - {/if} + <table class="data"> + <tr> + <th> + <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?offset={$offset}&sort_mode={if $sort_mode eq 'group_name_desc'}group_name_asc{else}group_name_desc{/if}">{tr}Name{/tr}</a>, & + {tr}Description{/tr}</a> + </th> + {if $gBitUser->hasPermission( 'p_users_assign_group_members' )} + <th>{tr}Members{/tr}</th> + {/if} + {if $gBitUser->hasPermission( 'p_users_assign_group_perms' )} + <th>{tr}Permissions{/tr}</th> + {/if} + <th>{tr}Action{/tr}</th> + </tr> - {if $gBitUser->hasPermission( 'p_users_assign_group_perms' )} - <td> - {foreach from=$group.perms key=permName item=perm} - {$perm.perm_desc}<br /> - {foreachelse} - <strong>{tr}none{/tr}</strong> - {/foreach} - </td> - {/if} + {foreach from=$groups key=groupId item=group} + <tr class="{cycle values="odd,even"}"> + <td> + <strong>{$group.group_name}</strong>{if $group.is_default eq 'y'}<em class="warning"> *{tr}Default group{/tr}*</em>{/if}<br /> + {$group.group_desc}<br /> + {if $group.group_home}{tr}Home Page{/tr}:<strong> {$group.group_home}</strong><br />{/if} + {if $group.included} + {tr}Included Groups{/tr} + <ul> + {foreach from=$group.included key=incGroupId item=incGroupName} + <li>{$incGroupName}</li> + {/foreach} + </ul> + {/if} + </td> - <td class="actionicon"> - <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?group_id={$groupId}">{biticon ipackage=liberty iname="edit" iexplain="edit"}</a> - {if $groupId ne -1}{* sorry for hardcoding, really need php define ANONYMOUS_GROUP_ID - spiderr *} - <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?offset={$offset}&sort_mode={$sort_mode}&action=delete&group_id={$groupId}" - onclick="return confirm('{tr}Are you sure you want to delete this group?{/tr}')">{biticon ipackage=liberty iname="delete" iexplain="remove"}</a> - {/if} - </td> - </tr> - {/foreach} - </table> + {if $gBitUser->hasPermission( 'p_users_assign_group_members' )} + <td> + {foreach from=$groupUsers key=userId item=user} + {displayname hash=$user}<br /> + {foreachelse} + <strong>{tr}none{/tr}</strong> + {/foreach} + </td> + {/if} + + {if $gBitUser->hasPermission( 'p_users_assign_group_perms' )} + <td> + {foreach from=$group.perms key=permName item=perm} + {$perm.perm_desc}<br /> + {foreachelse} + <strong>{tr}none{/tr}</strong> + {/foreach} + </td> + {/if} - {pagination} + <td class="actionicon"> + <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?group_id={$groupId}">{biticon ipackage=liberty iname="edit" iexplain="edit"}</a> + {if $groupId ne -1}{* sorry for hardcoding, really need php define ANONYMOUS_GROUP_ID - spiderr *} + <a href="{$smarty.const.USERS_PKG_URL}my_groups.php?offset={$offset}&sort_mode={$sort_mode}&action=delete&group_id={$groupId}" + onclick="return confirm('{tr}Are you sure you want to delete this group?{/tr}')">{biticon ipackage=liberty iname="delete" iexplain="remove"}</a> + {/if} + </td> + </tr> + {/foreach} + </table> + + {pagination} + {/jstab} + {/if} + {/jstabs} </div><!-- end .body --> </div><!-- end .users --> +{/strip}
\ No newline at end of file |
