theme_error 403
else
"$_EXEC/macros/revisions" --list --diff "${page}" \
- | theme_revisions -
+ | theme_revisions - "$(_ Revisions): ${PAGE_TITLE:-"${page##*/}"}"
fi
return 0
;;
cd "${_DATA}/pages${page}" || cd "${_DATA}/pages/"
git -C "${_DATA}" show "${rev}:pages${PATH_INFO}#page.md" \
| { printf '<article class="revision">'; md; printf '</article>'; } \
- | theme_page - "${page##*/}"
+ | theme_page - "${PAGE_TITLE:-"${page##*/}"} (${rev})"
)
fi
return 0
else case "${PATH_INFO}" in
*/\[move\])
location="${page%/}" location="${location%/*}/"
- theme_page - <<-EOF
+ theme_page - "$(_ Move): ${PAGE_TITLE}"<<-EOF
<form method=POST id=movepage>
<input type=hidden name=session_id value="$SESSION_KEY">
<datalist id="locations">
;;
*/\[rename\])
name="${page%/}" name="${name##*/}"
- theme_page - <<-EOF
+ theme_page - "$(_ Rename): ${PAGE_TITLE}"<<-EOF
<form method=POST id=renamepage>
<input type=hidden name=session_id value="$SESSION_KEY">
$(l10n_renamepage)
return 0
;;
*/\[delete\])
- theme_page - <<-EOF
+ theme_page - "$(_ Delete): ${PAGE_TITLE}"<<-EOF
<form method=POST id=deletepage>
<input type=hidden name=session_id value="$SESSION_KEY">
$(l10n_deletepage)
}
theme_editor(){
- local page="$1" template="$2" title file att
- title="$(HTML "${PAGE_TITLE:-"${page}"}")"
+ local page="$1" template="$2" file att
[ "$template" ] && acl_read "$template" || template="$page"
- theme_page - "Editor: $title" <<-EOF
+ theme_page - "$(_ Editor): ${PAGE_TITLE:-"${page}"}" <<-EOF
<input checked type=radio class=tab name=edithelp value=edtr id=editor><label for=editor>$(_ Editor)</label>
<input type=radio class=tab name=edithelp value=help id=syntax><label for=syntax>$(_ Syntax)</label>
<input type=radio class=tab name=edithelp value=att id=attach><label for=attach>$(_ Attachments)</label>
local words="$*"
# STDIN: read result pages line by line
- theme_page - <<-EOF
+ theme_page - "$(_ Search results): ${words}" <<-EOF
<article>
<h1>$([ "$words" ] && _ "Search results" || _ "Search" )</h1>
<form class="search" method="GET">
}
theme_attachments(){
- local page="$1" title
- title="${page%/}"; title="${title##*/}"
+ local page="$1"
if acl_write "$page"; then
- theme_page - "$(_ Attachments): $title" <<-EOF
+ theme_page - "$(_ Attachments): ${PAGE_TITLE:-"${page}"}" <<-EOF
<form class=upload method=POST enctype="multipart/form-data">
<h2>$(_ Upload)</h2>
<input type=hidden name=session_id value="$SESSION_ID">
</form>
EOF
else
- theme_page - "$(_ Attachments): $title" <<-EOF
+ theme_page - "$(_ Attachments): ${PAGE_TITLE:-"${page}"}" <<-EOF
<ul class="attachment list">
$(for file in "$_EXEC/pages/$page/#attachments"/* "$_DATA/pages/$page/#attachments"/*; do
[ "$file" = "$_EXEC/pages/$page/#attachments/${file##*/}" \