Skip to content

Commit

Permalink
Merge pull request OCA#51 from vauxoo-dev/9.0-fix-template-save-web-l…
Browse files Browse the repository at this point in the history
…escobarvx

[FIX] runbot_send_email: Changed 'if' blocks to fix wrong save template
  • Loading branch information
moylop260 committed Mar 8, 2016
2 parents 47cb2d9 + f629f83 commit 14b3726
Showing 1 changed file with 42 additions and 4 deletions.
46 changes: 42 additions & 4 deletions runbot_send_email/data/runbot_send_email_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
</tr>
</tbody>
</table>
% if object.state=="testing":
<div style="border-radius:5px;padding:0px;width:570px;font-size:13px">
<div>
<table style="padding:0px;border:0px;width:100%;border-spacing:0">
<thead>
% if object.state=="testing":
<tr style="padding:0px;border:0px;font-weight:700;font-size:18px;background-color:#d9edf7;color:#1400FB">
<td style="padding:0px;border:0px;padding:0px 20px 0px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad;width:50px;padding:0px;text-align:center;vertical-align:middle;padding-top:5px;border-left:1px solid #606060;border-top-left-radius:5px"><div style="width:25px;min-height:30px;margin-left:15px;margin-top:0px;vertical-align:middle"><img class="CToWUd" src="http://fa2png.io/media/icons/fa-spinner/25/0/2b3cad_none.png" height="25" width="25"></div></td>
<td style="padding:0px;border:0px;padding:0px 20px 10px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad">
Expand All @@ -30,8 +30,27 @@ Build #${object.sequence} is ${object.state}
<td style="padding:0px;border:0px;font-weight:normal;font-size:12px;vertical-align:middle;padding:0px 20px 0px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad;border-right:1px solid #606060;border-top-right-radius:5px" align="right">
<div style="vertical-align:middle;min-height:20px;width:20px;padding:20px;display:inline-block;width:20px;min-height:20px"></div> <span style="vertical-align:middle">Age: ${object.job_age}m</span>
</td>
</tr>
</thead>
<tbody style="margin-bottom:40px">
<tr style="padding:0px;border:0px">
<td style="padding:0px;border:0px;padding:10px 20px 10px 0px;height:20px;width:20px;padding:0px;border-left:1px solid #adadad;padding-top:20px;padding-bottom:5px;text-align:center"></td>
<td style="padding:0px;border:0px;color:#808080;padding:10px 20px 10px 0px;height:20px;padding-top:20px;padding-bottom:5px"><strong>${object.committer}</strong></td>
<td style="padding:0px;border:0px;color:#808080;padding:10px 20px 10px 0px;height:20px;border-right:1px solid #adadad;padding-top:20px;padding-bottom:5px;font-size:12px" align="right">changeset <a href="${object.repo_id.name.replace('.git', '')}/commit/${object.name[:8]}" style="text-decoration:underline;color:#606060" target="_blank">${object.name[:8]}</a></td>
</tr>
<tr style="padding:0px;border:0px">
<td style="padding:0px;border:0px;padding:10px 20px 10px 0px;height:20px;width:20px;padding:0px;border-left:1px solid #adadad;border-bottom-left-radius:5px;border-bottom:1px solid #adadad">&nbsp;</td>
<td colspan="2" style="padding:0px;border:0px;color:#808080;padding:10px 20px 10px 0px;height:20px;border-right:1px solid #adadad;padding-bottom:20px;padding-top:0px;border-bottom:1px solid #adadad;border-bottom-right-radius:5px">${object.subject}</td>
</tr>
</tbody>
</table>
</div>
</div>
% elif (object.state=="running" or object.state=="done") and (object.result=="ok"):
<div style="border-radius:5px;padding:0px;width:570px;font-size:13px">
<div>
<table style="padding:0px;border:0px;width:100%;border-spacing:0">
<thead>
<tr style="padding:0px;border:0px;font-weight:700;font-size:18px;background-color:#baecb7;color:#32a32d">
<td style="padding:0px;border:0px;padding:0px 20px 0px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad;width:50px;padding:0px;text-align:center;vertical-align:middle;padding-top:5px;border-left:1px solid #606060;border-top-left-radius:5px"><div style="width:25px;min-height:30px;margin-left:15px;margin-top:0px;vertical-align:middle"><img class="CToWUd" src="http://fa2png.io/media/icons/fa-thumbs-up/25/0/50ad57_none.png" height="25" width="25"></div></td>
<td style="padding:0px;border:0px;padding:0px 20px 10px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad">
Expand All @@ -42,8 +61,27 @@ Build #${object.sequence} is ${object.state}
<td style="padding:0px;border:0px;font-weight:normal;font-size:12px;vertical-align:middle;padding:0px 20px 0px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad;border-right:1px solid #606060;border-top-right-radius:5px" align="right">
<div style="vertical-align:middle;min-height:20px;width:20px;padding:20px;display:inline-block;width:20px;min-height:20px"></div> <span style="vertical-align:middle">Age: ${object.job_age}m</span>
</td>
</tr>
</thead>
<tbody style="margin-bottom:40px">
<tr style="padding:0px;border:0px">
<td style="padding:0px;border:0px;padding:10px 20px 10px 0px;height:20px;width:20px;padding:0px;border-left:1px solid #adadad;padding-top:20px;padding-bottom:5px;text-align:center"></td>
<td style="padding:0px;border:0px;color:#808080;padding:10px 20px 10px 0px;height:20px;padding-top:20px;padding-bottom:5px"><strong>${object.committer}</strong></td>
<td style="padding:0px;border:0px;color:#808080;padding:10px 20px 10px 0px;height:20px;border-right:1px solid #adadad;padding-top:20px;padding-bottom:5px;font-size:12px" align="right">changeset <a href="${object.repo_id.name.replace('.git', '')}/commit/${object.name[:8]}" style="text-decoration:underline;color:#606060" target="_blank">${object.name[:8]}</a></td>
</tr>
<tr style="padding:0px;border:0px">
<td style="padding:0px;border:0px;padding:10px 20px 10px 0px;height:20px;width:20px;padding:0px;border-left:1px solid #adadad;border-bottom-left-radius:5px;border-bottom:1px solid #adadad">&nbsp;</td>
<td colspan="2" style="padding:0px;border:0px;color:#808080;padding:10px 20px 10px 0px;height:20px;border-right:1px solid #adadad;padding-bottom:20px;padding-top:0px;border-bottom:1px solid #adadad;border-bottom-right-radius:5px">${object.subject}</td>
</tr>
</tbody>
</table>
</div>
</div>
% else:
<div style="border-radius:5px;padding:0px;width:570px;font-size:13px">
<div>
<table style="padding:0px;border:0px;width:100%;border-spacing:0">
<thead>
<tr style="padding:0px;border:0px;font-weight:700;font-size:18px;background-color:#EFBABA;color:#FF0000">
<td style="padding:0px;border:0px;padding:0px 20px 0px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad;width:50px;padding:0px;text-align:center;vertical-align:middle;padding-top:5px;border-left:1px solid #606060;border-top-left-radius:5px"><div style="width:25px;min-height:30px;margin-left:15px;margin-top:0px;vertical-align:middle"><img class="CToWUd" src="http://fa2png.io/media/icons/fa-thumbs-down/25/0/ff0000_none.png" height="25" width="25"></div></td>
<td style="padding:0px;border:0px;padding:0px 20px 10px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad">
Expand All @@ -54,9 +92,8 @@ Build #${object.sequence} is ${object.state} but failed
<td style="padding:0px;border:0px;font-weight:normal;font-size:12px;vertical-align:middle;padding:0px 20px 0px 0px;vertical-align:middle;border-top:1px solid #808080;border-bottom:1px solid #adadad;border-right:1px solid #606060;border-top-right-radius:5px" align="right">
<div style="vertical-align:middle;min-height:20px;width:20px;padding:20px;display:inline-block;width:20px;min-height:20px"></div> <span style="vertical-align:middle">Age: ${object.job_age}m</span>
</td>
</tr>
% endif
</thead>
</tr>
</thead>
<tbody style="margin-bottom:40px">
<tr style="padding:0px;border:0px">
<td style="padding:0px;border:0px;padding:10px 20px 10px 0px;height:20px;width:20px;padding:0px;border-left:1px solid #adadad;padding-top:20px;padding-bottom:5px;text-align:center"></td>
Expand All @@ -71,6 +108,7 @@ Build #${object.sequence} is ${object.state} but failed
</table>
</div>
</div>
% endif
<!-- System Message -->
% if object.state=="testing":
Expand Down

0 comments on commit 14b3726

Please sign in to comment.