You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.4 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2017-2019 MuK IT GmbH.
  4. This file is part of MuK Web Utils
  5. (see https://mukit.at).
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Lesser General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <templates id="template" xml:space="preserve">
  18. <t t-name="muk_web_utils.Share">
  19. <div t-attf-class="btn-group mk_share_dropdown #{share_class}">
  20. <button class="btn btn-sm btn-primary dropdown-toggle mk_share_button" type="button" data-toggle="dropdown">
  21. <span class="fa fa-share-alt"></span>
  22. <span>Share</span>
  23. </button>
  24. <t t-call="muk_web_utils.ShareDropdown" />
  25. </div>
  26. </t>
  27. <t t-name="muk_web_utils.ShareDropdown">
  28. <div class="dropdown-menu">
  29. <h6 class="dropdown-header">Internal</h6>
  30. <a t-if="chatter" class="dropdown-item mk_share_dropdown_message" href="#">
  31. <span class="fa fa-comments"></span>
  32. <span>Message</span>
  33. </a>
  34. <a t-if="chatter" class="dropdown-item mk_share_dropdown_note" href="#">
  35. <span class="fa fa-sticky-note-o"></span>
  36. <span>Note</span>
  37. </a>
  38. <div class="dropdown-divider"></div>
  39. <h6 class="dropdown-header">External</h6>
  40. <a class="dropdown-item mk_share_dropdown_mail" href="#">
  41. <span class="fa fa-envelope"></span>
  42. <span>Mail</span>
  43. </a>
  44. <a t-if="navigator" class="dropdown-item mk_share_dropdown_send" href="#">
  45. <span class="fa fa-paper-plane"></span>
  46. <span>Send</span>
  47. </a>
  48. </div>
  49. </t>
  50. <t t-name="muk_web_utils.CharShare">
  51. <t t-call="muk_web_utils.Share">
  52. <t t-set="share_class" t-value="'mk_share_char'"/>
  53. </t>
  54. </t>
  55. <t t-name="muk_web_utils.TextShare">
  56. <t t-call="muk_web_utils.Share">
  57. <t t-set="share_class" t-value="'mk_share_text'"/>
  58. </t>
  59. </t>
  60. <t t-name="muk_web_utils.BinaryShare">
  61. <div t-if="share" t-attf-class="btn-group mk_share_dropdown">
  62. <button class="btn btn-sm btn-outline-primary dropdown-toggle mk_share_button" type="button" data-toggle="dropdown">
  63. <span class="fa fa-share-alt"></span>
  64. </button>
  65. <t t-call="muk_web_utils.ShareDropdown" />
  66. </div>
  67. </t>
  68. <t t-name="muk_web_utils.ShareMessage">
  69. <div>
  70. <t t-if="url">
  71. <p><span t-esc="name"/> shared a link with you!</p>
  72. <a t-attf-href="#{url}" target="_blank" style="background-color: #875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 12px;">
  73. <strong>Open</strong>
  74. </a>
  75. </t>
  76. <t t-else="">
  77. <p><span t-esc="name"/> shared a message with you!</p>
  78. <p t-esc="value" />
  79. </t>
  80. </div>
  81. </t>
  82. <t t-name="muk_web_utils.ShareBinaryMessage">
  83. <div>
  84. <p><span t-esc="name"/> shared a file with you!</p>
  85. <a t-attf-href="#{url}" target="_blank" style="background-color: #875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 12px;">
  86. <strong>Download</strong>
  87. </a>
  88. </div>
  89. </t>
  90. </templates>