mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Check if globally chat is enabled first
This commit is contained in:
12
index.php
12
index.php
@@ -158,7 +158,13 @@ $sc = $db->GetOne($sql);
|
|||||||
$ca = get_call_attempt($operator_id,true);
|
$ca = get_call_attempt($operator_id,true);
|
||||||
$appointment = false;
|
$appointment = false;
|
||||||
$availability = is_using_availability($case_id);
|
$availability = is_using_availability($case_id);
|
||||||
$chat = operator_chat_enabled($operator_id);
|
|
||||||
|
$chatenabled = get_setting("chat_enabled");
|
||||||
|
if (empty($chatenabled))
|
||||||
|
$chatenabled = false;
|
||||||
|
else
|
||||||
|
$chatenabled = true;
|
||||||
|
|
||||||
if ($ca)
|
if ($ca)
|
||||||
{
|
{
|
||||||
if (is_on_appointment($ca))
|
if (is_on_appointment($ca))
|
||||||
@@ -272,7 +278,7 @@ xhtml_object($data,"main-content");
|
|||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<?php if ($chat) { ?>
|
<?php if ($chatenabled && operator_chat_enabled($operator_id)) { ?>
|
||||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'chat' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'chat' && $appointment))
|
<div class="tabbertab <?php if ((DEFAULT_TAB == 'chat' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'chat' && $appointment))
|
||||||
print "tabbertabdefault"; ?>" id="tab-chat">
|
print "tabbertabdefault"; ?>" id="tab-chat">
|
||||||
<h2><?php echo T_("Supervisor chat"); ?></h2>
|
<h2><?php echo T_("Supervisor chat"); ?></h2>
|
||||||
@@ -280,8 +286,6 @@ xhtml_object($data,"main-content");
|
|||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if (TAB_INFO) { ?>
|
<?php if (TAB_INFO) { ?>
|
||||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'info' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'info' && $appointment))
|
<div class="tabbertab <?php if ((DEFAULT_TAB == 'info' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'info' && $appointment))
|
||||||
print "tabbertabdefault"; ?>">
|
print "tabbertabdefault"; ?>">
|
||||||
|
|||||||
Reference in New Issue
Block a user