Commit 5c4945fb authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

admin groups: show group category in results (bug #627825)


Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent 156b1464
......@@ -862,6 +862,9 @@ function build_grouplist_html($query, $limit, $offset, &$count=null) {
$group->visibility = $group->public ? get_string('Public', 'group') : get_string('Members', 'group');
$group->admins = empty($counts[$group->id]->admins) ? 0 : $counts[$group->id]->admins;
$group->members = empty($counts[$group->id]->members) ? 0 : $counts[$group->id]->members;
if (get_config('allowgroupcategories')) {
$group->categorytitle = ($group->category) ? get_field('group_category', 'title', 'id', $group->category) : '';
}
}
$smarty = smarty_core();
......
......@@ -618,7 +618,7 @@ class PluginSearchInternal extends PluginSearch {
$count = get_field_sql('SELECT COUNT(*) '.$sql, $values);
if ($count > 0) {
$sql = 'SELECT id, name, description, grouptype, jointype, public, ctime, mtime ' . $sql . ' ORDER BY name';
$sql = 'SELECT id, name, description, grouptype, jointype, public, ctime, mtime, category ' . $sql . ' ORDER BY name';
$data = get_records_sql_array($sql, $values, $offset, $limit);
}
......
......@@ -8,6 +8,9 @@
<th class="center">{str tag="groupmembers" section="admin"}</th>
<th class="center">{str tag="groupadmins" section="admin"}</th>
<th class="center">{str tag="grouptype" section="admin"}</th>
{if get_config('allowgroupcategories')}
<th class="center">{str tag="groupcategory" section="group"}</th>
{/if}
<th class="center">{str tag="groupvisible" section="admin"}</th>
<th></th>
<th></th>
......
......@@ -4,6 +4,9 @@
<td class="center">{$group->members}</td>
<td class="center">{$group->admins}</td>
<td class="center">{str tag=name section=grouptype.$group->grouptype}: {str tag=membershiptype.$group->jointype section=group}</td>
{if get_config('allowgroupcategories')}
<td class="center">{$group->categorytitle}</td>
{/if}
<td class="center">{$group->visibility}</td>
<td class="center s"><a class="icon btn-manage" href="{$WWWROOT}admin/groups/manage.php?id={$group->id}">{str tag="groupmanage" section="admin"}</a></td>
<td class="center s"><a class="icon btn-del" href="{$WWWROOT}admin/groups/delete.php?id={$group->id}">{str tag="groupdelete" section="admin"}</a></td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment