From 7bcfb806b0af91433d46bc7bfd4f3fece6db2719 Mon Sep 17 00:00:00 2001
From: Thomas Keller
Date: Thu, 27 Jan 2011 14:12:42 +0100
Subject: [PATCH] Create valid HTML for the branch and tag list headings (no
block elements inside headings) and also use a lower heading, h3 and not h1
for the subheadings. Reduce the amount of code duplication with include's for
each VCS.
---
.../idf/source/git/branch_tag_list.html | 39 +++++++++++++++++++
.../templates/idf/source/git/changelog.html | 37 +-----------------
src/IDF/templates/idf/source/git/commit.html | 36 +----------------
src/IDF/templates/idf/source/git/file.html | 36 +----------------
src/IDF/templates/idf/source/git/tree.html | 36 +----------------
.../idf/source/mercurial/branch_tag_list.html | 39 +++++++++++++++++++
.../idf/source/mercurial/changelog.html | 37 +-----------------
.../idf/source/mercurial/commit.html | 36 +----------------
.../templates/idf/source/mercurial/file.html | 35 +----------------
.../templates/idf/source/mercurial/tree.html | 36 +----------------
.../idf/source/mtn/branch_tag_list.html | 39 +++++++++++++++++++
.../templates/idf/source/mtn/changelog.html | 37 +-----------------
src/IDF/templates/idf/source/mtn/commit.html | 36 +----------------
src/IDF/templates/idf/source/mtn/file.html | 36 +----------------
src/IDF/templates/idf/source/mtn/tree.html | 36 +----------------
www/media/idf/css/style.css | 14 +++----
16 files changed, 139 insertions(+), 426 deletions(-)
create mode 100644 src/IDF/templates/idf/source/git/branch_tag_list.html
create mode 100644 src/IDF/templates/idf/source/mercurial/branch_tag_list.html
create mode 100644 src/IDF/templates/idf/source/mtn/branch_tag_list.html
diff --git a/src/IDF/templates/idf/source/git/branch_tag_list.html b/src/IDF/templates/idf/source/git/branch_tag_list.html
new file mode 100644
index 0000000..b9c4026
--- /dev/null
+++ b/src/IDF/templates/idf/source/git/branch_tag_list.html
@@ -0,0 +1,39 @@
+{if !$view_url}
+{assign $view_url = 'IDF_Views_Source::treeBase'}
+{/if}
+
+
+
+ {trans 'Branches'}
+
+
+
+
+
+
+{if $tags}
+
+ {trans 'Tags'}
+
+
+
+
+
+
+{/if}
+
+
diff --git a/src/IDF/templates/idf/source/git/changelog.html b/src/IDF/templates/idf/source/git/changelog.html
index a0373cd..a5a82bd 100644
--- a/src/IDF/templates/idf/source/git/changelog.html
+++ b/src/IDF/templates/idf/source/git/changelog.html
@@ -1,38 +1,5 @@
{extends "idf/source/changelog.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{assign $view_url = 'IDF_Views_Source::changeLog'}
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/git/commit.html b/src/IDF/templates/idf/source/git/commit.html
index 5e5850e..8421adf 100644
--- a/src/IDF/templates/idf/source/git/commit.html
+++ b/src/IDF/templates/idf/source/git/commit.html
@@ -1,39 +1,5 @@
{extends "idf/source/commit.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/git/file.html b/src/IDF/templates/idf/source/git/file.html
index c430faf..01691ad 100644
--- a/src/IDF/templates/idf/source/git/file.html
+++ b/src/IDF/templates/idf/source/git/file.html
@@ -22,41 +22,7 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
{block javascript}
diff --git a/src/IDF/templates/idf/source/git/tree.html b/src/IDF/templates/idf/source/git/tree.html
index 6f48023..e349376 100644
--- a/src/IDF/templates/idf/source/git/tree.html
+++ b/src/IDF/templates/idf/source/git/tree.html
@@ -52,39 +52,5 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mercurial/branch_tag_list.html b/src/IDF/templates/idf/source/mercurial/branch_tag_list.html
new file mode 100644
index 0000000..98b3312
--- /dev/null
+++ b/src/IDF/templates/idf/source/mercurial/branch_tag_list.html
@@ -0,0 +1,39 @@
+{if !$view_url}
+{assign $view_url = 'IDF_Views_Source::treeBase'}
+{/if}
+
+
+
+ {trans 'Branches'}
+
+
+
+
+
+
+{foreach $branches as $branch => $path}
+{aurl 'url', $view_url, array($project.shortname, $branch)}
+-
+ {$branch}
+
+{/foreach}
+
+{if $tags}
+
+ {trans 'Tags'}
+
+
+
+
+
+
+{foreach $tags as $tag => $path}
+{aurl 'url', $view_url, array($project.shortname, $tag)}
+-
+ {$tag}
+
+{/foreach}
+
+{/if}
+
+
diff --git a/src/IDF/templates/idf/source/mercurial/changelog.html b/src/IDF/templates/idf/source/mercurial/changelog.html
index fa648db..8fb2ac3 100644
--- a/src/IDF/templates/idf/source/mercurial/changelog.html
+++ b/src/IDF/templates/idf/source/mercurial/changelog.html
@@ -1,39 +1,6 @@
{extends "idf/source/changelog.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $branch)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $tag => $path}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $tag)}
--
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{assign $view_url = 'IDF_Views_Source::changeLog'}
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mercurial/commit.html b/src/IDF/templates/idf/source/mercurial/commit.html
index 5e5850e..707cb23 100644
--- a/src/IDF/templates/idf/source/mercurial/commit.html
+++ b/src/IDF/templates/idf/source/mercurial/commit.html
@@ -1,39 +1,5 @@
{extends "idf/source/commit.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mercurial/file.html b/src/IDF/templates/idf/source/mercurial/file.html
index eae2050..25d4572 100644
--- a/src/IDF/templates/idf/source/mercurial/file.html
+++ b/src/IDF/templates/idf/source/mercurial/file.html
@@ -23,40 +23,7 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $tag => $path}
-{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, 'HEAD', $path)}
--
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
{block javascript}
diff --git a/src/IDF/templates/idf/source/mercurial/tree.html b/src/IDF/templates/idf/source/mercurial/tree.html
index d2d9e27..4df5a30 100644
--- a/src/IDF/templates/idf/source/mercurial/tree.html
+++ b/src/IDF/templates/idf/source/mercurial/tree.html
@@ -47,40 +47,6 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $tag => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)}
--
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/branch_tag_list.html b/src/IDF/templates/idf/source/mtn/branch_tag_list.html
new file mode 100644
index 0000000..c0a772f
--- /dev/null
+++ b/src/IDF/templates/idf/source/mtn/branch_tag_list.html
@@ -0,0 +1,39 @@
+{if !$view_url}
+{assign $view_url = 'IDF_Views_Source::treeBase'}
+{/if}
+
+
+
+ {trans 'Branches'}
+
+
+
+
+
+
+{foreach $branches as $selector => $branch}
+{aurl 'url', $view_url, array($project.shortname, $selector)}
+-
+ {$branch}
+
+{/foreach}
+
+{if $tags}
+
+ {trans 'Tags'}
+
+
+
+
+
+
+{foreach $tags as $selector => $tag}
+{aurl 'url', $view_url, array($project.shortname, $selector)}
+-
+ {$tag}
+
+{/foreach}
+
+{/if}
+
+
diff --git a/src/IDF/templates/idf/source/mtn/changelog.html b/src/IDF/templates/idf/source/mtn/changelog.html
index abaf35f..cb124a6 100644
--- a/src/IDF/templates/idf/source/mtn/changelog.html
+++ b/src/IDF/templates/idf/source/mtn/changelog.html
@@ -1,38 +1,5 @@
{extends "idf/source/changelog.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $selector)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $selector)}
--
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{assign $view_url = 'IDF_Views_Source::changeLog'}
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/commit.html b/src/IDF/templates/idf/source/mtn/commit.html
index ff3ec7a..bec83e2 100644
--- a/src/IDF/templates/idf/source/mtn/commit.html
+++ b/src/IDF/templates/idf/source/mtn/commit.html
@@ -1,38 +1,4 @@
{extends "idf/source/commit.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
--
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/file.html b/src/IDF/templates/idf/source/mtn/file.html
index a7c0d75..2901c60 100644
--- a/src/IDF/templates/idf/source/mtn/file.html
+++ b/src/IDF/templates/idf/source/mtn/file.html
@@ -25,40 +25,6 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
--
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/tree.html b/src/IDF/templates/idf/source/mtn/tree.html
index d310aeb..5ca9db5 100644
--- a/src/IDF/templates/idf/source/mtn/tree.html
+++ b/src/IDF/templates/idf/source/mtn/tree.html
@@ -53,40 +53,6 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
--
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
--
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css
index c515446..1e6cafe 100644
--- a/www/media/idf/css/style.css
+++ b/www/media/idf/css/style.css
@@ -863,7 +863,7 @@ ol > li {
*/
.context {}
-.context h1 {
+.context h3 {
font-size: 13px;
font-weight: bold;
margin: 10px 0 5px;
@@ -918,7 +918,7 @@ ol > li {
display: none;
}
-.context > .expander div.input-with-delete {
+.context > .expander span.input-with-delete {
padding: 1px;
border: 1px dotted #474747;
display: none;
@@ -927,11 +927,11 @@ ol > li {
margin-top: -3px;
}
-.context > .expander div.input-with-delete * {
+.context > .expander span.input-with-delete * {
vertical-align: middle;
}
-.context > .expander div.input-with-delete span {
+.context > .expander span.input-with-delete span {
display: inline-block;
width: 13px;
height: 12px;
@@ -939,7 +939,7 @@ ol > li {
cursor: pointer;
}
-.context > .expander div.input-with-delete input.filter-list {
+.context > .expander span.input-with-delete input.filter-list {
font-size: 11px;
font-weight: normal;
color: #333;
@@ -948,8 +948,8 @@ ol > li {
height: 11px;
}
-.context > .expander:hover div.input-with-delete.activated,
-.context > .expander.activated div.input-with-delete.activated {
+.context > .expander:hover span.input-with-delete.activated,
+.context > .expander.activated span.input-with-delete.activated {
display: block;
}