From 0060c599fa9b69aa5a604494794566dc4fa522b1 Mon Sep 17 00:00:00 2001 From: rurban Date: Tue, 2 Jan 2007 13:29:05 +0000 Subject: [PATCH] simplify by using defaults git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@5320 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- themes/shamino_com/templates/info.tmpl | 213 +------------------------ 1 file changed, 2 insertions(+), 211 deletions(-) diff --git a/themes/shamino_com/templates/info.tmpl b/themes/shamino_com/templates/info.tmpl index 85ed44ff4..f16dcb360 100644 --- a/themes/shamino_com/templates/info.tmpl +++ b/themes/shamino_com/templates/info.tmpl @@ -1,211 +1,2 @@ - - -formatDateTime($revision->get('mtime')); - -$author = $revision->get('author'); -global $WikiNameRegexp; -$dbi = $request->getDbh(); -$author = $revision->get('author'); -$authorLink = $author; -if (preg_match("/^$WikiNameRegexp\$/", $author) && $dbi->isWikiPage($author)) - $authorLink = WikiLink($author); - -$authorId = $revision->get('author_id'); -$version = $revision->getVersion(); -$hits = $page->get('hits'); - -$is_minor_edit = $revision->get('is_minor_edit') ? _("minor edit") : false; -if ($minor_flag = $is_minor_edit) { - $minor_flag = HTML(" ", - HTML::span(array('class' => 'pageinfo-minoredit'), - "(" . _("minor edit") . ")")); -} - -/* better way to do this? */ -$bytes = strlen($revision->_data['%content']); -if ($bytes < 1024 ) - $size = fmt("%s bytes", $bytes); -else { - $kb = round($bytes / 1024, 1); - $size = fmt("%s Kb (%s bytes)", $kb, $bytes); -} -// Count words -preg_match_all('/\\w+\\W*/', $revision->_data['%content'], $whitespacematches); -if (1 == $c = count_all($whitespacematches)) - $wordcount = fmt("1 word"); -else - $wordcount = fmt("%s words", $c); - - -$markupVersion = ($markupVersion = $revision->get('markup')) - ? fmt("Version %s", $markupVersion) - : _("Original (1.2 or 1.0)"); - -$summary = HTML::textarea(array('name' => 'summary', - 'class' => 'summary', - 'rows' => 3, - 'cols' => $request->getPref('editWidth')/2, - 'readonly' => 'readonly', - 'wrap' => 'virtual'), /* for Netscape 4 */ - $revision->get('summary')); - -if ($is_current = $revision->isCurrent()) { - - $LOCKED_CB = HTML::input(array('type' => 'checkbox', - 'name' => 'edit[locked]', - 'disabled' => !$user->isadmin(), - 'checked' => $page->get('locked'))); - - // Not sure if I want to keep this... --Carsten - if ($user->isadmin()) { - $lockunlock = $page->get('locked') ? 'unlock' : 'lock'; - $clickcheckbUrl = WikiURL($revision, array('action' => $lockunlock)); - $clickcheckb = "location.href='$clickcheckbUrl'"; - - $LOCKED_CB->setAttr('onclick', $clickcheckb); - } - - $label['date'] = _("Last Modified").':'; - $label['author'] = _("Last Author").':'; - $label['summary'] = _("Last Summary").':'; - -} else { - $label['date'] = _("Saved on:"); - $label['author'] = _("Author").':'; - $label['summary'] = _("Summary").':'; -} - -$tableSummary = fmt("Statistics about %s.", $page->getName()); -$Sep = $WikiTheme->getButtonSeparator(); - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -getName()) { - $pagetype []= sprintf('%s %s', WIKI_NAME, _("home page")); -} -if (0 && $page->isUserPage($include_empty=true)) { - $pagetype []= _("User page"); -} -if (@$request->isActionPage($page->getName())) { - $pagetype []= _("Action page"); -} -if ($page->get('pagetype') == 'wikiblog') { - $pagetype []= _("Blog page"); -} -if ($page->getName() == _("InterWikiMap")) { - $pagetype []= _("InterWikiMap"); -} -if (0 and isSubPage($page->getName())) { - $pagetype []= _("Subpage"); -} ?> - - - - - - - -
formatDateTime($revision->get('_supplanted')) ?>
- - () -
,
-
- isCurrent() ? _("Edit") : _("Edit Old Revision")) ?> - - - - - - 'diff','previous' => 'minor'),_("Diff previous Revision"),$page->getName()) ?> - 'diff','previous' => 'author'),_("Diff previous Author"),$page->getName()) ?> -isAdmin()) { ?> - - - 'purge'), - _("PurgeHtmlCache"), $page->getName()); - $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); -?> - - - -
- - nesting. (Was generating invalid HTML.) -// -// Revision 1.12 2003/01/11 22:54:28 carstenklapp -// Added Page type field displayed for special pages. -// -?> \ No newline at end of file + + -- 2.45.0