}
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##*/}" \