]> git.plutz.net Git - shellwiki/blobdiff - themes/default.sh
bugfix editor help: display of original language page
[shellwiki] / themes / default.sh
index bb85450e05f4b3d2651932d4a705e8c230894f5a..6c761a747aba50f42ae76a8d7e68caaafe0d650b 100755 (executable)
@@ -77,6 +77,10 @@ theme_editor(){
        <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>
+       $([ "$LANGUAGE_DEFAULT" -a "$LANGUAGE_DEFAULT" != "$LANGUAGE" ] && printf '
+       <input         type=radio class=tab name=edithelp value=att  id=transl><label for=transl>%s</label>
+       ' "$LANGUAGE_DEFAULT"
+       )
        <form class="tab editor" method=POST action="$(HTML "${_BASE}${page%/}/[edit]")">
          <input type=hidden name=session_key value="${SESSION_KEY}"/>
          <textarea name=pagetext>$({ wiki_text "$page" \
@@ -104,6 +108,9 @@ theme_editor(){
          esac
        done)
        </div>
+       $(if [ "$LANGUAGE_DEFAULT" -a "$LANGUAGE_DEFAULT" != "$LANGUAGE" ]; then
+         printf '<div class="tab transl">%s</div>' "$(LANGUAGE='' wiki_text "${page%/:$LANGUAGE/}" |HTML)"
+       fi)
        EOF
 }