diff options
| author | Aaron Bohy <aab@odoo.com> | 2016-04-29 15:22:23 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2016-05-03 10:34:41 +0200 |
| commit | 2264378739520fdc8b4c3967eebd4b35fff9f7fc (patch) | |
| tree | 5b6cb0eb3f7d66f4a1eecf8bd7f2c39a08887ca0 /addons/mail/static/src/xml/composer.xml | |
| parent | 29483ffe2eed65eee66ea49053ae5c8fda221a6b (diff) | |
[ADD] im_livechat,mail: canned responses support
Use the mention mechanism of the composer to autocomplete on canned responses
(keyword :) with fuzzy search.
Directly perform the string replacement in the composer, instead of
server-side as before.
Add a menu item to access an editable list view to create and edit canned
responses.
Add two canned responses as demo data.
Diffstat (limited to 'addons/mail/static/src/xml/composer.xml')
| -rw-r--r-- | addons/mail/static/src/xml/composer.xml | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml index a75708401ce..9e248755a56 100644 --- a/addons/mail/static/src/xml/composer.xml +++ b/addons/mail/static/src/xml/composer.xml @@ -46,21 +46,34 @@ </t> </t> - <t t-name="mail.ChatComposer.MentionSuggestions"> + <t t-name="mail.AbstractMentionSuggestions"> <ul class="dropdown-menu" aria-labelledby="dropdownMailMentionMenu"> - <t t-set="show_divider" t-value="false"/> - <t t-foreach="suggestions" t-as="group"> - <t t-foreach="group" t-as="suggestion"> - <li t-if="show_divider && (suggestion_index === 0)" class="divider"/> - <t t-set="show_divider" t-value="true"/> - <li class="o_mention_proposition" t-att-data-id="suggestion.id"> - <a href="#"> - <t t-esc="suggestion.name"/> <t t-if="suggestion.email">(<t t-esc="suggestion.email"/>)</t> - </a> - </li> - </t> + <t t-foreach="suggestions" t-as="suggestion"> + <li t-if="suggestion.divider" class="divider"/> + <li t-if="!suggestion.divider" class="o_mention_proposition" t-att-data-id="suggestion.id"> + <a href="#"/> + </li> </t> </ul> </t> + <t t-name="mail.MentionPartnerSuggestions" t-extend="mail.AbstractMentionSuggestions"> + <t t-jquery=".o_mention_proposition a" t-operation="append"> + <span class="o_mention_name"><t t-esc="suggestion.name"/></span> + <t t-if="suggestion.email"> + <span class="o_mention_info">(<t t-esc="suggestion.email"/>)</span> + </t> + </t> + </t> + <t t-name="mail.MentionChannelSuggestions" t-extend="mail.AbstractMentionSuggestions"> + <t t-jquery=".o_mention_proposition a" t-operation="append"> + <span class="o_mention_name"><t t-esc="suggestion.name"/></span> + </t> + </t> + <t t-name="mail.MentionCannedResponseSuggestions" t-extend="mail.AbstractMentionSuggestions"> + <t t-jquery=".o_mention_proposition a" t-operation="append"> + <span class="o_mention_name"><t t-esc="suggestion.source"/></span> + <span class="o_mention_info"><t t-esc="suggestion.substitution"/></span> + </t> + </t> </templates> |
