From b06457c75cf5ff64f380bf703287ee0d439133f0 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 22 Nov 2021 13:23:02 -0500 Subject: [PATCH] Titles of pages: make project:jobset:job names clickable But don't make the final element clickable when we're looking at that thing. --- src/root/all.tt | 15 +++++++++++---- src/root/build.tt | 5 ++++- src/root/edit-jobset.tt | 6 +++--- src/root/evals.tt | 9 +++++++-- src/root/job.tt | 3 ++- src/root/jobset-eval.tt | 4 +++- src/root/jobset.tt | 4 +++- src/root/log.tt | 5 ++++- 8 files changed, 37 insertions(+), 14 deletions(-) diff --git a/src/root/all.tt b/src/root/all.tt index a4517349..e877f5b5 100644 --- a/src/root/all.tt +++ b/src/root/all.tt @@ -1,7 +1,14 @@ -[% WRAPPER layout.tt title="Latest builds" _ - (job ? " for job $project.name:$jobset.name:$job" : - jobset ? " for jobset $project.name:$jobset.name" : - project ? " for project $project.name" : "") %] +[% WRAPPER layout.tt +titleHTML="Latest builds" _ + (job ? " for job " _ linkToJob(jobset, job) : + jobset ? " for jobset " _ linkToJobset(jobset) : + project ? " for project " _ linkToProject(project) : + "") + title="Latest builds" _ + (job ? " for job " _ makeNameTextForJob(jobset, job) : + jobset ? " for jobset " _ makeNameTextForJobset(jobset) : + project ? " for project $project.name" : + "") %] [% PROCESS common.tt %]

Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %] out of [% total %] in order of descending finish time.

diff --git a/src/root/build.tt b/src/root/build.tt index f9f442f6..ea3b75c4 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -1,4 +1,7 @@ -[% WRAPPER layout.tt title="Build $id of job $project.name:$jobset.name:$job" %] +[% WRAPPER layout.tt + title="Build $id of job " _ makeNameTextForJob(jobset, job) + titleHTML="Build $id of job " _ linkToJob(jobset, job) +%] [% PROCESS common.tt %] [% PROCESS "product-list.tt" %] [% USE HTML %] diff --git a/src/root/edit-jobset.tt b/src/root/edit-jobset.tt index 22874815..dbd26dcc 100644 --- a/src/root/edit-jobset.tt +++ b/src/root/edit-jobset.tt @@ -1,8 +1,8 @@ [% WRAPPER layout.tt title= (create ? "Creating jobset in project $project.name" : - createFromEval ? "Creating jobset from evaluation $eval.id of $project.name:$jobset.name" : - cloneJobset ? "Cloning jobset $project.name:$jobset.name" : - "Editing jobset $project.name:$jobset.name") %] + createFromEval ? "Creating jobset from evaluation $eval.id of " _ makeNameTextForJobset(jobset) : + cloneJobset ? "Cloning jobset " _ makeNameTextForJobset(jobset) : + "Editing jobset " _ makeNameTextForJobset(jobset)) %] [% PROCESS common.tt %] [% USE format %] diff --git a/src/root/evals.tt b/src/root/evals.tt index 977441b3..c12079d1 100644 --- a/src/root/evals.tt +++ b/src/root/evals.tt @@ -1,6 +1,11 @@ -[% WRAPPER layout.tt title= +[% WRAPPER layout.tt + title= (build ? "Evaluations containing build $build.id" : - jobset ? "Evaluations of jobset $project.name:$jobset.name" : + jobset ? "Evaluations of jobset " _ makeNameTextForJobset(jobset) : + "Latest evaluations") + titleHTML = + (build ? "Evaluations containing build $build.id" : + jobset ? "Evaluations of jobset " _ linkToJobset(jobset) : "Latest evaluations") %] [% PROCESS common.tt %] diff --git a/src/root/job.tt b/src/root/job.tt index e8a56569..7e475f69 100644 --- a/src/root/job.tt +++ b/src/root/job.tt @@ -1,5 +1,6 @@ [% WRAPPER layout.tt - title="Job $project.name:$jobset.name:$job" + title=makeNameTextForJob(jobset, job) + titleHTML=makeNameLinksForJob(jobset, job) starUri=c.uri_for(c.controller('Job').action_for('star'), c.req.captures) %] [% PROCESS common.tt %] diff --git a/src/root/jobset-eval.tt b/src/root/jobset-eval.tt index d6f2b6d1..e1d25af1 100644 --- a/src/root/jobset-eval.tt +++ b/src/root/jobset-eval.tt @@ -1,4 +1,6 @@ -[% WRAPPER layout.tt title="Evaluation $eval.id of jobset $project.name:$jobset.name " %] +[% WRAPPER layout.tt + title="Evaluation $eval.id of jobset " _ makeNameTextForJobset(jobset) + titleHTML="Evaluation $eval.id of jobset " _ linkToJobset(jobset) %] [% PROCESS common.tt %]