Commit 99752956fcbcd890e80684bb4411753306c43ca1
1 parent
a6c3f685
fix for KTS-623
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5099 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
25 additions
and
4 deletions
plugins/ktcore/admin/groupManagement.php
| ... | ... | @@ -537,6 +537,25 @@ class KTGroupAdminDispatcher extends KTAdminDispatcher { |
| 537 | 537 | } |
| 538 | 538 | // }}} |
| 539 | 539 | |
| 540 | + function getGroupStringForGroup($oGroup) { | |
| 541 | + $aGroupNames = array(); | |
| 542 | + $aGroups = $oGroup->getMemberGroups(); | |
| 543 | + $MAX_GROUPS = 6; | |
| 544 | + $add_elipsis = false; | |
| 545 | + if (count($aGroups) == 0) { return _('Group currently has no subgroups.'); } | |
| 546 | + if (count($aGroups) > $MAX_GROUPS) { | |
| 547 | + $aGroups = array_slice($aGroups, 0, $MAX_GROUPS); | |
| 548 | + $add_elipsis = true; | |
| 549 | + } | |
| 550 | + foreach ($aGroups as $oGroup) { | |
| 551 | + $aGroupNames[] = $oGroup->getName(); | |
| 552 | + } | |
| 553 | + if ($add_elipsis) { | |
| 554 | + $aGroupNames[] = '…'; | |
| 555 | + } | |
| 556 | + | |
| 557 | + return implode(', ', $aGroupNames); | |
| 558 | + } | |
| 540 | 559 | // }}} |
| 541 | 560 | } |
| 542 | 561 | ... | ... |
templates/ktcore/principals/groupadmin.smarty
| ... | ... | @@ -29,15 +29,16 @@ action may take some time if you have many groups).{/i18n}</p> |
| 29 | 29 | |
| 30 | 30 | {else} |
| 31 | 31 | {if (!empty($search_results))} |
| 32 | -<table class="listing"> | |
| 32 | +<table class="kt_collection" cellspacing="0"> | |
| 33 | 33 | <thead> |
| 34 | 34 | <tr> |
| 35 | 35 | <th>{i18n}Group Name{/i18n}</th> |
| 36 | 36 | <th>{i18n}Unit Name{/i18n}</th> |
| 37 | 37 | <th>{i18n}Edit{/i18n}</th> |
| 38 | + <th>{i18n}Delete{/i18n}</th> | |
| 38 | 39 | <th>{i18n}Manage Users{/i18n}</th> |
| 39 | 40 | <th>{i18n}Manage sub-groups{/i18n}</th> |
| 40 | - <th>{i18n}Delete{/i18n}</th> | |
| 41 | + <th>{i18n}Subgroups{/i18n}</th> | |
| 41 | 42 | </tr> |
| 42 | 43 | </thead> |
| 43 | 44 | <tbody> |
| ... | ... | @@ -56,12 +57,13 @@ action may take some time if you have many groups).{/i18n}</p> |
| 56 | 57 | </td> |
| 57 | 58 | <td><a href="{addQS}action=editGroup&group_id={$oGroup->getId()}{/addQS}" |
| 58 | 59 | class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td> |
| 60 | + <td><a href="{addQS}action=deleteGroup&group_id={$oGroup->getId()}{/addQS}" | |
| 61 | +class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | |
| 59 | 62 | <td><a |
| 60 | 63 | href="{addQS}action=manageUsers&group_id={$oGroup->getId()}{/addQS}">{i18n}Manage Users{/i18n}</a></td> |
| 61 | 64 | <td><a |
| 62 | 65 | href="{addQS}action=manageSubgroups&group_id={$oGroup->getId()}{/addQS}">{i18n}Manage sub-groups{/i18n}</a></td> |
| 63 | - <td><a href="{addQS}action=deleteGroup&group_id={$oGroup->getId()}{/addQS}" | |
| 64 | -class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td> | |
| 66 | + <td class="title"><span class="descriptiveText">{$context->getGroupStringForGroup($oGroup)}</span></td> | |
| 65 | 67 | </tr> |
| 66 | 68 | {/foreach} |
| 67 | 69 | ... | ... |