aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-07 12:42:38 -0400
committerJoey Hess <joey@kitenet.net>2010-05-07 12:42:38 -0400
commit3adb47ec4f7374128d18a88cff54269104fc21fe (patch)
treedd1ac2c19cece5de41a9b557d76b14ce40687a23
parentd9d910f6765de6ba07508ab56a5a0f93edb4c8ad (diff)
parent25033d91145d0f102c6f6889f04e80e31b218684 (diff)
downloadikiwiki-3adb47ec4f7374128d18a88cff54269104fc21fe.tar
ikiwiki-3adb47ec4f7374128d18a88cff54269104fc21fe.tar.gz
Merge branch 'master' into commentreorg
Conflicts: debian/changelog
-rw-r--r--IkiWiki/CGI.pm4
-rw-r--r--IkiWiki/Plugin/editdiff.pm2
-rw-r--r--IkiWiki/Plugin/goto.pm15
-rw-r--r--IkiWiki/Plugin/inline.pm7
-rw-r--r--IkiWiki/Plugin/remove.pm2
-rw-r--r--IkiWiki/Plugin/rename.pm2
-rw-r--r--IkiWiki/Plugin/search.pm11
-rw-r--r--IkiWiki/Plugin/skeleton.pm.example6
-rw-r--r--IkiWiki/Plugin/websetup.pm2
-rw-r--r--IkiWiki/Render.pm8
-rw-r--r--debian/changelog6
-rw-r--r--doc/bugs/comments_not_searchable.mdwn2
-rw-r--r--doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn2
-rw-r--r--doc/plugins/po/discussion.mdwn2
-rw-r--r--doc/plugins/write.mdwn10
-rw-r--r--doc/style.css219
-rw-r--r--doc/users/KarlMW/discussion.mdwn2
-rw-r--r--templates/editcomment.tmpl33
-rw-r--r--templates/editpage.tmpl37
19 files changed, 209 insertions, 163 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 07369ac10..49a505514 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -108,7 +108,7 @@ sub cgi_signin ($$) {
action => $config{cgiurl},
header => 0,
template => {type => 'div'},
- stylesheet => baseurl()."style.css",
+ stylesheet => 1,
);
my $buttons=["Login"];
@@ -187,7 +187,7 @@ sub cgi_prefs ($$) {
params => $q,
action => $config{cgiurl},
template => {type => 'div'},
- stylesheet => baseurl()."style.css",
+ stylesheet => 1,
fieldsets => [
[login => gettext("Login")],
[preferences => gettext("Preferences")],
diff --git a/IkiWiki/Plugin/editdiff.pm b/IkiWiki/Plugin/editdiff.pm
index d8f53a42e..015ce9c14 100644
--- a/IkiWiki/Plugin/editdiff.pm
+++ b/IkiWiki/Plugin/editdiff.pm
@@ -71,7 +71,7 @@ sub formbuilder_setup {
$content=~s/\r/\n/g;
my $diff = diff(srcfile($pagesources{$page}), $content);
- $form->tmpl_param("page_preview", $diff);
+ $form->tmpl_param("page_diff", $diff);
}
}
diff --git a/IkiWiki/Plugin/goto.pm b/IkiWiki/Plugin/goto.pm
index 03bd682b3..669211691 100644
--- a/IkiWiki/Plugin/goto.pm
+++ b/IkiWiki/Plugin/goto.pm
@@ -41,14 +41,15 @@ sub cgi_goto ($;$) {
IkiWiki::loadindex();
- # If the page is internal (like a comment), see if it has a
- # permalink. Comments do.
- if (IkiWiki::isinternal($page) &&
- defined $pagestate{$page}{meta}{permalink}) {
- IkiWiki::redirect($q, $pagestate{$page}{meta}{permalink});
+ my $link;
+ if (! IkiWiki::isinternal($page)) {
+ $link = bestlink("", $page);
+ }
+ elsif (defined $pagestate{$page}{meta}{permalink}) {
+ # Can only redirect to an internal page if it has a
+ # permalink.
+ IkiWiki::redirect($q, $pagestate{$page}{meta}{permalink});
}
-
- my $link = bestlink("", $page);
if (! length $link) {
IkiWiki::cgi_custom_failure(
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 933e30646..715a3d652 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -476,6 +476,13 @@ sub get_inline_content ($$) {
filter($page, $destpage,
readfile(srcfile($file))))));
$nested--;
+ if (isinternal($page)) {
+ # make inlined text of internal pages searchable
+ run_hooks(indexhtml => sub {
+ shift->(page => $page, destpage => $page,
+ content => $ret);
+ });
+ }
}
if ($cached_destpage ne $destpage) {
diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm
index 0fc180f69..a46294e78 100644
--- a/IkiWiki/Plugin/remove.pm
+++ b/IkiWiki/Plugin/remove.pm
@@ -103,7 +103,7 @@ sub confirmation_form ($$) {
javascript => 0,
params => $q,
action => $config{cgiurl},
- stylesheet => IkiWiki::baseurl()."style.css",
+ stylesheet => 1,
fields => [qw{do page}],
);
diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm
index 69e615ead..537e91317 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
@@ -126,7 +126,7 @@ sub rename_form ($$$) {
javascript => 0,
params => $q,
action => $config{cgiurl},
- stylesheet => IkiWiki::baseurl()."style.css",
+ stylesheet => 1,
fields => [qw{do page new_name attachment}],
);
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm
index 9e875c79c..cc26b7ac1 100644
--- a/IkiWiki/Plugin/search.pm
+++ b/IkiWiki/Plugin/search.pm
@@ -10,7 +10,7 @@ sub import {
hook(type => "getsetup", id => "search", call => \&getsetup);
hook(type => "checkconfig", id => "search", call => \&checkconfig);
hook(type => "pagetemplate", id => "search", call => \&pagetemplate);
- hook(type => "postscan", id => "search", call => \&index);
+ hook(type => "indexhtml", id => "search", call => \&indexhtml);
hook(type => "delete", id => "search", call => \&delete);
hook(type => "cgi", id => "search", call => \&cgi);
}
@@ -68,7 +68,7 @@ sub pagetemplate (@) {
my $scrubber;
my $stemmer;
-sub index (@) {
+sub indexhtml (@) {
my %params=@_;
setupfiles();
@@ -112,12 +112,17 @@ sub index (@) {
}
$sample=~s/\n/ /g;
+ my $url=urlto($params{destpage}, "");
+ if (defined $pagestate{$params{page}}{meta}{permalink}) {
+ $url=$pagestate{$params{page}}{meta}{permalink}
+ }
+
# data used by omega
# Decode html entities in it, since omega re-encodes them.
eval q{use HTML::Entities};
error $@ if $@;
$doc->set_data(
- "url=".urlto($params{page}, "")."\n".
+ "url=".$url."\n".
"sample=".decode_entities($sample)."\n".
"caption=".decode_entities($caption)."\n".
"modtime=$IkiWiki::pagemtime{$params{page}}\n".
diff --git a/IkiWiki/Plugin/skeleton.pm.example b/IkiWiki/Plugin/skeleton.pm.example
index a404e24af..34713c73b 100644
--- a/IkiWiki/Plugin/skeleton.pm.example
+++ b/IkiWiki/Plugin/skeleton.pm.example
@@ -20,7 +20,7 @@ sub import {
hook(type => "scan", id => "skeleton", call => \&scan);
hook(type => "htmlize", id => "skeleton", call => \&htmlize);
hook(type => "sanitize", id => "skeleton", call => \&sanitize);
- hook(type => "postscan", id => "skeleton", call => \&postscan);
+ hook(type => "indexhtml", id => "skeleton", call => \&indexhtml);
hook(type => "format", id => "skeleton", call => \&format);
hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
hook(type => "templatefile", id => "skeleton", call => \&templatefile);
@@ -118,10 +118,10 @@ sub sanitize (@) {
return $params{content};
}
-sub postscan (@) {
+sub indexhtml (@) {
my %params=@_;
- debug("skeleton plugin running as postscan");
+ debug("skeleton plugin running as indexhtml");
}
sub format (@) {
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm
index 4d2e611eb..9cb5eb13c 100644
--- a/IkiWiki/Plugin/websetup.pm
+++ b/IkiWiki/Plugin/websetup.pm
@@ -293,7 +293,7 @@ sub showform ($$) {
],
action => $config{cgiurl},
template => {type => 'div'},
- stylesheet => IkiWiki::baseurl()."style.css",
+ stylesheet => 1,
);
$form->field(name => "do", type => "hidden", value => "setup",
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index e5ba0079b..c9ba95363 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -62,8 +62,8 @@ sub genpage ($$) {
my $page=shift;
my $content=shift;
- run_hooks(postscan => sub {
- shift->(page => $page, content => $content);
+ run_hooks(indexhtml => sub {
+ shift->(page => $page, destpage => $page, content => $content);
});
my $templatefile;
@@ -800,8 +800,8 @@ sub refresh () {
render_backlinks($backlinkchanged);
remove_unrendered();
- if (@$del) {
- run_hooks(delete => sub { shift->(@$del) });
+ if (@$del || @$internal_del) {
+ run_hooks(delete => sub { shift->(@$del, @$internal_del) });
}
if (%rendered) {
run_hooks(change => sub { shift->(keys %rendered) });
diff --git a/debian/changelog b/debian/changelog
index 5b51a74f9..7f024a84b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,12 @@ ikiwiki (3.20100505) UNRELEASED; urgency=low
comments, which makes it easy to add a feed of them, or a counter
indicating how many there are.
* Belatedly added a `comment()` pagespec.
+ * Gave comment and page editing forms some CSS and accessability love.
+ * Renamed postscan hook to indexhtml, to reflect its changed position,
+ and typical use.
+ * inline: Call indexhtml when inlining internal pages, so their
+ text can be indexed for searching.
+ * Delete hooks are passed deleted internal pages.
-- Joey Hess <joeyh@debian.org> Wed, 05 May 2010 18:07:29 -0400
diff --git a/doc/bugs/comments_not_searchable.mdwn b/doc/bugs/comments_not_searchable.mdwn
index 72f7bf30f..6fda89bd2 100644
--- a/doc/bugs/comments_not_searchable.mdwn
+++ b/doc/bugs/comments_not_searchable.mdwn
@@ -15,3 +15,5 @@ However, the search postscan hook tells xapian the page url,
and uses `urlto($page)` to do it. And that won't work for
an internal page. Guess it could be modified to tell xapian the
permalink. --[[Joey]]
+
+> [[done]] --[[Joey]]
diff --git a/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn b/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn
index be14e5126..c6e3cd4fd 100644
--- a/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn
+++ b/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn
@@ -144,7 +144,7 @@ So, looking at your meta branch: --[[Joey]]
has no title, then A will display the link as "B". Now page B is modified
and a title is added. Nothing updates "A".
The added overhead of rebuilding every page that links to B when B is
- changed (as the `postscan` hook of the po plugin does) is IMHO a killer.
+ changed (as the `indexhtml` hook of the po plugin does) is IMHO a killer.
That could be hundreds or thousands of pages, making interactive editing
way slow. This is probably the main reason I had not attempted this whole
thing myself. IMHO this calls for some kind of intellegent dependency
diff --git a/doc/plugins/po/discussion.mdwn b/doc/plugins/po/discussion.mdwn
index ab822e76c..27683f1ea 100644
--- a/doc/plugins/po/discussion.mdwn
+++ b/doc/plugins/po/discussion.mdwn
@@ -513,7 +513,7 @@ finish it at some point in the first quarter of 2009. --[[intrigeri]]
>>>>
>>>>> Done. --[[intrigeri]]
>>>
-> * I'm very fearful of the `add_depends` in `postscan`.
+> * I'm very fearful of the `add_depends` in `indexhtml`.
> Does this make every page depend on every page that links
> to it? Won't this absurdly bloat the dependency pagespecs
> and slow everything down? And since nicepagetitle is given
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 3b1d770eb..193005565 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -39,7 +39,7 @@ built.
Now that it knows what pages it needs to build, ikiwiki runs two
compile passes. First, it runs `scan` hooks, which collect metadata about
the pages. Then it runs a page rendering pipeline, by calling in turn these
-hooks: `filter`, `preprocess`, `linkify`, `htmlize`, `postscan`,
+hooks: `filter`, `preprocess`, `linkify`, `htmlize`, `indexhtml`,
`pagetemplate`, `sanitize`, `format`.
After all necessary pages are built, it calls the `change` hook. Finally,
@@ -282,16 +282,16 @@ like `Makefile` that have no extension.
If `hook` is passed an optional "longname" parameter, this value is used
when prompting a user to choose a page type on the edit page form.
-### postscan
+### indexhtml
- hook(type => "postscan", id => "foo", call => \&postscan);
+ hook(type => "indexhtml", id => "foo", call => \&indexhtml);
This hook is called once the page has been converted to html (but before
the generated html is put in a template). The most common use is to
update search indexes. Added in ikiwiki 2.54.
-The function is passed named parameters "page" and "content". Its return
-value is ignored.
+The function is passed named parameters "page", "destpage", and "content".
+Its return value is ignored.
### pagetemplate
diff --git a/doc/style.css b/doc/style.css
index f2f558497..5f77037e4 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -4,6 +4,7 @@
* local.css and use it to override or change settings in this one.
*/
+/* html5 compat */
article,
header,
footer,
@@ -164,7 +165,6 @@ div.recentchanges {
width: 60%;
}
-/* Used for adding a blog page. */
#blogform {
padding: 10px 10px;
border: 1px solid #aaa;
@@ -189,53 +189,6 @@ div.recentchanges {
color: #C00;
}
-/* Used for invalid form fields. */
-.fb_invalid {
- color: red;
- background: white !important;
-}
-
-/* Used for required form fields. */
-.fb_required {
- font-weight: bold;
-}
-
-/* Orange feed button. */
-.feedbutton {
- background: #ff6600;
- color: white !important;
- border-left: 1px solid #cc9966;
- border-top: 1px solid #ccaa99;
- border-right: 1px solid #993300;
- border-bottom: 1px solid #331100;
- padding: 0px 0.5em 0px 0.5em;
- font-family: sans-serif;
- font-weight: bold;
- font-size: small;
- text-decoration: none;
- margin-top: 1em;
-}
-.feedbutton:hover {
- color: white !important;
- background: #ff9900;
-}
-
-/* Tag cloud. */
-.pagecloud {
- float: right;
- width: 30%;
- text-align: center;
- padding: 10px 10px;
- border: 1px solid #aaa;
- background: #eee;
- color: black !important;
-}
-.smallestPC { font-size: 70%; }
-.smallPC { font-size: 85%; }
-.normalPC { font-size: 100%; }
-.bigPC { font-size: 115%; }
-.biggestPC { font-size: 130%; }
-
.sidebar {
width: 30ex;
float: right;
@@ -248,32 +201,6 @@ div.recentchanges {
color: black !important;
}
-/* outlines */
-li.L1 {
- list-style: upper-roman;
-}
-li.L2 {
- list-style: decimal;
-}
-li.L3 {
- list-style: lower-alpha;
-}
-li.L4 {
- list-style: disc;
-}
-li.L5 {
- list-style: square;
-}
-li.L6 {
- list-style: circle;
-}
-li.L7 {
- list-style: lower-roman;
-}
-li.L8 {
- list-style: upper-alpha;
-}
-
hr.poll {
height: 10pt;
color: white !important;
@@ -287,6 +214,27 @@ div.poll {
border: 1px solid #aaa;
}
+span.color {
+ padding: 2px;
+}
+
+.comment-header,
+.microblog-header {
+ font-style: italic;
+ margin-top: .3em;
+}
+.comment .author,
+.microblog .author {
+ font-weight: bold;
+}
+.comment-subject {
+ font-weight: bold;
+}
+.comment {
+ border: 1px solid #aaa;
+ padding: 3px;
+}
+
div.progress {
margin-top: 1ex;
margin-bottom: 1ex;
@@ -303,23 +251,7 @@ div.progress-done {
padding: 1px;
}
-input#openid_url {
- background: url(wikiicons/openidlogin-bg.gif) no-repeat;
- background-color: #fff;
- background-position: 0 50%;
- color: #000;
- padding-left: 18px;
-}
-
-input#searchbox {
- background: url(wikiicons/search-bg.gif) no-repeat;
- background-color: #fff;
- background-position: 100% 50%;
- color: #000;
- padding-right: 16px;
-}
-
-/* Things to hide in printouts. */
+/* things to hide in printouts */
@media print {
.actions { display: none; }
.tags { display: none; }
@@ -329,7 +261,7 @@ input#searchbox {
#backlinks { display: none; }
}
-/* Provided for use by template plugin for floating info boxes. */
+/* infobox template */
.infobox {
float: right;
margin-left: 2ex;
@@ -341,7 +273,7 @@ input#searchbox {
color: black !important;
}
-/* Provided for use by template plugin for floating note boxes. */
+/* notebox template */
.notebox {
float: right;
margin-left: 2ex;
@@ -354,7 +286,7 @@ input#searchbox {
color: black !important;
}
-/* Used by the popup template and for backlinks hiding. */
+/* popup template and backlinks hiding */
.popup {
border-bottom: 1px dotted #366;
color: #366;
@@ -375,7 +307,7 @@ input#searchbox {
color: black;
}
-/* Formbuilder styling */
+/* form styling */
fieldset {
margin: 1ex 0;
border: 1px solid black;
@@ -397,29 +329,44 @@ legend {
background: #eee;
color: black !important;
}
-
-span.color {
- padding: 2px;
+label.block {
+ display: block;
}
-
-.comment-header,
-.microblog-header {
- font-style: italic;
- margin-top: .3em;
+label.inline {
+ display: inline;
}
-.comment .author,
-.microblog .author {
- font-weight: bold;
+ol.form {
+ list-style: none;
+ padding: 0;
}
-.comment-subject {
- font-weight: bold;
+li.form {
+ padding-bottom: 1em;
}
-.comment {
- border: 1px solid #aaa;
- padding: 3px;
+input#openid_url {
+ background: url(wikiicons/openidlogin-bg.gif) no-repeat;
+ background-color: #fff;
+ background-position: 0 50%;
+ color: #000;
+ padding-left: 18px;
+}
+input#searchbox {
+ background: url(wikiicons/search-bg.gif) no-repeat;
+ background-color: #fff;
+ background-position: 100% 50%;
+ color: #000;
+ padding-right: 16px;
+}
+/* invalid form fields */
+.fb_invalid {
+ color: red;
+ background: white !important;
+}
+/* required form fields */
+.fb_required {
+ font-weight: bold;
}
-/* Used by the highlight plugin. */
+/* highlight plugin */
pre.hl { color:#000000; background-color:#ffffff; }
.hl.num { color:#2928ff; }
.hl.esc { color:#ff00ff; }
@@ -436,7 +383,7 @@ pre.hl { color:#000000; background-color:#ffffff; }
.hl.kwc { color:#000000; font-weight:bold; }
.hl.kwd { color:#010181; }
-/* For the calendar plugin. */
+/* calendar plugin */
.month-calendar-day-this-day { background-color: #eee; }
.year-calendar-this-month { background-color: #eee; }
.month-calendar-arrow A:link,
@@ -447,3 +394,49 @@ pre.hl { color:#000000; background-color:#ffffff; }
font-weight: normal;
font-size: 150%;
}
+
+/* outlines */
+li.L1 { list-style: upper-roman; }
+li.L2 { list-style: decimal; }
+li.L3 { list-style: lower-alpha; }
+li.L4 { list-style: disc; }
+li.L5 { list-style: square; }
+li.L6 { list-style: circle; }
+li.L7 { list-style: lower-roman; }
+li.L8 { list-style: upper-alpha; }
+
+/* tag cloud */
+.pagecloud {
+ float: right;
+ width: 30%;
+ text-align: center;
+ padding: 10px 10px;
+ border: 1px solid #aaa;
+ background: #eee;
+ color: black !important;
+}
+.smallestPC { font-size: 70%; }
+.smallPC { font-size: 85%; }
+.normalPC { font-size: 100%; }
+.bigPC { font-size: 115%; }
+.biggestPC { font-size: 130%; }
+
+/* orange feed button */
+.feedbutton {
+ background: #ff6600;
+ color: white !important;
+ border-left: 1px solid #cc9966;
+ border-top: 1px solid #ccaa99;
+ border-right: 1px solid #993300;
+ border-bottom: 1px solid #331100;
+ padding: 0px 0.5em 0px 0.5em;
+ font-family: sans-serif;
+ font-weight: bold;
+ font-size: small;
+ text-decoration: none;
+ margin-top: 1em;
+}
+.feedbutton:hover {
+ color: white !important;
+ background: #ff9900;
+}
diff --git a/doc/users/KarlMW/discussion.mdwn b/doc/users/KarlMW/discussion.mdwn
index 9117abcab..4a111a3f9 100644
--- a/doc/users/KarlMW/discussion.mdwn
+++ b/doc/users/KarlMW/discussion.mdwn
@@ -23,3 +23,5 @@ things that need changing then I will probably need help/guidance.
>> I suspect that asciidoc can't really be made to play nice to the extent that I would want casual users/abusers to have it as a markup option on a live wiki - it's fine for a personal site where you can look at the output before putting it online, but I think it would be a hideously gaping integrity hole for anything more than that. However, for a personal site (as I am using it), it does seem to have its uses.
>> I'll keep an eye on the format_escape plugin, and assuming it is accepted into ikiwiki, will see if I can apply it to asciidoc. --[[KarlMW]]
+
+Is there any way to enable latexmath rendering? It semes that ikiwiki strips the necessary javascript and/or style sheet information from the HTML page generated by asciidoc. --Peter
diff --git a/templates/editcomment.tmpl b/templates/editcomment.tmpl
index 51ab10f2c..f3a8e7395 100644
--- a/templates/editcomment.tmpl
+++ b/templates/editcomment.tmpl
@@ -4,22 +4,37 @@
<TMPL_VAR FIELD-DO>
<TMPL_VAR FIELD-SID>
<TMPL_VAR FIELD-PAGE>
-<TMPL_UNLESS USERNAME>
-<TMPL_IF ALLOWAUTHOR>
-Name: <TMPL_VAR FIELD-AUTHOR> (optional, or
-<a href="<TMPL_VAR SIGNINURL>">signin</a>)<br />
-Website: <TMPL_VAR FIELD-URL> (optional)<br />
+<ol class="form">
+<TMPL_UNLESS NAME=USERNAME>
+<TMPL_IF NAME=ALLOWAUTHOR>
+<li>
+<label for="author" class="block">Name:</label>
+<TMPL_VAR NAME=FIELD-AUTHOR> (optional, or <a href="<TMPL_VAR SIGNINURL>">signin</a>)
+</li>
+<li>
+<label for="url" class="block">Website:</label>
+<TMPL_VAR NAME=FIELD-URL> (optional)
+</li>
<TMPL_ELSE>
-(You might want to <a href="<TMPL_VAR SIGNINURL>">Signin</a> first?)<br />
+<li>
+(You might want to <a href="<TMPL_VAR SIGNINURL>">Signin</a> first?)
+</li>
</TMPL_IF>
</TMPL_UNLESS>
-Subject: <TMPL_VAR FIELD-SUBJECT><br />
+<li>
+<label for="subject" class="block">Subject:</label>
+<TMPL_VAR FIELD-SUBJECT><br />
+</li>
+<li>
+<label for="editcontent" class="block">Comment:</label>
<TMPL_VAR FIELD-EDITCONTENT><br />
+</li>
+</ol>
<TMPL_VAR FORM-SUBMIT> <TMPL_VAR FIELD-TYPE> <TMPL_VAR HELPONFORMATTINGLINK><br />
-<TMPL_VAR FORM-END>
+<TMPL_VAR NAME="FORM-END">
<TMPL_VAR WMD_PREVIEW>
-<TMPL_IF PAGE_PREVIEW>
+<TMPL_IF NAME="PAGE_PREVIEW">
<hr />
<div class="header">
<span>Comment preview:</span>
diff --git a/templates/editpage.tmpl b/templates/editpage.tmpl
index 6d8a902a2..118ca4550 100644
--- a/templates/editpage.tmpl
+++ b/templates/editpage.tmpl
@@ -1,4 +1,3 @@
-<br />
<TMPL_VAR JAVASCRIPT>
<TMPL_VAR MESSAGE>
<TMPL_VAR FORM-START>
@@ -7,30 +6,37 @@
<TMPL_VAR FIELD-FROM>
<TMPL_VAR FIELD-RCSINFO>
<TMPL_VAR FIELD-NEWFILE>
-<TMPL_IF PAGE_SELECT>
-Page location: <TMPL_VAR FIELD-PAGE>
-Page type: <TMPL_VAR FIELD-TYPE>
+<ol class="form">
+<TMPL_IF NAME="PAGE_SELECT">
+<li>
+<label for="page" class="inline">Page location:</label><TMPL_VAR FIELD-PAGE>
+<label for="type" class="inline">Page type:</label><TMPL_VAR FIELD-TYPE>
+</li>
<TMPL_ELSE>
-<br />
<TMPL_VAR FIELD-PAGE>
<TMPL_VAR FIELD-TYPE>
</TMPL_IF>
+<li>
<TMPL_VAR FIELD-EDITCONTENT><br />
-<TMPL_IF CAN_COMMIT>
-Optional comment about this change:<br />
+</li>
+<TMPL_IF NAME="CAN_COMMIT">
+<li>
+<label for="comments" class="block">Optional comment about this change:</label>
<TMPL_VAR FIELD-COMMENTS><br />
+</li>
</TMPL_IF>
+</ol>
<TMPL_VAR FORM-SUBMIT>
<TMPL_VAR HELPONFORMATTINGLINK>
-<TMPL_IF FIELD-ATTACHMENT>
+<TMPL_IF NAME="FIELD-ATTACHMENT">
<a class="toggle" href="#attachments">Attachments</a>
<div class="<TMPL_VAR ATTACHMENTS-CLASS>" id="attachments">
<table>
<tr><td colspan="5"><TMPL_VAR FIELD-ATTACHMENT><TMPL_VAR FIELD-UPLOAD></td></tr>
-<TMPL_LOOP ATTACHMENT_LIST>
+<TMPL_LOOP NAME="ATTACHMENT_LIST">
<tr><td><TMPL_VAR FIELD-SELECT><TMPL_VAR LINK></td><td><TMPL_VAR SIZE></td><td><TMPL_VAR MTIME></td></tr>
</TMPL_LOOP>
-<TMPL_IF ATTACHMENT_LIST>
+<TMPL_IF NAME="ATTACHMENT_LIST">
<tr><td colspan="2"><TMPL_VAR FIELD-LINK><TMPL_VAR FIELD-RENAME><TMPL_VAR FIELD-REMOVE></td></tr>
</TMPL_IF>
</table>
@@ -39,7 +45,7 @@ Optional comment about this change:<br />
<TMPL_VAR FORM-END>
<TMPL_VAR WMD_PREVIEW>
-<TMPL_IF PAGE_PREVIEW>
+<TMPL_IF NAME="PAGE_PREVIEW">
<hr />
<div class="header">
<span>Page preview:</span>
@@ -48,3 +54,12 @@ Optional comment about this change:<br />
<TMPL_VAR PAGE_PREVIEW>
</div>
</TMPL_IF>
+<TMPL_IF NAME="PAGE_DIFF">
+<hr />
+<div class="header">
+<span>Diff:</span>
+</div>
+<div id="diff">
+<TMPL_VAR PAGE_DIFF>
+</div>
+</TMPL_IF>