Source

AnnouncerPlugin / announcer / templates / ticket_email_mimic.html

<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:py="http://genshi.edgewall.org/"
     xmlns:xi="http://www.w3.org/2001/XInclude">
  <head>
    <title>#${ticket.id}: ${ticket['summary']}</title>
    
    <style>
      body {
        font: medium "Lucida Grande", Lucida, Verdana, sans-serif;
      }

      .header {
        font-size: large;
      }

      .ticketbox {
        background-color: #fefcd3;
        width: 90%;
        padding: .5em 1em;
        border-style: outset;
        border-width: 1px;
        margin: 2px;
      }

      .title {
        font-weight: bold;
        border-bottom: 1pt inset #dfdfdf;
        padding-bottom: .5em;
      }

      .label {
        font-size: x-small;
        color: #7e7e7e;
        border-bottom: 1pt inset #dfdfdf;
        padding-bottom: .5em;  
        width:  30%;  
      }

      .value {
        border-bottom: 1pt inset #dfdfdf;
        padding-bottom: .5em;
        font-size: small;
      }

      .header {
        width:  90%;
        padding-bottom: 1em;
      }

      .descheader {
        font-size: x-small;
        color: #7e7e7e;
        border-bottom: 1pt inset #dfdfdf;
        padding-bottom: .5em;
        font-weight: bold;
      }

      .descbody {
        font-size: small;
        padding: 1em;
      }

      .changetitle {
        font-size: small;
        margin: 1em;
      }

      .changeitem {
        font-size: small;
      }

      .fieldname {
        font-weight: bold;
      }

      .from {
        font-style: italic;
      }

      .to {
        font-style: italic;
      }

      .longchange {
        font-size: small;
      }

      .htmldiff {
        margin-left: 2em;
        padding: 1em;
        width: 90%;
        background-color: #f3f3f3;
        margin: 5px;
        border-style: outset;
        border-width: 1px;
      }

      .commentstitle {
        font-size: small;
        margin: 1em;
      }

      .comments {
        margin: 0 0 0 2em;
      }

      .footer {
        font-size: small;
      }
    </style>

  </head>
  <body bgcolor="white" style='font: medium "Lucida Grande", Lucida, Verdana, sans-serif'>
    <span class="header" style="font-size: large;">Ticket #${ticket.id} (${ticket['status']} ${ticket['type']})</span>
    <div class="ticketbox" style="background-color: #fefcd3; width: 90%; padding: .5em 1em; border-style: outset; border-width: 1px; margin: 2px;">
      <div class="title" style="font-weight: bold; border-bottom: 1pt inset #dfdfdf; padding-bottom: .5em;">${ticket['summary']}</div>
      <table class="header" width="100%">
        <tr py:for="field in fields">
          <td class="label" width="30%" style="font-size: x-small; color: #7e7e7e; border-bottom: 1pt inset #dfdfdf; padding-bottom: .5em; width:  30%;">${field['label']}:</td>
          <td class="value" width="70%" style="border-bottom: 1pt inset #dfdfdf; padding-bottom: .5em; font-size: small;">${ticket[field['name']] or 'None'}</td>
        </tr>
      </table>
      <py:if test="category == 'created'">
      <div class="descheader" style="font-size: x-small; color: #7e7e7e; border-bottom: 1pt inset #dfdfdf; padding-bottom: .5em; font-weight: bold;">Description</div>
      <div class="descbody" style="font-size: small; padding: 1em;">${description}</div>
      </py:if>
    </div>
    <py:if test="has_changes or attachment">
      <div class="changetitle" style="font-size: small; margin: 1em;">Changes (by <strong>${author}</strong>):</div>
      <ul>
        <li py:for="change in short_changes" class="changeitem" style="font-size: small;">
          <span class="fieldname" style="font-weight: bold; font-style: italic;">${change}</span> changed 
          <py:if test="short_changes[change][0]">
            from <span class="from" style="font-weight: bold;">${short_changes[change][0]}</span>
          </py:if> 
          to <span class="to" style="font-weight: bold;">${short_changes[change][1]}</span>.
        </li>
      </ul>
      <ul>
        <li py:for="(change, content) in long_changes.items()" class="longchange" style="font-size: small;">
          <span class="fieldname" style="font-weight: bold; font-style: italic;">${change}:</span>
          <div class="htmldiff" style="margin-left: 2em; padding: 1em; width: 90%; background-color: #f3f3f3; margin: 5px; border-style: outset; border-width: 1px;">${content}</div>
        </li>
      </ul>
    </py:if>
    <py:if test="attachment">
      <div class="commentstitle" style="font-size: small; margin: 1em;">Attachment:</div>
      <ul>
        <li>File <span class="fieldname" style="font-weight: bold; font-style: italic;">${attachment.filename}</span> added<py:if test="attachment.description">: <span style="font-style: italic">${comment}</span></py:if></li>
      </ul>
    </py:if>
    <py:if test="comment and not attachment">
      <div class="commentstitle" style="font-size: small; margin: 1em;">Comments: <span py:if="not (has_changes)">(by <strong>${author}</strong>)</span></div>
      <div class="comments" style="margin: 0 0 0 2em;">${comment}</div>
    </py:if>
    <br />
    <hr />
    <br />
    <div class="footer" style="font-size: small;">Ticket URL: <a href="${ticket_link}">${ticket_link}</a><br />
    ${project_name} <a href="${project_link}">${project_link}</a><br />
    ${project_desc}<br />
    </div>
  </body>
</html>