1 <?xml version="1.0" encoding="utf-8"?>
5 <template id="footer_mailing_list" inherit_id="website.footer_default" name="Footer Mailing List Link">
6 <xpath expr="//div[@id='info']/ul" position="inside">
7 <li><a t-attf-href="/groups">Mailing List</a></li>
11 <template id="head" inherit_id="website.assets_frontend" name="Mail Group Snippet">
12 <xpath expr="/t" position="inside">
13 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.snippet.js"></script>
17 <template id="editor" inherit_id="website.assets_editor" name="Mail Group Editor">
18 <xpath expr="/t" position="inside">
19 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.editor.js" groups="base.group_website_publisher"></script>
23 <template id="mail_groups" name="Mailing Lists">
24 <t t-call="website.layout">
25 <div id="wrap" class="oe_structure oe_empty">
26 <section class="bg-primary jumbotron mt0 mb0">
27 <div class="container">
28 <h1>Stay in touch with our Community</h1>
29 <p>Alone we can do so little, together we can do so much</p>
33 <div class="container mt32">
34 <div t-if="'unsubscribe' in request.params" class="col-md-offset-9 col-md-3 alert alert-info">
35 <h3>Need to unsubscribe? It's right here! <span class="fa fa-2x fa-arrow-down pull-right"></span></h3>
37 <div class="row mt8" t-foreach="groups" t-as="group">
38 <div class="col-md-3">
39 <img t-att-src="'/website/image?model=mail.group&field=image_small&id='+str(group['id'])" class="pull-left"/>
40 <strong><a t-attf-href="/groups/#{ slug(group) }" t-esc="group.name"/></strong><br />
41 <t t-if="group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain">
42 <i class='fa fa-envelope-o'/>
43 <a t-attf-href="mailto:#{group.alias_id.alias_name}@#{group.alias_id.alias_domain}"><span t-field="group.alias_id"/></a>
46 <div class="col-md-4">
47 <div t-esc="group.description" class="text-muted"/>
49 <div class="col-md-2">
50 <i class='fa fa-user'/> <t t-esc="len(group.message_follower_ids)"/> participants<br />
51 <i class='fa fa-envelope-o'/> <t t-raw="group_data[group.id]['monthly_message_nbr']"/> messages / month
53 <div class="col-md-3">
54 <t t-call="website_mail.follow"><t t-set="object" t-value="group"/></t>
61 <template id="group_messages" name="Message Threads">
62 <t t-call="website.layout">
64 <link rel='stylesheet' href="/website_mail_group/static/src/css/website_mail_group.css"/>
65 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.js"/>
67 <section class="container">
69 <ol class="breadcrumb pull-left">
70 <li><a href="/groups">Mailing Lists</a></li>
72 <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>
77 <h1 class="text-center">
78 <t t-esc="group.name"/> mailing list archives
79 </h1><h4 class="text-center text-muted" t-if="group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain">
80 <i class='fa fa-envelope-o'/>
81 <a t-attf-href="mailto:#{group.alias_id.alias_name}@#{group.alias_id.alias_domain}"><span t-field="group.alias_id"/></a>
85 <div class="col-md-3">
87 <ul class="nav nav-pills nav-stacked" id="group_mode">
88 <li t-attf-class="#{mode=='thread' and 'active' or ''}">
89 <a t-attf-href="/groups/#{ slug(group) }?mode=thread">By thread</a>
91 <li t-attf-class="#{mode=='date' and not date_begin and 'active' or ''}">
92 <a t-attf-href="/groups/#{ slug(group) }?mode=date">By date</a>
93 <ul class="nav nav-pills nav-stacked" style="margin-left: 8px;">
94 <t t-foreach="archives" t-as="month_archive">
95 <li t-att-class="month_archive['date_begin'] == date_begin and 'active' or None">
96 <a t-ignore="True" t-attf-href="/groups/#{ slug(group) }?mode=date&date_begin=#{ month_archive['date_begin'] }&date_end=#{month_archive['date_end']}">
97 <t t-esc="month_archive['date']"/>
98 <span class="pull-right badge" t-esc="month_archive['date_count']"/>
106 <div class="col-md-9">
108 <t t-call="website.pager"/>
110 <t t-call="website_mail_group.messages_short">
111 <t t-set="messages" t-value="messages"/>
112 <t t-set="msg_more_count" t-value="0"/>
113 <t t-set="thread_header" t-value="None"/>
116 <t t-call="website.pager"/>
124 <template id="group_message">
125 <t t-call="website.layout">
127 <link rel='stylesheet' href="/website_mail_group/static/src/css/website_mail_group.css"/>
128 <script type="text/javascript" src="/website_mail_group/static/src/js/website_mail_group.js"/>
130 <section class="container">
131 <div class="row mt8">
132 <ol class="breadcrumb pull-left">
133 <li><a href="/groups">Mailing Lists</a></li>
135 <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>
137 <li t-if="message" class="active"><t t-esc="message.description"/></li>
141 <h1 class="text-center">
142 <t t-esc="group.name"/> mailing list archives
143 </h1><h4 class="text-center text-muted" t-if="group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain">
144 <i class='fa fa-envelope-o'/>
145 <a t-attf-href="mailto:#{group.alias_id.alias_name}@#{group.alias_id.alias_domain}"><span t-field="group.alias_id"/></a>
149 <div class="col-md-3">
150 <h4>Browse archives</h4>
151 <ul class="nav nav-pills nav-stacked" id="group_mode">
152 <li t-attf-class="#{mode=='thread' and 'active' or ''}">
153 <a t-attf-href="/groups/#{ slug(group) }?mode=thread">By thread</a>
155 <li t-attf-class="#{mode=='date' and not date_begin and 'active' or ''}">
156 <a t-attf-href="/groups/#{ slug(group) }?mode=date">By date</a>
157 <ul class="nav nav-pills nav-stacked" style="margin-left: 8px;">
158 <t t-foreach="archives" t-as="month_archive">
159 <li t-att-class="month_archive['date_begin'] == date_begin and 'active' or None">
160 <a t-ignore="True" t-attf-href="/groups/#{ slug(group) }?mode=date&date_begin=#{ month_archive['date_begin'] }&date_end=#{month_archive['date_end']}">
161 <t t-esc="month_archive['date']"/>
162 <span class="pull-right badge" t-esc="month_archive['date_count']"/>
170 <div class="col-md-9">
172 <h4 class="col-md-6">
173 <t t-if="prev_message"><a t-attf-href='/groups/#{slug(group)}/#{slug(prev_message)}?#{mode and "mode=%s" % mode or ""}'>
174 <i class="fa fa-arrow-left"/> <t t-esc="prev_message.description"/>
177 <h4 class="col-md-6">
178 <t t-if="next_message"><a class="pull-right" t-attf-href='/groups/#{slug(group)}/#{slug(next_message)}?#{mode and "mode=%s" % mode or ""}'>
179 <t t-esc="next_message.description"/> <i class="fa fa-arrow-right"/>
184 <img class="img-rounded pull-left mt0 media-object o_mg_avatar"
185 t-att-src="'/website/image?model=mail.message&field=author_avatar&id='+str(message.id)"/>
186 <div class="media-body">
187 <h4 class="media-heading" t-esc="message.description"/>
190 <t t-if="message.author_id">
191 <span t-field="message.author_id" style="display: inline-block;" t-field-options='{
196 <t t-if="not message.author_id"><t t-esc="message.email_from"/></t>
197 - <i class="fa fa-calendar"/> <t t-esc="message.date"/>
199 <div t-raw="message.body"/>
202 <p t-if="message.attachment_ids" class="mt8">
203 <a href="#" class="o_mg_link_hide">
204 <i class="fa fa-chevron-right"/> <t t-raw="len(message.attachment_ids)"/> attachments
206 <a href="#" class="o_mg_link_show">
207 <i class="fa fa-chevron-down"/> <t t-raw="len(message.attachment_ids)"/> attachments
210 <div class="o_mg_link_content">
211 <div class="col-md-2 col-sm-3 text-center" t-foreach='message.attachment_ids' t-as='attachment'>
212 <a t-att-href="'/mail/download_attachment?model=mail.message&id='+str(message.id)+'&method=download_attachment&attachment_id='+str(attachment.id)" target="_blank">
213 <t t-if="attachment.file_type == 'webimage'">
214 <img t-att-src="'/web/binary/image?model=ir.attachment&field=datas&id=' + str(attachment.id) + '&resize=100,80'"
215 class='oe_attachment_embedded'
216 t-att-title="attachment.name"/>
218 <t t-if="attachment.file_type != 'webimage'">
219 <img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.file_type + '.png'"
220 class='oe_attachment_webimage'
221 t-att-title="attachment.name"/>
223 <div class='oe_attachment_name'><t t-raw='attachment.name' /></div>
230 <div t-if="message.child_ids" class="o_mg_replies">
231 <h4 class="page-header">Follow-Ups</h4>
232 <t t-call="website_mail_group.messages_short">
233 <t t-set="messages" t-value="message.child_ids[:replies_per_page]"/>
234 <t t-set="msg_more_count" t-value="len(message.child_ids) - replies_per_page"/>
235 <t t-set="thread_header" t-value="message"/>
238 <div t-if="message.parent_id">
239 <h4 class="page-header">Reference</h4>
240 <t t-call="website_mail_group.messages_short">
241 <t t-set="messages" t-value="[message.parent_id]"/>
250 <template id="messages_short">
252 <ul class="media-list">
253 <li t-foreach="messages" t-as="thread" class="media">
254 <img class="img-rounded pull-left mt0 media-object o_mg_avatar"
255 t-att-src="'/website/image?model=mail.message&field=author_avatar&id='+str(thread.id)"/>
256 <div class="media-body">
257 <h4 class="media-heading">
258 <a t-attf-href="/groups/#{slug(group)}/#{slug(thread)}?mode=#{mode}&date_begin=#{date_begin}&date_end=#{date_end}" t-esc="thread.description"/>
262 <t t-if="thread.author_id">
263 <span t-field="thread.author_id" style="display: inline-block;" t-field-options='{
268 <t t-if="not thread.author_id"><t t-esc="thread.email_from"/></t>
269 - <i class="fa fa-calendar"/> <t t-esc="thread.date"/>
270 - <i class="fa fa-paperclip"/> <t t-esc="len(thread.attachment_ids)"/>
272 <p t-if="thread.child_ids" class="mt8">
273 <a href="#" class="o_mg_link_hide">
274 <i class="fa fa-chevron-right"/> <t t-raw="len(thread.child_ids)"/> replies
276 <a href="#" class="o_mg_link_show">
277 <i class="fa fa-chevron-down"/> <t t-raw="len(thread.child_ids)"/> replies
280 <div class="o_mg_link_content o_mg_replies">
281 <t t-call="website_mail_group.messages_short">
282 <t t-set="messages" t-value="thread.child_ids[:replies_per_page]"/>
283 <t t-set="msg_more_count" t-value="len(thread.child_ids) - replies_per_page"/>
284 <t t-set="thread_header" t-value="thread"/>
290 <p t-if="messages and msg_more_count > 0 and thread_header" class="well well-sm">
291 <button class="fa btn-link o_mg_read_more"
292 t-attf-data-href="/groups/#{slug(group)}/#{slug(thread_header)}/get_replies"
293 t-attf-data-msg-id="#{messages[-1].id}">
294 show <t t-esc="msg_more_count"/> more replies