show chat expiration time in overview and minor fixes
This commit is contained in:
parent
e361ee9253
commit
b8d8be7013
@ -202,7 +202,7 @@ function chatroom_list($uid) {
|
|||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
$sql_extra = permissions_sql($uid);
|
$sql_extra = permissions_sql($uid);
|
||||||
|
|
||||||
$r = q("select allow_cid, allow_gid, deny_cid, deny_gid, cr_name, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d $sql_extra group by cr_name, cr_id order by cr_name",
|
$r = q("select allow_cid, allow_gid, deny_cid, deny_gid, cr_name, cr_expire, cr_id, count(cp_id) as cr_inroom from chatroom left join chatpresence on cr_id = cp_room where cr_uid = %d $sql_extra group by cr_name, cr_id order by cr_name",
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -240,6 +240,8 @@ function chat_content(&$a) {
|
|||||||
'$newroom' => t('Create New'),
|
'$newroom' => t('Create New'),
|
||||||
'$is_owner' => ((local_channel() && local_channel() == App::$profile['profile_uid']) ? 1 : 0),
|
'$is_owner' => ((local_channel() && local_channel() == App::$profile['profile_uid']) ? 1 : 0),
|
||||||
'$chatroom_new' => $chatroom_new,
|
'$chatroom_new' => $chatroom_new,
|
||||||
|
'$expire' => t('Expiration'),
|
||||||
|
'$expire_unit' => t('min') //minutes
|
||||||
));
|
));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -11,8 +11,13 @@
|
|||||||
padding: 7px 3px 7px 10px;
|
padding: 7px 3px 7px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chatrooms-index th:nth-child(3),
|
#chatrooms-index th:nth-child(2),
|
||||||
#chatrooms-index td:nth-child(3){
|
#chatrooms-index td:nth-child(2){
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chatrooms-index th:nth-child(4),
|
||||||
|
#chatrooms-index td:nth-child(4){
|
||||||
padding: 7px 10px 7px 7px;
|
padding: 7px 10px 7px 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="chat-submit-wrapper">
|
<div id="chat-submit-wrapper">
|
||||||
<div id="chat-submit" class="dropup pull-right">
|
<div id="chat-submit" class="dropup pull-right">
|
||||||
<button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown"><i class="icon-caret-down"></i></button>
|
<button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown"><i class="icon-caret-up"></i></button>
|
||||||
<button class="btn btn-primary btn-sm" type="submit" id="chat-submit" name="submit" value="{{$submit}}">{{$submit}}</button>
|
<button class="btn btn-primary btn-sm" type="submit" id="chat-submit" name="submit" value="{{$submit}}">{{$submit}}</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li class="nav-item"><a class="nav-link" href="{{$baseurl}}/chatsvc?f=&room_id={{$room_id}}&status=online"><i class="icon-circle online"></i> {{$online}}</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{$baseurl}}/chatsvc?f=&room_id={{$room_id}}&status=online"><i class="icon-circle online"></i> {{$online}}</a></li>
|
||||||
@ -68,21 +68,21 @@
|
|||||||
</button-->
|
</button-->
|
||||||
</div>
|
</div>
|
||||||
{{if $feature_encrypt}}
|
{{if $feature_encrypt}}
|
||||||
<div class="btn-group hidden-sm hidden-xs">
|
<div class="btn-group hidden-xs">
|
||||||
<button id="chat-encrypt-wrapper" class="btn btn-default btn-sm" onclick="red_encrypt('{{$cipher}}', '#chatText', $('#chatText').val()); return false;">
|
<button id="chat-encrypt-wrapper" class="btn btn-default btn-sm" onclick="red_encrypt('{{$cipher}}', '#chatText', $('#chatText').val()); return false;">
|
||||||
<i id="chat-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" ></i>
|
<i id="chat-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="btn-group visible-xs visible-sm">
|
<div class="btn-group dropup visible-xs">
|
||||||
<button type="button" id="more-tools" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
<button type="button" id="more-tools" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||||
<i id="more-tools-icon" class="icon-caret-down jot-icons"></i>
|
<i id="more-tools-icon" class="icon-caret-up jot-icons"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||||
<li class="visible-xs"><a href="#" onclick="chatJotGetLink(); return false;" ><i class="icon-link"></i> {{$insert}}</a></li>
|
<li class="visible-xs"><a href="#" onclick="chatJotGetLink(); return false;" ><i class="icon-link"></i> {{$insert}}</a></li>
|
||||||
{{if $feature_encrypt}}
|
{{if $feature_encrypt}}
|
||||||
<li class="divider visible-xs"></li>
|
<li class="divider"></li>
|
||||||
<li class="visible-sm visible-xs"><a href="#" onclick="red_encrypt('{{$cipher}}', '#chatText' ,$('#chatText').val()); return false;"><i class="icon-key"></i> {{$encrypt}}</a></li>
|
<li class="visible-xs"><a href="#" onclick="red_encrypt('{{$cipher}}', '#chatText' ,$('#chatText').val()); return false;"><i class="icon-key"></i> {{$encrypt}}</a></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,14 +12,16 @@
|
|||||||
<div class="section-content-wrapper-np">
|
<div class="section-content-wrapper-np">
|
||||||
<table id="chatrooms-index">
|
<table id="chatrooms-index">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="98%">{{$name}}</th>
|
<th width="97%">{{$name}}</th>
|
||||||
|
<th width="1%">{{$expire}}</th>
|
||||||
<th width="1%" class="chatrooms-index-tool"></th>
|
<th width="1%" class="chatrooms-index-tool"></th>
|
||||||
<th width="1%"></th>
|
<th width="1%"></th>
|
||||||
</tr>
|
</tr>
|
||||||
{{foreach $rooms as $room}}
|
{{foreach $rooms as $room}}
|
||||||
<tr class="chatroom-index-row">
|
<tr class="chatroom-index-row">
|
||||||
<td><a href="{{$baseurl}}/chat/{{$nickname}}/{{$room.cr_id}}">{{$room.cr_name}}</a></td>
|
<td><a href="{{$baseurl}}/chat/{{$nickname}}/{{$room.cr_id}}">{{$room.cr_name}}</a></td>
|
||||||
<td class="chatrooms-index-tool dropdown">
|
<td>{{$room.cr_expire}} min</td>
|
||||||
|
<td class="chatrooms-index-tool dropdown pull-right">
|
||||||
{{if $room.allow_cid || $room.allow_gid || $room.deny_cid || $room.deny_gid}}
|
{{if $room.allow_cid || $room.allow_gid || $room.deny_cid || $room.deny_gid}}
|
||||||
<i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" onclick="lockview('chatroom',{{$room.cr_id}});"></i>
|
<i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" onclick="lockview('chatroom',{{$room.cr_id}});"></i>
|
||||||
<ul id="panel-{{$room.cr_id}}" class="lockview-panel dropdown-menu"></ul>
|
<ul id="panel-{{$room.cr_id}}" class="lockview-panel dropdown-menu"></ul>
|
||||||
|
Reference in New Issue
Block a user