Commit ed82dc67 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Moving group member listing from about tab to members tab

parent 01d1384c
......@@ -45,9 +45,19 @@ $group->admins = get_column_sql("SELECT member
$role = group_user_access($id);
$smarty = smarty(array(), array(), array(), array('sideblocks' => array(interaction_sideblock($id, $role))));
// Search related stuff for member pager
$query = trim(param_variable('query', ''));
$offset = param_integer('offset', 0);
$limit = param_integer('limit', 5);
list($html, $pagination, $count, $offset) = group_get_membersearch_data($id, $query, $offset, $limit);
$smarty = smarty(array('paginator', 'groupmembersearch'), array(), array(), array('sideblocks' => array(interaction_sideblock($id, $role))));
$smarty->assign('group', $group);
$smarty->assign('groupid', $id);
$smarty->assign('query', $query);
$smarty->assign('results', $html);
$smarty->assign('pagination', $pagination['html']);
$smarty->assign('pagination_js', $pagination['javascript']);
$smarty->display('group/members.tpl');
?>
......@@ -46,11 +46,6 @@ $group->admins = get_column_sql("SELECT member
$role = group_user_access($id);
// Search related stuff for member pager
$query = trim(param_variable('query', ''));
$offset = param_integer('offset', 0);
$limit = param_integer('limit', 5);
list($html, $pagination, $count, $offset) = group_get_membersearch_data($id, $query, $offset, $limit);
// Latest forums posts
// NOTE: it would be nicer if there was some generic way to get information
......@@ -73,13 +68,9 @@ $foruminfo = get_records_sql_array('
p.ctime DESC
LIMIT 5;
', array($id));
$smarty = smarty(array('paginator', 'groupmembersearch'), array(), array(), array('sideblocks' => array(interaction_sideblock($id, $role))));
$smarty = smarty(array(), array(), array(), array('sideblocks' => array(interaction_sideblock($id, $role))));
$smarty->assign('group', $group);
$smarty->assign('groupid', $id);
$smarty->assign('query', $query);
$smarty->assign('results', $html);
$smarty->assign('pagination', $pagination['html']);
$smarty->assign('pagination_js', $pagination['javascript']);
$smarty->assign('foruminfo', $foruminfo);
$smarty->display('group/view.tpl');
......
......@@ -42,6 +42,7 @@ function UserSearch() {
this.newQuery = function(e) {
self.params = {};
self.params.query = $('query').value;
self.params.id = $('groupid').value;
self.doSearch();
e.stop();
}
......
......@@ -1901,6 +1901,9 @@ span.viewicon {
#membersearchresults p {
margin: .25em 0 0 65px;
}
.group-info-para {
margin: 15px 0 0 10px;
}
/* GROUPS > GROUP VIEWS */
ul#groupviewoptions {
......
......@@ -6,7 +6,25 @@
{include file="group/tabstart.tpl" current="members"}
<p>Member listing goes here!</p>
<form action="{$WWWROOT}group/members.php" method="post">
<input type="hidden" id="groupid" name="id" value="{$group->id|escape}">
<div class="searchform center" style="margin-bottom: .5em;">
<label>{str tag='Query' section='admin'}:
<input type="text" name="query" id="query" value="{$query|escape}">
</label>
<button id="query-button" type="submit">{str tag="go"}</button>
</div>
<div id="results">
<table id="membersearchresults" class="tablerenderer">
<tbody>
{$results}
</tbody>
</table>
</div>
{$pagination}
<script type="text/javascript">{$pagination_js}</script>
</form>
{include file="group/tabend.tpl"}
......
......@@ -18,46 +18,21 @@
{if $strcontent}<li>{$strcontent}</li>{/if}
</ul>
<table>
<tr>
<td>
<h3>{str tag=Members section=group}</h3>
<form action="{$WWWROOT}group/view.php" method="post">
<input type="hidden" id="groupid" name="id" value="{$group->id|escape}">
<div class="searchform center" style="margin-bottom: .5em;">
<label>{str tag='Query' section='admin'}:
<input type="text" name="query" id="query" value="{$query|escape}">
</label>
<button id="query-button" type="submit">{str tag="go"}</button>
</div>
<div id="results">
<table id="membersearchresults" class="tablerenderer">
<tbody>
{$results}
</tbody>
</table>
</div>
{$pagination}
<script type="text/javascript">{$pagination_js}</script>
</form>
</td>
<td>
<h3>{str tag=latestforumposts section=interaction.forum}</h3>
{if $foruminfo}
{foreach from=$foruminfo item=postinfo}
<div>
<h4><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic|escape}#post{$postinfo->id|escape}">{$postinfo->topicname|escape}</a></h4>
<div><a href="{$WWWROOT}user/view.php?id={$postinfo->poster|escape}">{$postinfo->poster|display_name|escape}</a></div>
<p>{$postinfo->body|str_shorten:100:true}</p>
</div>
{/foreach}
{else}
<p>{str tag=noforumpostsyet section=interaction.forum}</p>
{/if}
<p><a href="{$WWWROOT}interaction/forum/?group={$group->id|escape}">{str tag=gotoforums section=interaction.forum} &raquo;</a></p>
</td>
</tr>
</table>
<div class="group-info-para">
<h3>{str tag=latestforumposts section=interaction.forum}</h3>
{if $foruminfo}
{foreach from=$foruminfo item=postinfo}
<div>
<h4><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic|escape}#post{$postinfo->id|escape}">{$postinfo->topicname|escape}</a></h4>
<div><a href="{$WWWROOT}user/view.php?id={$postinfo->poster|escape}">{$postinfo->poster|display_name|escape}</a></div>
<p>{$postinfo->body|str_shorten:100:true}</p>
</div>
{/foreach}
{else}
<p>{str tag=noforumpostsyet section=interaction.forum}</p>
{/if}
<p><a href="{$WWWROOT}interaction/forum/?group={$group->id|escape}">{str tag=gotoforums section=interaction.forum} &raquo;</a></p>
</div>
{include file="group/tabend.tpl"}
......
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