From 0b202580ce3ace07938b2cee7fb7aff9471ecc71 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 25 Sep 2013 12:34:13 +0200 Subject: [PATCH] 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 --- src/root/build.tt | 4 ++-- src/root/clone-build.tt | 2 +- src/root/common.tt | 20 ++++++++++---------- src/root/jobset-jobs-tab.tt | 2 +- src/root/layout.tt | 18 +++++++++--------- src/root/product-list.tt | 24 ++++++++++++------------ src/root/project.tt | 8 ++++---- src/root/view.tt | 10 +++++----- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/root/build.tt b/src/root/build.tt index 882b61c0..58464629 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -402,8 +402,8 @@
- - + + - + + - - - + + + - + - - + + - + [% tracker %] diff --git a/src/root/product-list.tt b/src/root/product-list.tt index 78951dd6..5557f3ae 100644 --- a/src/root/product-list.tt +++ b/src/root/product-list.tt @@ -40,7 +40,7 @@ - Source + Source Failed build produced output. Click here to inspect the output. [% WRAPPER makePopover title="Help" classes="btn-mini" %] @@ -59,7 +59,7 @@ [% uri = c.uri_for('/build' build.id 'nix' 'pkg' "${build.nixname}-${build.system}.nixpkg") %] - Source + Source One-click install of Nix package [% build.nixname %] [% WRAPPER makePopover title="Help" classes="btn-mini" %] @@ -87,7 +87,7 @@ [% uri = c.uri_for('/build' build.id 'nix' 'closure' filename ) %] - Source + Source Nix closure of path [% product.path %] @@ -127,17 +127,17 @@ [% SWITCH product.subtype %] [% CASE "source-dist" %] - Source Source distribution [% product.name %] + Source Source distribution [% product.name %] [% CASE "rpm" %] - RPM RPM package [% product.name %] + RPM RPM package [% product.name %] [% CASE "srpm" %] - Source RPM Source RPM package [% product.name %] + Source RPM Source RPM package [% product.name %] [% CASE "deb" %] - RPM Debian package [% product.name %] + RPM Debian package [% product.name %] [% CASE "iso" %] - ISO ISO-9660 CD/DVD image [% product.name %] + ISO ISO-9660 CD/DVD image [% product.name %] [% CASE "binary-dist" %] - Binary distribution Binary distribution [% product.name %] + Binary distribution Binary distribution [% product.name %] [% CASE DEFAULT %] File [% product.name %] of type [% product.subtype %] [% END %] @@ -160,7 +160,7 @@ - Report + Report [% SWITCH product.subtype %] [% CASE "coverage" %] Code coverage analysis report @@ -177,9 +177,9 @@ [% IF product.type == "doc-pdf" %] - PDF document + PDF document [% ELSE %] - Document + Document [% END %] [% SWITCH product.subtype %] [% CASE "readme" %] diff --git a/src/root/project.tt b/src/root/project.tt index bf36d76d..668095fd 100644 --- a/src/root/project.tt +++ b/src/root/project.tt @@ -32,13 +32,13 @@ [% IF j.get_column('nrscheduled') > 0 %] - Scheduled + Scheduled [% ELSIF j.get_column('nrfailed') == 0 %] - Succeeded + Succeeded [% ELSIF j.get_column('nrfailed') > 0 && j.get_column('nrsucceeded') > 0 %] - Some Failed + Some Failed [% ELSE %] - All Failed + All Failed [% END %] [% INCLUDE renderJobsetName project=project.name jobset=j.name inRow=1 %] diff --git a/src/root/view.tt b/src/root/view.tt index a0d152db..e845e185 100644 --- a/src/root/view.tt +++ b/src/root/view.tt @@ -27,11 +27,11 @@ [% IF result.status == 0 %] - + [% ELSIF result.status == 1 %] - + [% ELSIF result.status == 2 %] - + [% END %] [% result.id %] @@ -48,9 +48,9 @@ [% IF j.build %] [% IF j.build.get_column('buildstatus') == 0 %] - + [% ELSE %] - + [% END %] [% END %]