From b8d8be701382b72b3556ff9a3d67aabfc85223f5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 3 Apr 2016 11:34:07 +0200 Subject: show chat expiration time in overview and minor fixes --- include/chat.php | 2 +- mod/chat.php | 2 ++ view/css/mod_chat.css | 9 +++++++-- view/tpl/chat.tpl | 12 ++++++------ view/tpl/chatrooms.tpl | 6 ++++-- 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 @@
- +
{{if $feature_encrypt}} -