Patchwork [2,of,3,V3] hgweb, spartan: add "URL breadcrumbs"

login
register
mail settings
Submitter Angel Ezquerra
Date Dec. 21, 2012, 1:44 a.m.
Message ID <6b19de868eab834c5a2e.1356054258@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/232/
State Superseded
Headers show

Comments

Angel Ezquerra - Dec. 21, 2012, 1:44 a.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1356054012 -3600
# Node ID 6b19de868eab834c5a2ed282c09f36d83077560e
# Parent  b21011213cfbb798edfe744aaa76db26745b5dc4
hgweb, spartan: add "URL breadcrumbs"

This change adds a "URL breadcrumb"  to the "title" of the pages on the spartan
template. By title I mean the first line that is shown right below the page
selection row, which shows the name of the page that is being viewed, along with
some additional information.

In doing so it standarizes those "titles" which now follow the pattern:

URL breadcumb / page details

Patch

diff --git a/mercurial/templates/spartan/branches.tmpl b/mercurial/templates/spartan/branches.tmpl
--- a/mercurial/templates/spartan/branches.tmpl
+++ b/mercurial/templates/spartan/branches.tmpl
@@ -18,7 +18,7 @@ 
 <a type="application/atom+xml" href="{url}atom-branches">atom</a>
 </div>
 
-<h2>branches:</h2>
+<h2>{pathdef%breadcrumb} / branches</h2>
 
 <ul id="tagEntries">
 {entries%branchentry}
diff --git a/mercurial/templates/spartan/changelog.tmpl b/mercurial/templates/spartan/changelog.tmpl
--- a/mercurial/templates/spartan/changelog.tmpl
+++ b/mercurial/templates/spartan/changelog.tmpl
@@ -19,7 +19,7 @@ 
 <a type="application/atom+xml" href="{url}atom-log" title="Atom feed for {repo|escape}">atom</a>
 </div>
 
-<h2>changelog for {repo|escape}</h2>
+<h2>{pathdef%breadcrumb} / changelog</h2>
 
 <form action="{url}log">
 {sessionvars%hiddenformentry}
diff --git a/mercurial/templates/spartan/changeset.tmpl b/mercurial/templates/spartan/changeset.tmpl
--- a/mercurial/templates/spartan/changeset.tmpl
+++ b/mercurial/templates/spartan/changeset.tmpl
@@ -15,7 +15,7 @@ 
 <a href="{url}help{sessionvars%urlparameter}">help</a>
 </div>
 
-<h2>changeset: {desc|strip|escape|firstline|nonempty}</h2>
+<h2>{pathdef%breadcrumb} / changeset: {desc|strip|escape|firstline|nonempty}</h2>
 
 <table id="changesetEntry">
 <tr>
diff --git a/mercurial/templates/spartan/fileannotate.tmpl b/mercurial/templates/spartan/fileannotate.tmpl
--- a/mercurial/templates/spartan/fileannotate.tmpl
+++ b/mercurial/templates/spartan/fileannotate.tmpl
@@ -17,7 +17,7 @@ 
 <a href="{url}help{sessionvars%urlparameter}">help</a>
 </div>
 
-<h2>Annotate {file|escape}</h2>
+<h2>{pathdef%breadcrumb} / annotate {file|escape}</h2>
 
 <table>
 <tr>
diff --git a/mercurial/templates/spartan/filediff.tmpl b/mercurial/templates/spartan/filediff.tmpl
--- a/mercurial/templates/spartan/filediff.tmpl
+++ b/mercurial/templates/spartan/filediff.tmpl
@@ -17,7 +17,7 @@ 
 <a href="{url}help{sessionvars%urlparameter}">help</a>
 </div>
 
-<h2>{file|escape}</h2>
+<h2>{pathdef%breadcrumb} / {file|escape}</h2>
 
 <table id="filediffEntry">
 <tr>
diff --git a/mercurial/templates/spartan/filelog.tmpl b/mercurial/templates/spartan/filelog.tmpl
--- a/mercurial/templates/spartan/filelog.tmpl
+++ b/mercurial/templates/spartan/filelog.tmpl
@@ -20,7 +20,7 @@ 
 <a type="application/atom+xml" href="{url}atom-log/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}">atom</a>
 </div>
 
-<h2>{file|escape} revision history</h2>
+<h2>{pathdef%breadcrumb} / {file|escape} revision history</h2>
 
 <p>navigate: <small class="navigate">{nav%filenav}</small></p>
 
diff --git a/mercurial/templates/spartan/filerevision.tmpl b/mercurial/templates/spartan/filerevision.tmpl
--- a/mercurial/templates/spartan/filerevision.tmpl
+++ b/mercurial/templates/spartan/filerevision.tmpl
@@ -17,7 +17,7 @@ 
 <a href="{url}help{sessionvars%urlparameter}">help</a>
 </div>
 
-<h2>{file|escape}</h2>
+<h2>{pathdef%breadcrumb} / {file|escape}</h2>
 
 <table>
 <tr>
diff --git a/mercurial/templates/spartan/graph.tmpl b/mercurial/templates/spartan/graph.tmpl
--- a/mercurial/templates/spartan/graph.tmpl
+++ b/mercurial/templates/spartan/graph.tmpl
@@ -17,7 +17,7 @@ 
 <a href="{url}help{sessionvars%urlparameter}">help</a>
 </div>
 
-<h2>graph</h2>
+<h2>{pathdef%breadcrumb} / graph</h2>
 
 <form action="{url}log">
 {sessionvars%hiddenformentry}
diff --git a/mercurial/templates/spartan/manifest.tmpl b/mercurial/templates/spartan/manifest.tmpl
--- a/mercurial/templates/spartan/manifest.tmpl
+++ b/mercurial/templates/spartan/manifest.tmpl
@@ -14,7 +14,7 @@ 
 <a href="{url}help{sessionvars%urlparameter}">help</a>
 </div>
 
-<h2>files for changeset {node|short}: {path|escape}</h2>
+<h2>{pathdef%breadcrumb} / files for changeset {node|short}: {path|escape}</h2>
 
 <table cellpadding="0" cellspacing="0">
 <tr class="parity{upparity}">
diff --git a/mercurial/templates/spartan/shortlog.tmpl b/mercurial/templates/spartan/shortlog.tmpl
--- a/mercurial/templates/spartan/shortlog.tmpl
+++ b/mercurial/templates/spartan/shortlog.tmpl
@@ -19,7 +19,7 @@ 
 <a type="application/rss+xml" href="{url}atom-log" title="Atom feed for {repo|escape}">atom</a>
 </div>
 
-<h2>shortlog for {repo|escape}</h2>
+<h2>{pathdef%breadcrumb} / shortlog</h2>
 
 <form action="{url}log">
 {sessionvars%hiddenformentry}
diff --git a/mercurial/templates/spartan/tags.tmpl b/mercurial/templates/spartan/tags.tmpl
--- a/mercurial/templates/spartan/tags.tmpl
+++ b/mercurial/templates/spartan/tags.tmpl
@@ -18,7 +18,7 @@ 
 <a type="application/atom+xml" href="{url}atom-tags">atom</a>
 </div>
 
-<h2>tags:</h2>
+<h2>{pathdef%breadcrumb} / tags</h2>
 
 <ul id="tagEntries">
 {entries%tagentry}