1 <?xml version="1.0" encoding="utf-8"?>
5 <template id="footer_mailing_list" inherit_id="website.layout" name="Footer Mailing List Link">
6 <xpath expr="//footer//div[@name='info']/ul" position="inside">
7 <li><a t-attf-href="/groups">Mailing List</a></li>
11 <template id="head" inherit_id="website.layout" name="Mail Group Customization">
12 <xpath expr="//head" position="inside">
13 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.editor.js" groups="base.group_website_publisher"></script>
14 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.snippet.js"></script>
18 <template id="mail_groups" name="Mailing Lists">
19 <t t-call="website.layout">
20 <div id="wrap" class="oe_structure oe_empty">
21 <section class="bg-primary jumbotron mt0 mb0">
22 <div class="container">
23 <h1>Stay in touch with our Community</h1>
24 <p>Alone we can do so little, together we can do so much</p>
28 <div class="container mt32">
29 <div class="row mt8" t-foreach="groups" t-as="group">
30 <div class="col-md-3">
31 <img t-att-src="'/website/image?model=mail.group&field=image_small&id='+str(group['id'])" class="pull-left"/>
32 <strong><a t-attf-href="/groups/#{ slug(group) }" t-esc="group.name"/></strong><br />
33 <t t-if="group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain">
34 <i class='fa fa-envelope-o'/>
35 <a t-attf-href="mailto:#{group.alias_id.alias_name}@#{group.alias_id.alias_domain}"><span t-field="group.alias_id"/></a>
38 <div class="col-md-4">
39 <div t-esc="group.description" class="text-muted"/>
41 <div class="col-md-2">
42 <i class='fa fa-user'/> <t t-esc="len(group.message_follower_ids)"/> participants<br />
43 <i class='fa fa-envelope-o'/> <t t-esc="len(group.message_ids)"/> messages
45 <div class="col-md-3">
46 <t t-call="website_mail.follow"><t t-set="object" t-value="group"/></t>
53 <template id="group_messages" name="Message Threads">
54 <t t-call="website.layout">
56 <link rel='stylesheet' href="/website_mail_group/static/src/css/website_mail_group.css"/>
57 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.js"/>
59 <section class="container">
61 <ol class="breadcrumb pull-left">
62 <li><a href="/groups">Mailing Lists</a></li>
64 <a t-attf-href="/groups/#{slug(group)}?#{mode and 'mode=%s' % mode or ''}#{date_begin and '&date_begin=%s' % date_begin or ''}#{date_end and '&date_end=%s' % date_end or ''}"><t t-esc="group.name"/></a>
69 <h1 class="text-center">
70 <t t-esc="group.name"/> mailing list archives
71 </h1><h4 class="text-center text-muted" t-if="group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain">
72 <i class='fa fa-envelope-o'/>
73 <a t-attf-href="mailto:#{group.alias_id.alias_name}@#{group.alias_id.alias_domain}"><span t-field="group.alias_id"/></a>
77 <div class="col-md-3">
79 <ul class="nav nav-pills nav-stacked" id="group_mode">
80 <li t-attf-class="#{mode=='thread' and 'active' or ''}">
81 <a t-attf-href="/groups/#{ slug(group) }?mode=thread">By thread</a>
83 <li t-attf-class="#{mode=='date' and not date_begin and 'active' or ''}">
84 <a t-attf-href="/groups/#{ slug(group) }?mode=date">By date</a>
85 <ul class="nav nav-pills nav-stacked" style="margin-left: 8px;">
86 <t t-foreach="archives" t-as="month_archive">
87 <li t-att-class="month_archive['date_begin'] == date_begin and 'active' or None">
88 <a t-ignore="True" t-attf-href="/groups/#{ slug(group) }?mode=date&date_begin=#{ month_archive['date_begin'] }&date_end=#{month_archive['date_end']}">
89 <t t-esc="month_archive['date']"/>
90 <span class="pull-right badge" t-esc="month_archive['date_count']"/>
98 <div class="col-md-9">
100 <t t-call="website.pager"/>
102 <t t-call="website_mail_group.messages_short">
103 <t t-set="messages" t-value="messages"/>
104 <t t-set="msg_more_count" t-value="0"/>
105 <t t-set="thread_header" t-value="None"/>
108 <t t-call="website.pager"/>
116 <template id="group_message">
117 <t t-call="website.layout">
119 <link rel='stylesheet' href="/website_mail_group/static/src/css/website_mail_group.css"/>
120 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.js"/>
122 <section class="container">
123 <div class="row mt8">
124 <ol class="breadcrumb pull-left">
125 <li><a href="/groups">Mailing Lists</a></li>
127 <a t-attf-href="/groups/#{slug(group)}?#{mode and 'mode=%s' % mode or ''}#{date_begin and '&date_begin=%s' % date_begin or ''}#{date_end and '&date_end=%s' % date_end or ''}"><t t-esc="group.name"/></a>
129 <li t-if="message" class="active"><t t-esc="message.description"/></li>
133 <h1 class="text-center">
134 <t t-esc="group.name"/> mailing list archives
135 </h1><h4 class="text-center text-muted" t-if="group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain">
136 <i class='fa fa-envelope-o'/>
137 <a t-attf-href="mailto:#{group.alias_id.alias_name}@#{group.alias_id.alias_domain}"><span t-field="group.alias_id"/></a>
141 <div class="col-md-3">
142 <h4>Browse archives</h4>
143 <ul class="nav nav-pills nav-stacked" id="group_mode">
144 <li t-attf-class="#{mode=='thread' and 'active' or ''}">
145 <a t-attf-href="/groups/#{ slug(group) }?mode=thread">By thread</a>
147 <li t-attf-class="#{mode=='date' and not date_begin and 'active' or ''}">
148 <a t-attf-href="/groups/#{ slug(group) }?mode=date">By date</a>
149 <ul class="nav nav-pills nav-stacked" style="margin-left: 8px;">
150 <t t-foreach="archives" t-as="month_archive">
151 <li t-att-class="month_archive['date_begin'] == date_begin and 'active' or None">
152 <a t-ignore="True" t-attf-href="/groups/#{ slug(group) }?mode=date&date_begin=#{ month_archive['date_begin'] }&date_end=#{month_archive['date_end']}">
153 <t t-esc="month_archive['date']"/>
154 <span class="pull-right badge" t-esc="month_archive['date_count']"/>
162 <div class="col-md-9">
164 <h4 class="col-md-6">
165 <t t-if="prev_message"><a t-attf-href='/groups/#{slug(group)}/#{slug(prev_message)}?#{mode and "mode=%s" % mode or ""}'>
166 <i class="fa fa-arrow-left"/> <t t-esc="prev_message.description"/>
169 <h4 class="col-md-6">
170 <t t-if="next_message"><a class="pull-right" t-attf-href='/groups/#{slug(group)}/#{slug(next_message)}?#{mode and "mode=%s" % mode or ""}'>
171 <t t-esc="next_message.description"/> <i class="fa fa-arrow-right"/>
176 <img class="img-rounded pull-left mt0 media-object o_mg_avatar"
177 t-att-src="'/website/image?model=mail.message&field=author_avatar&id='+str(message.id)"/>
178 <div class="media-body">
179 <h4 class="media-heading" t-esc="message.description"/>
182 <t t-if="message.author_id">
183 <span t-field="message.author_id" style="display: inline-block;" t-field-options='{
188 <t t-if="not message.author_id"><t t-esc="message.email_from"/></t>
189 - <i class="fa fa-calendar"/> <t t-esc="message.date"/>
191 <div t-raw="message.body"/>
194 <p t-if="message.attachment_ids" class="mt8">
195 <a href="#" class="o_mg_link_hide">
196 <i class="fa fa-chevron-right"/> <t t-raw="len(message.attachment_ids)"/> attachments
198 <a href="#" class="o_mg_link_show">
199 <i class="fa fa-chevron-down"/> <t t-raw="len(message.attachment_ids)"/> attachments
202 <div class="o_mg_link_content">
203 <div class="col-md-2 col-sm-3 text-center" t-foreach='message.attachment_ids' t-as='attachment'>
204 <a t-att-href="'/mail/download_attachment?model=mail.message&id='+str(message.id)+'&method=download_attachment&attachment_id='+str(attachment.id)" target="_blank">
205 <t t-if="attachment.file_type == 'webimage'">
206 <img t-att-src="'/web/binary/image?model=ir.attachment&field=datas&id=' + str(attachment.id) + '&resize=100,80'"
207 class='oe_attachment_embedded'
208 t-att-title="attachment.name"/>
210 <t t-if="attachment.file_type != 'webimage'">
211 <img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.file_type + '.png'"
212 class='oe_attachment_webimage'
213 t-att-title="attachment.name"/>
215 <div class='oe_attachment_name'><t t-raw='attachment.name' /></div>
222 <div t-if="message.child_ids" class="o_mg_replies">
223 <h4 class="page-header">Follow-Ups</h4>
224 <t t-call="website_mail_group.messages_short">
225 <t t-set="messages" t-value="message.child_ids[:replies_per_page]"/>
226 <t t-set="msg_more_count" t-value="len(message.child_ids) - replies_per_page"/>
227 <t t-set="thread_header" t-value="message"/>
230 <div t-if="message.parent_id">
231 <h4 class="page-header">Reference</h4>
232 <t t-call="website_mail_group.messages_short">
233 <t t-set="messages" t-value="[message.parent_id]"/>
242 <template id="messages_short">
244 <ul class="media-list">
245 <li t-foreach="messages" t-as="thread" class="media">
246 <img class="img-rounded pull-left mt0 media-object o_mg_avatar"
247 t-att-src="'/website/image?model=mail.message&field=author_avatar&id='+str(thread.id)"/>
248 <div class="media-body">
249 <h4 class="media-heading">
250 <a t-attf-href="/groups/#{slug(group)}/#{slug(thread)}?mode=#{mode}&date_begin=#{date_begin}&date_end=#{date_end}" t-esc="thread.description"/>
254 <t t-if="thread.author_id">
255 <span t-field="thread.author_id" style="display: inline-block;" t-field-options='{
260 <t t-if="not thread.author_id"><t t-esc="thread.email_from"/></t>
261 - <i class="fa fa-calendar"/> <t t-esc="thread.date"/>
262 - <i class="fa fa-paperclip"/> <t t-esc="len(thread.attachment_ids)"/>
264 <p t-if="thread.child_ids" class="mt8">
265 <a href="#" class="o_mg_link_hide">
266 <i class="fa fa-chevron-right"/> <t t-raw="len(thread.child_ids)"/> replies
268 <a href="#" class="o_mg_link_show">
269 <i class="fa fa-chevron-down"/> <t t-raw="len(thread.child_ids)"/> replies
272 <div class="o_mg_link_content o_mg_replies">
273 <t t-call="website_mail_group.messages_short">
274 <t t-set="messages" t-value="thread.child_ids[:replies_per_page]"/>
275 <t t-set="msg_more_count" t-value="len(thread.child_ids) - replies_per_page"/>
276 <t t-set="thread_header" t-value="thread"/>
282 <p t-if="messages and msg_more_count > 0 and thread_header" class="well well-sm">
283 <button class="fa btn-link o_mg_read_more"
284 t-attf-data-href="/groups/#{slug(group)}/#{slug(thread_header)}/get_replies"
285 t-attf-data-msg-id="#{messages[-1].id}">
286 show <t t-esc="msg_more_count"/> more replies