82 lines
2.3 KiB
HTML
82 lines
2.3 KiB
HTML
![]() |
<script>
|
||
|
|
||
|
function do_group($mode)
|
||
|
{
|
||
|
amplify.request('groups',{
|
||
|
mode : $mode+'_group',
|
||
|
group_id : '{$group.group_id}',
|
||
|
},function(data){
|
||
|
if(data.err)
|
||
|
{
|
||
|
displayError(data.err);
|
||
|
}else
|
||
|
{
|
||
|
//how abou refresting the page? ...yes lets do it..
|
||
|
location.reload();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
close_confirm();
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
{$group_name=$group.group_name}
|
||
|
<div class="global-navigation-column pull-left">
|
||
|
<div class="cb-widget clearfix">
|
||
|
|
||
|
<img src="{$cbgroup->get_group_thumb($group)}" class="group-thumb" />
|
||
|
|
||
|
<div class="relative clearfix global-channel-block group-left-buttons" align="center">
|
||
|
|
||
|
{if $cbgroup->is_joinable($group)}
|
||
|
<button class="btn btn-primary" onclick="cb_confirm(
|
||
|
'{lang code="Confirm join"}',
|
||
|
'{lang code="Are you sure you want to join {$group_name} ?"}',
|
||
|
function()
|
||
|
{
|
||
|
do_group('join');
|
||
|
}
|
||
|
);">Join Group</button>
|
||
|
|
||
|
{/if}
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
{$isGroupAdmin=$cbgroup->is_admin([
|
||
|
groupid => $group.group_id,
|
||
|
group => $group,
|
||
|
user => $userquery->udetails,
|
||
|
uid => $userquery->udetails.userid,
|
||
|
checkowner => 'yes'
|
||
|
])}
|
||
|
|
||
|
{$isGroupAdmin}
|
||
|
|
||
|
|
||
|
<div class="cb-widget">
|
||
|
<h2 class="cb-widget-title">{lang code='Browse'}</h2>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<div class="cb-widget clearfix">
|
||
|
<div class="relative clearfix global-channel-block group-left-buttons marginT10" align="center">
|
||
|
{if $cbgroup->is_member(userid(),$group.group_id) && !$cbgroup->is_owner($group)}
|
||
|
<button class="btn btn-danger" onclick="cb_confirm(
|
||
|
'{lang code="Confirm leave"}',
|
||
|
'{lang code="Are you sure you want to leave {$group_name} ?"}',
|
||
|
function()
|
||
|
{
|
||
|
do_group('leave');
|
||
|
|
||
|
}
|
||
|
);">Leave Group</button>
|
||
|
{/if}
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
<div id="global-navgiation-full-height"></div>
|