aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/widgets.php1
-rw-r--r--mod/chat.php24
-rw-r--r--view/tpl/chatroomlist.tpl1
-rw-r--r--view/tpl/chatrooms.tpl2
4 files changed, 17 insertions, 11 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 2aa3dccf1..3b5e3a17b 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -804,6 +804,7 @@ function widget_chatroom_list($arr) {
'$baseurl' => z_root(),
'$nickname' => $a->profile['channel_address'],
'$items' => $r,
+ '$overview' => t('Overview')
));
}
}
diff --git a/mod/chat.php b/mod/chat.php
index 6c0a61880..ecd94bd95 100644
--- a/mod/chat.php
+++ b/mod/chat.php
@@ -203,22 +203,26 @@ function chat_content(&$a) {
$lockstate = (($channel_acl['allow_cid'] || $channel_acl['allow_gid'] || $channel_acl['deny_cid'] || $channel_acl['deny_gid']) ? 'lock' : 'unlock');
require_once('include/acl_selectors.php');
+
+ $chatroom_new = '';
+ if(local_channel()) {
+ $chatroom_new = replace_macros(get_markup_template('chatroom_new.tpl'),array(
+ '$header' => t('New Chatroom'),
+ '$name' => array('room_name',t('Chatroom name'),'', ''),
+ '$chat_expire' => array('chat_expire',t('Expiration of chats (minutes)'),120,''),
+ '$permissions' => t('Permissions'),
+ '$acl' => populate_acl($channel_acl,false),
+ '$lockstate' => $lockstate,
+ '$submit' => t('Submit')
- $chatroom_new = replace_macros(get_markup_template('chatroom_new.tpl'),array(
- '$header' => t('New Chatroom'),
- '$name' => array('room_name',t('Chatroom name'),'', ''),
- '$chat_expire' => array('chat_expire',t('Expiration of chats (minutes)'),120,''),
- '$permissions' => t('Permissions'),
- '$acl' => populate_acl($channel_acl,false),
- '$lockstate' => $lockstate,
- '$submit' => t('Submit')
-
- ));
+ ));
+ }
$rooms = chatroom_list($a->profile['profile_uid']);
$o .= replace_macros(get_markup_template('chatrooms.tpl'), array(
'$header' => sprintf( t('%1$s\'s Chatrooms'), $a->profile['name']),
+ '$name' => t('Name'),
'$baseurl' => z_root(),
'$nickname' => $a->profile['channel_address'],
'$rooms' => $rooms,
diff --git a/view/tpl/chatroomlist.tpl b/view/tpl/chatroomlist.tpl
index ac0f7cf9b..dfdce8afb 100644
--- a/view/tpl/chatroomlist.tpl
+++ b/view/tpl/chatroomlist.tpl
@@ -2,6 +2,7 @@
<h3>{{$header}}</h3>
{{if $items}}
<ul class="nav nav-pills nav-stacked">
+ <li><a href="{{$baseurl}}/chat/{{$nickname}}">{{$overview}}</a></li>
{{foreach $items as $item}}
<li><a href="{{$baseurl}}/chat/{{$nickname}}/{{$item.cr_id}}"><span class="badge pull-right">{{$item.cr_inroom}}</span>{{$item.cr_name}}</a></li>
{{/foreach}}
diff --git a/view/tpl/chatrooms.tpl b/view/tpl/chatrooms.tpl
index c7333efcf..e3d0eb5b5 100644
--- a/view/tpl/chatrooms.tpl
+++ b/view/tpl/chatrooms.tpl
@@ -12,7 +12,7 @@
<div class="section-content-wrapper-np">
<table id="chatrooms-index">
<tr>
- <th width="98%">name</th>
+ <th width="98%">{{$name}}</th>
<th width="1%" class="chatrooms-index-tool"></th>
<th width="1%"></th>
</tr>