diff --git a/src/root/common.tt b/src/root/common.tt
index 5473b2a2..98a37758 100644
--- a/src/root/common.tt
+++ b/src/root/common.tt
@@ -1,65 +1,67 @@
-[% USE date %]
-[% USE String %]
-[% USE HTML %]
+[%
+USE date;
+USE String;
+USE HTML;
-[% inputTypes =
- { "svn" = "Subversion export"
- , "svn-checkout" = "Subversion checkout"
- , "bzr" = "Bazaar export"
- , "bzr-checkout" = "Bazaar checkout"
- , "git" = "Git checkout"
- , "hg" = "Mercurial checkout"
- , "string" = "String value"
- , "boolean" = "Boolean"
- , "path" = "Local path"
- , "build" = "Build output"
- , "sysbuild" = "Build output (same system)"
- }
-%]
+inputTypes =
+ { "svn" = "Subversion export"
+ , "svn-checkout" = "Subversion checkout"
+ , "bzr" = "Bazaar export"
+ , "bzr-checkout" = "Bazaar checkout"
+ , "git" = "Git checkout"
+ , "hg" = "Mercurial checkout"
+ , "string" = "String value"
+ , "boolean" = "Boolean"
+ , "path" = "Local path"
+ , "build" = "Build output"
+ , "sysbuild" = "Build output (same system)"
+ };
+
+BLOCK renderDateTime;
+date.format(timestamp, '%Y-%m-%d %H:%M:%S');
+END;
-[% BLOCK renderDateTime %]
- [% date.format(timestamp, '%Y-%m-%d %H:%M:%S') %]
-[% END %]
+BLOCK renderProjectName %]
+[% project %]
+[% END;
-[% BLOCK renderProjectName %]
-[% project %][% END %]
+BLOCK renderJobsetName %]
+[% jobset %]
+[% END;
-[% BLOCK renderJobsetName %]
-[% jobset %][% END %]
+BLOCK renderJobName %]
+[% job %]
+[% END;
-[% BLOCK renderJobName %]
-[% job %][% END %]
-
-
-[% BLOCK renderFullJobsetName %]
+BLOCK renderFullJobsetName %]
[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]
-[% END %]
+[% END;
-[% BLOCK renderFullJobName %]
+BLOCK renderFullJobName %]
[% IF !hideProjectName; INCLUDE renderProjectName %]:[% END; IF !hideJobsetName; INCLUDE renderJobsetName %]:[% END; INCLUDE renderJobName %]
-[% END %]
+[% END;
-[% BLOCK renderFullJobNameOfBuild %]
- [% INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job") %]
-[% END %]
+BLOCK renderFullJobNameOfBuild;
+ INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job");
+END;
-[% BLOCK renderDuration %]
-[% IF duration >= 24 * 60 * 60 %][% duration div (24 * 60 * 60) %]d[% END %]
-[% IF duration >= 60 * 60 %][% duration div (60 * 60) % 24 %]h[% END %]
-[% IF duration >= 60 %][% duration div 60 % 60 %]m[% END %]
-[% duration % 60 %]s
-[% END %]
+BLOCK renderDuration;
+ IF duration >= 24 * 60 * 60; duration div (24 * 60 * 60) %]d[% END;
+ IF duration >= 60 * 60; duration div (60 * 60) % 24 %]h[% END;
+ IF duration >= 60; duration div 60 % 60 %]m[% END;
+ duration % 60 %]s[%
+END;
-[% BLOCK renderBuildListHeader %]
+BLOCK renderBuildListHeader %]
@@ -88,70 +90,73 @@
-[% END %]
+[% END;
-[% BLOCK renderBuildListBody %]
- [% odd = 0 %]
- [% FOREACH build IN builds %]
-
- [% IF !hideResultInfo %]
-
- [% INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.buildstatus %]
- |
- [% END %]
- [% IF showSchedulingInfo %]
- [% IF build.busy %]Started[% ELSE %]Queued[% END %] |
- [% END %]
- [% build.id %] |
- [% IF showSchedulingInfo %]
- [% build.priority %] |
- [% END %]
- [% IF !hideJobName %]
- [% INCLUDE renderFullJobNameOfBuild %] |
- [% END %]
- [% !showSchedulingInfo and build.get_column('releasename') ? build.get_column('releasename') : build.nixname %] |
- [% build.system %] |
- [% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %] |
- [% IF showStatusChange %]
-
- [% IF build.get_column('statusChangeTime') %]
-
- [% date.format(build.get_column('statusChangeTime'), '%Y-%m-%d %H:%M:%S') %]
-
- [% ELSE %]
- never
- [% END %]
- |
- [% END %]
- [% IF showDescription %]
- [% build.description %] |
- [% END %]
-
+
+BLOCK renderBuildListBody;
+ odd = 0;
+ FOREACH build IN builds; %]
+
+ [% IF !hideResultInfo %]
+
+ [% INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.buildstatus %]
+ |
[% END %]
-[% END %]
+ [% IF showSchedulingInfo %]
+ [% IF build.busy %]Started[% ELSE %]Queued[% END %] |
+ [% END %]
+ [% build.id %] |
+ [% IF showSchedulingInfo %]
+ [% build.priority %] |
+ [% END %]
+ [% IF !hideJobName %]
+ [% INCLUDE renderFullJobNameOfBuild %] |
+ [% END %]
+ [% !showSchedulingInfo and build.get_column('releasename') ? build.get_column('releasename') : build.nixname %] |
+ [% build.system %] |
+ [% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %] |
+ [% IF showStatusChange %]
+
+ [% IF build.get_column('statusChangeTime') %]
+
+ [% date.format(build.get_column('statusChangeTime'), '%Y-%m-%d %H:%M:%S') %]
+
+ [% ELSE %]
+ never
+ [% END %]
+ |
+ [% END %]
+ [% IF showDescription %]
+ [% build.description %] |
+ [% END %]
+
+ [% END;
+END;
-[% BLOCK renderBuildListFooter %]
+
+BLOCK renderBuildListFooter %]
-[% END %]
-
-[% BLOCK renderBuildList %]
-[% INCLUDE renderBuildListHeader %]
-[% INCLUDE renderBuildListBody %]
-[% INCLUDE renderBuildListFooter %]
-[% END %]
+[% END;
-[% BLOCK renderLink %][% title %][% END %]
+BLOCK renderBuildList;
+ INCLUDE renderBuildListHeader;
+ INCLUDE renderBuildListBody;
+ INCLUDE renderBuildListFooter;
+END;
-[% BLOCK showBuildStats %]
+BLOCK renderLink %][% title %][% END;
+
+
+BLOCK showBuildStats %]
Finished builds: |
@@ -178,26 +183,27 @@
[% busyBuilds %] |
-
-[% END %]
+[% END;
-[% BLOCK renderViewJobName %]
-[% IF job.description; HTML.escape(job.description); ELSE %][% job.job %] ([% job.attrs %])[% END %]
-[% END %]
+BLOCK renderViewJobName;
+ IF job.description; HTML.escape(job.description); ELSE %][% job.job %] ([% job.attrs %])[% END;
+END;
-[% BLOCK maybeLink %]
- [% IF uri %] uri, class => class) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %][% ELSE; content; END %]
-[% END %]
+BLOCK maybeLink;
+ IF uri %] uri, class => class) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %][% ELSE; content; END;
+END;
-[% BLOCK maybeButton %]
- [% IF uri %] uri) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %][% ELSE; content; END %]
-[% END %]
-[% BLOCK renderSelection %]
- [% IF edit %]
- [% IF radiobuttons %]
+BLOCK maybeButton;
+ IF uri %] uri); IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END; content %][% ELSE; content; END;
+END;
+
+
+BLOCK renderSelection;
+ IF edit;
+ IF radiobuttons; %]
[% FOREACH name IN options.keys.sort %]