That patch should work, provided the correct variables are passed to the
template renderer. I don't know if they are.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Thu, Mar 4, 2010 at 12:37 PM, Paul <psarm...@gmail.com> wrote:

> My users are complaining because reply mails that have comments to
> lines of code end up with relative URLs rather than absolute URLs.
>
> e.g.
> <a href="/r/42/diff/1/?file=173#file173line549" style="color: black;
> font-weight: bold; text-decoration: underline;">/ops/configuration/
> cfengine/inputs/cf.main</a>
>
> I wrote the following patch which I expected to fix this, but it
> didn't work. Any ideas on where I should look next?
>
> diff -ur ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> email_diff_comment_fragment.html ReviewBoard-1.5beta1/reviewboard/
> templates/notifications/email_diff_comment_fragment.html
> --- ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> email_diff_comment_fragment.html      2010-02-14 13:25:13.000000000
> -0800
> +++ ReviewBoard-1.5beta1/reviewboard/templates/notifications/
> email_diff_comment_fragment.html   2010-03-03 15:07:13.363661209 -0800
> @@ -5,7 +5,7 @@
>  <thead>
>   <tr>
>    <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid
> #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
> -    <a href="{{comment.get_absolute_url}}" style="color: black; font-
> weight: bold; text-decoration:
> underline;">{{comment.filediff.dest_file}}</a>
> +    <a href="{{domain_method}}://{{domain}}
> {{comment.get_absolute_url}}" style="color: black; font-weight: bold;
> text-decoration: underline;">{{comment.filediff.dest_file}}</a>
>     <span style="font-weight: normal;">
>  {% if comment.interfilediff %}
>      (Diff revisions {{comment.filediff.diffset.revision}} -
> {{comment.interfilediff.diffset.revision}})
> diff -ur ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> reply_email.html ReviewBoard-1.5beta1/reviewboard/templates/
> notifications/reply_email.html
> --- ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> reply_email.html      2010-02-14 13:25:13.000000000 -0800
> +++ ReviewBoard-1.5beta1/reviewboard/templates/notifications/
> reply_email.html   2010-03-03 15:05:28.383660132 -0800
> @@ -38,7 +38,7 @@
>
>   <table bgcolor="#f0f0f0" cellpadding="5" cellspacing="5"
> style="border: 1px solid #c0c0c0; margin-bottom: 10px">
>    <tr>
> -    <td><a href="{{comment.screenshot.get_absolute_url}}"
> style="color: black; font-weight: bold; font-size:
> 9pt;">{{comment.screenshot.image.name|basename}}</a></td>
> +     <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}" style="color: black; font-
> weight: bold; font-size: 9pt;">{{comment.screenshot.image.name|
> basename}}</a></td>
>    </tr>
>    <tr>
>     <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}"><img src="{{domain_method}}://
> {{domain}}{{comment.get_image_url}}" style="border: 1px black solid;"
> alt="{{comment.screenshot.caption}}"></a></td>
> diff -ur ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> review_email.html ReviewBoard-1.5beta1/reviewboard/templates/
> notifications/review_email.html
> --- ReviewBoard-1.5beta1-orig/reviewboard/templates/notifications/
> review_email.html     2010-02-14 13:25:13.000000000 -0800
> +++ ReviewBoard-1.5beta1/reviewboard/templates/notifications/
> review_email.html  2010-03-03 15:07:57.651160670 -0800
> @@ -15,7 +15,7 @@
>  {% for comment in review.screenshot_comments.all %}
>  <table bgcolor="#f0f0f0" cellpadding="5" cellspacing="5"
> style="border: 1px solid #c0c0c0; margin-bottom: 10px">
>  <tr>
> -  <td><a href="{{comment.screenshot.get_absolute_url}}" style="color:
> black; font-weight: bold; font-size:
> 9pt;">{{comment.screenshot.image.name|basename}}</a></td>
> +   <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}" style="color: black; font-
> weight: bold; font-size: 9pt;">{{comment.screenshot.image.name|
> basename}}</a></td>
>  </tr>
>  <tr>
>   <td><a href="{{domain_method}}://{{domain}}
> {{comment.screenshot.get_absolute_url}}"><img src="{{domain_method}}://
> {{domain}}{{comment.get_image_url}}" style="border: 1px black solid;"
> alt="{{comment.screenshot.caption}}"></a></td>
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to