]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1102364: Add microdata to HTML bugmail so GMail can display a "View bug" button
authorEd Morley <emorley@mozilla.com>
Sun, 22 Feb 2015 21:59:56 +0000 (21:59 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Sun, 22 Feb 2015 21:59:56 +0000 (21:59 +0000)
r=dkl,a=sgreen

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

index b0f4efb45cf4e3eae543785aae477563f1055717..458c1a6a429a59c0d992fffaed2447f4d172d20b 100644 (file)
       [% Hook.process('start') %]
       [% PROCESS generate_diffs %]
       <p>
+      [% SET 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 %]
         [% END %]
       [% END %]
       </ul>
+      <div itemscope itemtype="http://schema.org/EmailMessage">
+        <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
+          <link itemprop="url" href="[% urlbase FILTER html %]show_bug.cgi?id=[% "$bug.id$comment_anchor" FILTER uri %]"/>
+          <meta itemprop="name" content="View [% terms.bug %]"/>
+        </div>
+        <meta itemprop="description" content="[% terms.Bugzilla %] [%+ terms.bug %] update notification"/>
+      </div>
     </body>
 </html>