Merge pull request #2547 from odoo-dev/master-fix-mass-mailling-snippet-chm
[FIX] website_mail: can't edit mail templates
This commit is contained in:
+319
-343
@@ -103,122 +103,114 @@
|
||||
<field name="auto_delete" eval="True"/>
|
||||
|
||||
<field name="body_html"><![CDATA[
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>${object.event_id.name}</title>
|
||||
<style>
|
||||
span.oe_mail_footer_access {
|
||||
display:block;
|
||||
text-align:center;
|
||||
color:grey;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="border-radius: 2px; max-width: 1200px; height: auto;margin-left: auto;margin-right: auto;background-color:#f9f9f9;">
|
||||
<div style="height:auto;text-align: center;font-size : 30px;color: #8A89BA;">
|
||||
<strong>${object.event_id.name}</strong>
|
||||
</div>
|
||||
<div style="height: 50px;text-align: left;font-size : 14px;border-collapse: separate;margin-top:10px">
|
||||
<strong style="margin-left:12px">Dear ${object.cn}</strong> ,<br/><p style="margin-left:12px">${object.event_id.user_id.partner_id.name} invited you for the ${object.event_id.name} meeting of ${object.event_id.user_id.company_id.name}.</p>
|
||||
</div>
|
||||
<div style="height: auto;margin-left:12px;margin-top:30px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="border-top-left-radius:3px;border-top-right-radius:3px;font-size:12px;border-collapse:separate;text-align:center;font-weight:bold;color:#ffffff;width:130px;min-height: 18px;border-color:#ffffff;background:#8a89ba;padding-top: 4px;">${object.event_id.get_interval(object.event_id.start, 'dayname')}</div>
|
||||
<div style="font-size:48px;min-height:auto;font-weight:bold;text-align:center;color: #5F5F5F;background-color: #E1E2F8;width: 130px;">
|
||||
${object.event_id.get_interval(object.event_id.start,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.start, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.start, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Where
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style = "font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 14px" >
|
||||
: ${object.event_id.location}
|
||||
<span style= "color:#A9A9A9; ">(<a href="http://maps.google.com/maps?oi=map&q=${object.event_id.location}">View Map</a>)
|
||||
</span>
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.description :
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
What
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:text-top;">
|
||||
% if object.event_id.description :
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${object.event_id.description}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="height:auto; width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Duration
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td colspan="3" style="vertical-align:text-top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${('%dH%02d' % (object.event_id.duration,(object.event_id.duration*60)%60))}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr style=" height: 30px;">
|
||||
<td style="height: 25px;width: 120px; background : # CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
<div>
|
||||
Attendees
|
||||
<style>
|
||||
span.oe_mail_footer_access {
|
||||
display:block;
|
||||
text-align:center;
|
||||
color:grey;
|
||||
}
|
||||
</style>
|
||||
<div style="border-radius: 2px; max-width: 1200px; height: auto;margin-left: auto;margin-right: auto;background-color:#f9f9f9;">
|
||||
<div style="height:auto;text-align: center;font-size : 30px;color: #8A89BA;">
|
||||
<strong>${object.event_id.name}</strong>
|
||||
</div>
|
||||
<div style="height: 50px;text-align: left;font-size : 14px;border-collapse: separate;margin-top:10px">
|
||||
<strong style="margin-left:12px">Dear ${object.cn}</strong> ,<br/><p style="margin-left:12px">${object.event_id.user_id.partner_id.name} invited you for the ${object.event_id.name} meeting of ${object.event_id.user_id.company_id.name}.</p>
|
||||
</div>
|
||||
<div style="height: auto;margin-left:12px;margin-top:30px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="border-top-left-radius:3px;border-top-right-radius:3px;font-size:12px;border-collapse:separate;text-align:center;font-weight:bold;color:#ffffff;width:130px;min-height: 18px;border-color:#ffffff;background:#8a89ba;padding-top: 4px;">${object.event_id.get_interval(object.event_id.start, 'dayname')}</div>
|
||||
<div style="font-size:48px;min-height:auto;font-weight:bold;text-align:center;color: #5F5F5F;background-color: #E1E2F8;width: 130px;">
|
||||
${object.event_id.get_interval(object.event_id.start,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.start, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.start, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Where
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style="display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx['color'][attendee.state] or 'white'};"></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
<span style="margin-left:5px">You</span>
|
||||
% endif
|
||||
% endfor
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="height: auto;width:450px; margin:0 auto;padding-top:20px;padding-bottom:40px;">
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or '' }&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">View</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style = "font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 14px" >
|
||||
: ${object.event_id.location}
|
||||
<span style= "color:#A9A9A9; ">(<a href="http://maps.google.com/maps?oi=map&q=${object.event_id.location}">View Map</a>)
|
||||
</span>
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.description :
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
What
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:text-top;">
|
||||
% if object.event_id.description :
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${object.event_id.description}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="height:auto; width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Duration
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td colspan="3" style="vertical-align:text-top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${('%dH%02d' % (object.event_id.duration,(object.event_id.duration*60)%60))}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr style=" height: 30px;">
|
||||
<td style="height: 25px;width: 120px; background : # CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
<div>
|
||||
Attendees
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style="display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx['color'][attendee.state] or 'white'};"></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
<span style="margin-left:5px">You</span>
|
||||
% endif
|
||||
% endfor
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="height: auto;width:450px; margin:0 auto;padding-top:20px;padding-bottom:40px;">
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or '' }&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">View</a>
|
||||
</div>
|
||||
</div>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
@@ -234,124 +226,116 @@
|
||||
<field name="auto_delete" eval="True"/>
|
||||
|
||||
<field name="body_html"><![CDATA[
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>${object.event_id.name}</title>
|
||||
<style>
|
||||
span.oe_mail_footer_access {
|
||||
display:block;
|
||||
text-align:center;
|
||||
color:grey;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="border-radius: 2px; max-width: 1200px; height: auto;margin-left: auto;margin-right: auto;background-color:#f9f9f9;">
|
||||
<div style="height:auto;text-align: center;font-size : 30px;color: #8A89BA;">
|
||||
<strong>${object.event_id.name}</strong>
|
||||
</div>
|
||||
<div style="height: 50px;text-align: left;font-size : 14px;border-collapse: separate;margin-top:10px">
|
||||
<strong style="margin-left:12px">Dear ${object.cn}</strong> ,<br/>
|
||||
<p style="margin-left:12px">The date of the meeting has been changed...<br/>
|
||||
The meeting created by ${object.event_id.user_id.partner_id.name} is now scheduled for : ${object.event_id.get_display_time_tz(tz=object.partner_id.tz)}.</p>
|
||||
</div>
|
||||
<div style="height: auto;margin-left:12px;margin-top:30px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="border-top-left-radius:3px;border-top-right-radius:3px;font-size:12px;border-collapse:separate;text-align:center;font-weight:bold;color:#ffffff;width:130px;min-height: 18px;border-color:#ffffff;background:#8a89ba;padding-top: 4px;">${object.event_id.get_interval(object.event_id.start, 'dayname')}</div>
|
||||
<div style="font-size:48px;min-height:auto;font-weight:bold;text-align:center;color: #5F5F5F;background-color: #E1E2F8;width: 130px;">
|
||||
${object.event_id.get_interval(object.event_id.start,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.start, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.start, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Where
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style = "font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 14px" >
|
||||
: ${object.event_id.location}
|
||||
<span style= "color:#A9A9A9; ">(<a href="http://maps.google.com/maps?oi=map&q=${object.event_id.location}">View Map</a>)
|
||||
</span>
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.description :
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
What
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:text-top;">
|
||||
% if object.event_id.description :
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${object.event_id.description}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="height:auto; width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Duration
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td colspan="3" style="vertical-align:text-top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${('%dH%02d' % (object.event_id.duration,(object.event_id.duration*60)%60))}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr style=" height: 30px;">
|
||||
<td style="height: 25px;width: 120px; background : # CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
<div>
|
||||
Attendees
|
||||
<style>
|
||||
span.oe_mail_footer_access {
|
||||
display:block;
|
||||
text-align:center;
|
||||
color:grey;
|
||||
}
|
||||
</style>
|
||||
<div style="border-radius: 2px; max-width: 1200px; height: auto;margin-left: auto;margin-right: auto;background-color:#f9f9f9;">
|
||||
<div style="height:auto;text-align: center;font-size : 30px;color: #8A89BA;">
|
||||
<strong>${object.event_id.name}</strong>
|
||||
</div>
|
||||
<div style="height: 50px;text-align: left;font-size : 14px;border-collapse: separate;margin-top:10px">
|
||||
<strong style="margin-left:12px">Dear ${object.cn}</strong> ,<br/>
|
||||
<p style="margin-left:12px">The date of the meeting has been changed...<br/>
|
||||
The meeting created by ${object.event_id.user_id.partner_id.name} is now scheduled for : ${object.event_id.get_display_time_tz(tz=object.partner_id.tz)}.</p>
|
||||
</div>
|
||||
<div style="height: auto;margin-left:12px;margin-top:30px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="border-top-left-radius:3px;border-top-right-radius:3px;font-size:12px;border-collapse:separate;text-align:center;font-weight:bold;color:#ffffff;width:130px;min-height: 18px;border-color:#ffffff;background:#8a89ba;padding-top: 4px;">${object.event_id.get_interval(object.event_id.start, 'dayname')}</div>
|
||||
<div style="font-size:48px;min-height:auto;font-weight:bold;text-align:center;color: #5F5F5F;background-color: #E1E2F8;width: 130px;">
|
||||
${object.event_id.get_interval(object.event_id.start,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.start, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.start, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Where
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style="display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx['color'][attendee.state] or 'white'};"></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
<span style="margin-left:5px">You</span>
|
||||
% endif
|
||||
% endfor
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="height: auto;width:450px; margin:0 auto;padding-top:20px;padding-bottom:40px;">
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">View</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style = "font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 14px" >
|
||||
: ${object.event_id.location}
|
||||
<span style= "color:#A9A9A9; ">(<a href="http://maps.google.com/maps?oi=map&q=${object.event_id.location}">View Map</a>)
|
||||
</span>
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.description :
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
What
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:text-top;">
|
||||
% if object.event_id.description :
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${object.event_id.description}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="height:auto; width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Duration
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td colspan="3" style="vertical-align:text-top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${('%dH%02d' % (object.event_id.duration,(object.event_id.duration*60)%60))}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr style=" height: 30px;">
|
||||
<td style="height: 25px;width: 120px; background : # CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
<div>
|
||||
Attendees
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style="display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx['color'][attendee.state] or 'white'};"></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
<span style="margin-left:5px">You</span>
|
||||
% endif
|
||||
% endfor
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="height: auto;width:450px; margin:0 auto;padding-top:20px;padding-bottom:40px;">
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#8A89BA;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/accept?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Accept</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#808080;margin : 0 15px 0 0;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/decline?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">Decline</a>
|
||||
<a style="padding: 8px 30px 8px 30px;border-radius: 6px;border: 1px solid #CCCCCC;background:#D8D8D8;text-decoration: none;color:#FFFFFF;" href="/calendar/meeting/view?db=${'dbname' in ctx and ctx['dbname'] or ''}&token=${object.access_token}&action=${'action_id' in ctx and ctx['action_id'] or ''}&id=${object.event_id.id}">View</a>
|
||||
</div>
|
||||
</div>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
@@ -367,118 +351,110 @@
|
||||
<field name="auto_delete" eval="True"/>
|
||||
|
||||
<field name="body_html"><![CDATA[
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>${object.event_id.name}</title>
|
||||
<style>
|
||||
span.oe_mail_footer_access {
|
||||
display:block;
|
||||
text-align:center;
|
||||
color:grey;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="border-radius: 2px; max-width: 1200px; height: auto;margin-left: auto;margin-right: auto;background-color:#f9f9f9;">
|
||||
<div style="height:auto;text-align: center;font-size : 30px;color: #8A89BA;">
|
||||
<strong>${object.event_id.name}</strong>
|
||||
</div>
|
||||
<div style="height: 50px;text-align: left;font-size : 14px;border-collapse: separate;margin-top:10px">
|
||||
<strong style="margin-left:12px">Dear ${object.cn}</strong> ,<br/>
|
||||
<p style="margin-left:12px">That is a reminder for the event below : </p>
|
||||
</div>
|
||||
<div style="height: auto;margin-left:12px;margin-top:30px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="border-top-left-radius:3px;border-top-right-radius:3px;font-size:12px;border-collapse:separate;text-align:center;font-weight:bold;color:#ffffff;width:130px;min-height: 18px;border-color:#ffffff;background:#8a89ba;padding-top: 4px;">${object.event_id.get_interval(object.event_id.start, 'dayname')}</div>
|
||||
<div style="font-size:48px;min-height:auto;font-weight:bold;text-align:center;color: #5F5F5F;background-color: #E1E2F8;width: 130px;">
|
||||
${object.event_id.get_interval(object.event_id.start,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.start, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.start, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Where
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style = "font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 14px" >
|
||||
: ${object.event_id.location}
|
||||
<span style= "color:#A9A9A9; ">(<a href="http://maps.google.com/maps?oi=map&q=${object.event_id.location}">View Map</a>)
|
||||
</span>
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.description :
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
What
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:text-top;">
|
||||
% if object.event_id.description :
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${object.event_id.description}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="height:auto; width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Duration
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td colspan="3" style="vertical-align:text-top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${('%dH%02d' % (object.event_id.duration,(object.event_id.duration*60)%60))}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr style=" height: 30px;">
|
||||
<td style="height: 25px;width: 120px; background : # CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
<div>
|
||||
Attendees
|
||||
<style>
|
||||
span.oe_mail_footer_access {
|
||||
display:block;
|
||||
text-align:center;
|
||||
color:grey;
|
||||
}
|
||||
</style>
|
||||
<div style="border-radius: 2px; max-width: 1200px; height: auto;margin-left: auto;margin-right: auto;background-color:#f9f9f9;">
|
||||
<div style="height:auto;text-align: center;font-size : 30px;color: #8A89BA;">
|
||||
<strong>${object.event_id.name}</strong>
|
||||
</div>
|
||||
<div style="height: 50px;text-align: left;font-size : 14px;border-collapse: separate;margin-top:10px">
|
||||
<strong style="margin-left:12px">Dear ${object.cn}</strong> ,<br/>
|
||||
<p style="margin-left:12px">That is a reminder for the event below : </p>
|
||||
</div>
|
||||
<div style="height: auto;margin-left:12px;margin-top:30px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="border-top-left-radius:3px;border-top-right-radius:3px;font-size:12px;border-collapse:separate;text-align:center;font-weight:bold;color:#ffffff;width:130px;min-height: 18px;border-color:#ffffff;background:#8a89ba;padding-top: 4px;">${object.event_id.get_interval(object.event_id.start, 'dayname')}</div>
|
||||
<div style="font-size:48px;min-height:auto;font-weight:bold;text-align:center;color: #5F5F5F;background-color: #E1E2F8;width: 130px;">
|
||||
${object.event_id.get_interval(object.event_id.start,'day')}
|
||||
</div>
|
||||
<div style='font-size:12px;text-align:center;font-weight:bold;color:#ffffff;background-color:#8a89ba'>${object.event_id.get_interval(object.event_id.start, 'month')}</div>
|
||||
<div style="border-collapse:separate;color:#8a89ba;text-align:center;width: 128px;font-size:12px;border-bottom-right-radius:3px;font-weight:bold;border:1px solid;border-bottom-left-radius:3px;">${not object.event_id.allday and object.event_id.get_interval(object.event_id.start, 'time', tz=object.partner_id.tz) or ''}</div>
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0" style="margin-top: 15px; margin-left: 10px;font-size: 16px;">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Where
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style="display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx['color'][attendee.state] or 'white'};"></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
<span style="margin-left:5px">You</span>
|
||||
% endif
|
||||
% endfor
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.location:
|
||||
<div style = "font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 14px" >
|
||||
: ${object.event_id.location}
|
||||
<span style= "color:#A9A9A9; ">(<a href="http://maps.google.com/maps?oi=map&q=${object.event_id.location}">View Map</a>)
|
||||
</span>
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if object.event_id.description :
|
||||
<div style="width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
What
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td style="vertical-align:text-top;">
|
||||
% if object.event_id.description :
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${object.event_id.description}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="height:auto; width: 120px; background : #CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
Duration
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
<td colspan="3" style="vertical-align:text-top;">
|
||||
% if not object.event_id.allday and object.event_id.duration:
|
||||
<div style="font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
: ${('%dH%02d' % (object.event_id.duration,(object.event_id.duration*60)%60))}
|
||||
</div>
|
||||
% endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr style=" height: 30px;">
|
||||
<td style="height: 25px;width: 120px; background : # CCCCCC; font-family: Lucica Grande', Ubuntu, Arial, Verdana, sans-serif;">
|
||||
<div>
|
||||
Attendees
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
:
|
||||
% for attendee in object.event_id.attendee_ids:
|
||||
<div style="display:inline-block; border-radius: 50%; width:10px; height:10px;background:${'color' in ctx and ctx['color'][attendee.state] or 'white'};"></div>
|
||||
% if attendee.cn != object.cn:
|
||||
<span style="margin-left:5px">${attendee.cn}</span>
|
||||
% else:
|
||||
<span style="margin-left:5px">You</span>
|
||||
% endif
|
||||
% endfor
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<xpath expr="//div[@id='snippet_options']" position="inside">
|
||||
<div data-js='mailing_list_subscribe'
|
||||
data-selector=".js_subscribe"
|
||||
data-selector-siblings="p, h1, h2, h3, blockquote, .well, .panel">
|
||||
data-drop-near="p, h1, h2, h3, blockquote, .well, .panel">
|
||||
<li data-choose_mailing_list=""><a>Change Newsletter</a></li>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
@@ -550,12 +550,17 @@
|
||||
$zones.remove();
|
||||
} while (count > 0);
|
||||
|
||||
// Cleaning up zones placed between floating or inline elements. We do not like these kind of zones.
|
||||
// Cleaning consecutive zone and up zones placed between floating or inline elements. We do not like these kind of zones.
|
||||
var $zones = self.$wrapwrap.find('.oe_drop_zone:not(.oe_vertical)');
|
||||
$zones.each(function (){
|
||||
var zone = $(this);
|
||||
var prev = zone.prev();
|
||||
var next = zone.next();
|
||||
// remove consecutive zone
|
||||
if (!zone.hasClass('.oe_vertical') && (prev.is('.oe_drop_zone:not(.oe_vertical)') || next.is('.oe_drop_zone:not(.oe_vertical)'))) {
|
||||
zone.remove();
|
||||
return;
|
||||
}
|
||||
var float_prev = prev.css('float') || 'none';
|
||||
var float_next = next.css('float') || 'none';
|
||||
var disp_prev = prev.css('display') || null;
|
||||
|
||||
@@ -391,8 +391,8 @@
|
||||
<xpath expr="//div[@id='snippet_options']" position="inside">
|
||||
<div data-js='country_events'
|
||||
data-selector=".oe_country_events"
|
||||
data-selector-siblings="p, h1, h2, h3, blockquote, .well, .panel"
|
||||
data-selector-children=".content"
|
||||
data-drop-near="p, h1, h2, h3, blockquote, .well, .panel"
|
||||
data-drop-in=".content"
|
||||
>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
@@ -1,26 +1,25 @@
|
||||
(function () {
|
||||
$(function () {
|
||||
'use strict';
|
||||
var website = openerp.website;
|
||||
|
||||
website.snippet.BuildingBlock.include({
|
||||
_get_snippet_url: function () {
|
||||
return '/website_mail/snippets';
|
||||
}
|
||||
});
|
||||
|
||||
// Copy the template to the body of the email
|
||||
$(document).ready(function () {
|
||||
$('.js_template_set').click(function(ev) {
|
||||
$('#email_designer').show();
|
||||
$('#email_template').hide();
|
||||
$(".js_content", $(this).parent()).children().clone().appendTo('#email_body');
|
||||
$(".js_content", $(this).parent()).children().clone().appendTo('#email_body_html');
|
||||
$('#email_body').addClass('oe_dirty');
|
||||
$('#email_body_html').addClass('oe_dirty');
|
||||
|
||||
openerp.website.editor_bar.edit();
|
||||
event.preventDefault();
|
||||
if ($("#email_designer").length) {
|
||||
openerp.website.snippet.BuildingBlock.include({
|
||||
_get_snippet_url: function () {
|
||||
return '/website_mail/snippets';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
||||
// Copy the template to the body of the email
|
||||
$(document).ready(function () {
|
||||
$('.js_template_set').click(function(ev) {
|
||||
$('#email_designer').show();
|
||||
$('#email_template').hide();
|
||||
$(".js_content", $(this).parent()).children().clone().appendTo('#email_body');
|
||||
$(".js_content", $(this).parent()).children().clone().appendTo('#email_body_html');
|
||||
$('#email_body').addClass('oe_dirty');
|
||||
$('#email_body_html').addClass('oe_dirty');
|
||||
|
||||
openerp.website.editor_bar.edit();
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
<div id="snippet_email_structure" class="tab-pane fade in active">
|
||||
<div id="snippet_email_structure" class="tab-pane in active">
|
||||
|
||||
|
||||
<div>
|
||||
@@ -259,7 +259,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="snippet_email_feature" class="tab-pane fade">
|
||||
<div id="snippet_email_feature" class="tab-pane">
|
||||
|
||||
|
||||
<div>
|
||||
@@ -483,8 +483,8 @@
|
||||
<div id="snippet_options" class="hidden">
|
||||
<div data-js='content'
|
||||
data-selector="[data-oe-field='body_html'] > div, .oe_snippet_body"
|
||||
data-selector-siblings="[data-oe-field='body_html'] > *"
|
||||
data-selector-children="[data-oe-field='body_html']">
|
||||
data-drop-near="[data-oe-field='body_html'] > div"
|
||||
data-drop-in="[data-oe-field='body_html']">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,12 +2,15 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<template id="assets_editor" inherit_id="website.assets_editor" name="Email Designer">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/website_mail/static/src/js/website_email_designer.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Template Choice page -->
|
||||
<template id="email_designer" name="Email Designer">
|
||||
<t t-call="website.layout">
|
||||
<t t-set="head">
|
||||
<script type="text/javascript" src="/website_mail/static/src/js/website_email_designer.js"></script>
|
||||
</t>
|
||||
<div id="wrap" class="container" t-ignore="True">
|
||||
<div id="email_template" class="mb32" t-att-style="mode != 'email_template' and 'display: none' or ''">
|
||||
<a class="mt16 btn btn-default pull-right"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<xpath expr="//div[@id='snippet_options']" position="inside">
|
||||
<div data-js='subscribe'
|
||||
data-selector=".js_follow_alias"
|
||||
data-selector-siblings="p, h1, h2, h3, blockquote, .well, .panel"
|
||||
data-drop-near="p, h1, h2, h3, blockquote, .well, .panel"
|
||||
>
|
||||
<li data-choose_mailing_list=""><a>Change Discussion List</a></li>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<xpath expr="//div" position="after">
|
||||
<div data-js='twitter'
|
||||
data-selector=".twitter"
|
||||
data-selector-children=".oe_structure, [data-oe-type=html]">
|
||||
data-drop-in=".oe_structure, [data-oe-type=html]">
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user