]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1100476: Add microdata to flag request bugmail so Gmail can display a "View bug...
authorEd Morley <emorley@mozilla.com>
Thu, 28 May 2015 17:04:53 +0000 (18:04 +0100)
committerDavid Lawrence <dkl@mozilla.com>
Thu, 28 May 2015 17:04:53 +0000 (18:04 +0100)
r=dkl,a=glob

template/en/default/email/flagmail.html.tmpl

index 152c3420efde2754b07debe7cb9d0d6a808623bb..1522ca46dcb8f47e13816a27e8989d93e7d512b0 100644 (file)
     [% Hook.process('after_summary') %]
 
     <p>
-      [% FOREACH comment = new_comments %]
+      [% comment_anchor = '' %]
+      [% FOREACH comment = new_comments.reverse %]
         <div>
           [% IF comment.count %]
+            [% comment_anchor = "#c$comment.count" %]
             <b>[% "Comment # ${comment.count}" FILTER bug_link(bug,
                 {comment_num => comment.count, full_url => 1, user => to_user}) FILTER none =%]
             on [% "$terms.bug $bug.id" FILTER bug_link(bug, { full_url => 1, user => to_user }) FILTER none =%]
         </div>
       [% END %]
     </p>
+
+    <div itemscope itemtype="http://schema.org/EmailMessage">
+      <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
+        [%# Filtering of the URL param is not required & would break the URL when the comment anchor is set %]
+        <link itemprop="url" href="[% urlbase FILTER html %]show_bug.cgi?id=[% "$bug.id$comment_anchor" FILTER none %]">
+        <meta itemprop="name" content="View [% terms.bug %]">
+      </div>
+      <meta itemprop="description" content="[% terms.Bugzilla %] [%+ terms.bug %] update notification">
+    </div>
   </body>
 </html>