Skip to content

Commit e8f8433

Browse files
committed
Add survey support for translations use cases
1 parent c8291b7 commit e8f8433

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

lhc_web/design/defaulttheme/tpl/lhgenericbot/usecases.tpl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
<i class="material-icons">chat</i> [<?php echo $item['id']?>] <?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('bot/conditions','Proactive invitation');?> - <a targer="_blank" href="<?php echo erLhcoreClassDesign::baseurl('abstract/edit')?>/ProactiveChatInvitation/<?php echo $item['id']?>" class="text-decoration-none"><?php echo htmlspecialchars(erLhAbstractModelProactiveChatInvitation::fetch($item['id'])->name)?></a>
2727
<?php elseif ($item['type'] == 'auto_responder') : ?>
2828
<i class="material-icons">auto_awesome</i> [<?php echo $item['id']?>] <?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('bot/conditions','Auto responder');?> - <a targer="_blank" href="<?php echo erLhcoreClassDesign::baseurl('abstract/edit')?>/AutoResponder/<?php echo $item['id']?>" class="text-decoration-none"><?php echo htmlspecialchars(erLhAbstractModelAutoResponder::fetch($item['id'])->name)?></a>
29+
<?php elseif ($item['type'] == 'survey') : ?>
30+
<i class="material-icons">poll</i> [<?php echo $item['id']?>] <?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('bot/conditions','Survey');?> - <a targer="_blank" href="<?php echo erLhcoreClassDesign::baseurl('abstract/edit')?>/Survey/<?php echo $item['id']?>" class="text-decoration-none"><?php echo htmlspecialchars(erLhAbstractModelSurvey::fetch($item['id'])->name)?></a>
2931
<?php elseif ($item['type'] == 'webhook') : ?>
3032
<i class="material-icons">webhook</i> [<?php echo $item['id']?>] <?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('bot/conditions','Webhook');?> - <a targer="_blank" href="<?php echo erLhcoreClassDesign::baseurl('webhooks/edit')?>/<?php echo $item['id']?>" class="text-decoration-none"><?php echo htmlspecialchars(erLhcoreClassModelChatWebhook::fetch($item['id'])->name . ' ' . erLhcoreClassModelChatWebhook::fetch($item['id'])->event)?></a>
3133
<?php endif; ?>

lhc_web/modules/lhgenericbot/usecases.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@
154154
UNION
155155
SELECT id, \'auto_responder\' AS \'type\' FROM `lh_abstract_auto_responder` WHERE `wait_message` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_message` LIKE ' . $db->quote('%' . $search . '%') . ' OR `bot_configuration` LIKE ' . $db->quote('%' . $search . '%') . ' OR `name` LIKE ' . $db->quote('%' . $search . '%') . ' OR `operator` LIKE ' . $db->quote('%' . $search . '%') . ' OR `siteaccess` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_message_2` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_message_3` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_message_4` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_message_5` LIKE ' . $db->quote('%' . $search . '%') . ' OR `wait_timeout_hold` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_hold_message_1` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_hold_message_2` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_hold_message_3` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_hold_message_4` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_hold_message_5` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_reply_message_1` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_reply_message_2` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_reply_message_3` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_reply_message_4` LIKE ' . $db->quote('%' . $search . '%') . ' OR `timeout_reply_message_5` LIKE ' . $db->quote('%' . $search . '%') . ' OR `languages` LIKE ' . $db->quote('%' . $search . '%') . '
156156
UNION
157+
SELECT id, \'survey\' AS \'type\' FROM `lh_abstract_survey` WHERE `name` LIKE ' . $db->quote('%' . $search . '%') . ' OR `identifier` LIKE ' . $db->quote('%' . $search . '%') . ' OR `feedback_text` LIKE ' . $db->quote('%' . $search . '%') . ' OR `configuration` LIKE ' . $db->quote('%' . $search . '%') . ' OR `max_stars_1_title` LIKE ' . $db->quote('%' . $search . '%') . ' OR `max_stars_2_title` LIKE ' . $db->quote('%' . $search . '%') . ' OR `max_stars_3_title` LIKE ' . $db->quote('%' . $search . '%') . ' OR `max_stars_4_title` LIKE ' . $db->quote('%' . $search . '%') . ' OR `max_stars_5_title` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_1` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_2` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_3` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_4` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_5` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_1_items` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_2_items` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_3_items` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_4_items` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_options_5_items` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_plain_1` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_plain_2` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_plain_3` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_plain_4` LIKE ' . $db->quote('%' . $search . '%') . ' OR `question_plain_5` LIKE ' . $db->quote('%' . $search . '%') . '
158+
UNION
157159
SELECT id, \'proactive_invitation\' AS \'type\' FROM `lh_abstract_proactive_chat_invitation` WHERE `message` LIKE ' . $db->quote('%' . $search . '%') . ' OR `message_returning` LIKE ' . $db->quote('%' . $search . '%') . ' OR `name` LIKE ' . $db->quote('%' . $search . '%') . ' OR `design_data` LIKE ' . $db->quote('%' . $search . '%');
158160

159161

0 commit comments

Comments
 (0)