aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/chat.php2
-rw-r--r--mod/chat.php2
-rw-r--r--view/css/mod_chat.css9
-rw-r--r--view/tpl/chat.tpl12
-rw-r--r--view/tpl/chatrooms.tpl6
5 files changed, 20 insertions, 11 deletions
diff --git a/include/chat.php b/include/chat.php
index 8a5970cca..604402045 100644
--- a/include/chat.php
+++ b/include/chat.php
@@ -202,7 +202,7 @@ function chatroom_list($uid) {
require_once('include/security.php');
$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)
);
diff --git a/mod/chat.php b/mod/chat.php
index 211846964..75c364008 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -240,6 +240,8 @@ function chat_content(&$a) {
'$newroom' => t('Create New'),
'$is_owner' => ((local_channel() && local_channel() == App::$profile['profile_uid']) ? 1 : 0),
'$chatroom_new' => $chatroom_new,
+ '$expire' => t('Expiration'),
+ '$expire_unit' => t('min') //minutes
));
return $o;
diff --git a/view/css/mod_chat.css b/view/css/mod_chat.css
index 830cc2f06..57aecd557 100644
--- a/view/css/mod_chat.css
+++ b/view/css/mod_chat.css
@@ -11,8 +11,13 @@
padding: 7px 3px 7px 10px;
}
-#chatrooms-index th:nth-child(3),
-#chatrooms-index td:nth-child(3){
+#chatrooms-index th:nth-child(2),
+#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;
}
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl
index eb219f128..fbc00bf88 100644
--- a/view/tpl/chat.tpl
+++ b/view/tpl/chat.tpl
@@ -32,7 +32,7 @@
</div>
<div id="chat-submit-wrapper">
<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>
<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>&nbsp;{{$online}}</a></li>
@@ -68,21 +68,21 @@
</button-->
</div>
{{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;">
<i id="chat-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" ></i>
</button>
</div>
{{/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">
- <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>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li class="visible-xs"><a href="#" onclick="chatJotGetLink(); return false;" ><i class="icon-link"></i>&nbsp;{{$insert}}</a></li>
{{if $feature_encrypt}}
- <li class="divider visible-xs"></li>
- <li class="visible-sm visible-xs"><a href="#" onclick="red_encrypt('{{$cipher}}', '#chatText' ,$('#chatText').val()); return false;"><i class="icon-key"></i>&nbsp;{{$encrypt}}</a></li>
+ <li class="divider"></li>
+ <li class="visible-xs"><a href="#" onclick="red_encrypt('{{$cipher}}', '#chatText' ,$('#chatText').val()); return false;"><i class="icon-key"></i>&nbsp;{{$encrypt}}</a></li>
{{/if}}
</ul>
</div>
diff --git a/view/tpl/chatrooms.tpl b/view/tpl/chatrooms.tpl
index e3d0eb5b5..de8cdce7c 100644
--- a/view/tpl/chatrooms.tpl
+++ b/view/tpl/chatrooms.tpl
@@ -12,14 +12,16 @@
<div class="section-content-wrapper-np">
<table id="chatrooms-index">
<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%"></th>
</tr>
{{foreach $rooms as $room}}
<tr class="chatroom-index-row">
<td><a href="{{$baseurl}}/chat/{{$nickname}}/{{$room.cr_id}}">{{$room.cr_name}}</a></td>
- <td class="chatrooms-index-tool dropdown">
+ <td>{{$room.cr_expire}}&nbsp;min</td>
+ <td class="chatrooms-index-tool dropdown pull-right">
{{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>
<ul id="panel-{{$room.cr_id}}" class="lockview-panel dropdown-menu"></ul>