templates: Use uri_for to reference static paths.
This commit is provided by (zsh syntax): sed -i 's|/static[^"]*|[% c.uri_for("&") %]|;s/\[% size %\]/${size}/' **/*.tt And the reason for this change is to make it easier to change the base path with headers like X-Request-Base to be served within a URI prefix, especially when behind a reverse proxy. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
@ -32,13 +32,13 @@
|
||||
<tr>
|
||||
<td>
|
||||
[% IF j.get_column('nrscheduled') > 0 %]
|
||||
<img src="/static/images/help_16.png" alt="Scheduled" />
|
||||
<img src="[% c.uri_for("/static/images/help_16.png") %]" alt="Scheduled" />
|
||||
[% ELSIF j.get_column('nrfailed') == 0 %]
|
||||
<img src="/static/images/checkmark_16.png" alt="Succeeded" />
|
||||
<img src="[% c.uri_for("/static/images/checkmark_16.png") %]" alt="Succeeded" />
|
||||
[% ELSIF j.get_column('nrfailed') > 0 && j.get_column('nrsucceeded') > 0 %]
|
||||
<img src="/static/images/error_some_16.png" alt="Some Failed" />
|
||||
<img src="[% c.uri_for("/static/images/error_some_16.png") %]" alt="Some Failed" />
|
||||
[% ELSE %]
|
||||
<img src="/static/images/error_16.png" alt="All Failed" />
|
||||
<img src="[% c.uri_for("/static/images/error_16.png") %]" alt="All Failed" />
|
||||
[% END %]
|
||||
</td>
|
||||
<td><span class="[% IF !j.enabled %]disabled-jobset[% END %] [%+ IF j.hidden %]hidden-jobset[% END %]">[% INCLUDE renderJobsetName project=project.name jobset=j.name inRow=1 %]</span></td>
|
||||
|
Reference in New Issue
Block a user