Update of /cvsroot/phpwiki/phpwiki/themes/smaller/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2696/smaller/templates Modified Files: actionbar.tmpl Log Message: simplify actionbar, add one-click Revert Index: actionbar.tmpl =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/themes/smaller/templates/actionbar.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -2 -b -p -d -r1.5 -r1.6 --- actionbar.tmpl 8 Apr 2005 05:28:54 -0000 1.5 +++ actionbar.tmpl 23 Apr 2005 11:43:44 -0000 1.6 @@ -1,9 +1,6 @@ <?php // -*-php-*- rcs_id('$Id$'); -if (!$page->get('locked') || $user->isAdmin()) - $EditB = Button("edit", - $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")); -else - $EditB = Button("viewsource", _("View Source")); +// Only [Info] button when not signed in. +// The rest behind Info ?> <?php /* I would like not to have to use these tables, and managed to @@ -17,6 +14,10 @@ else <td> <div id="actionbuttons"> - <? if ( $user->isSignedIn()) { ?> - <?= $EditB ?> + <?php if ( $user->isSignedIn()) { ?> + <?php if ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?> + <?= Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?> + <?php } else { ?> + <?= Button("viewsource", _("View Source")) ?> + <?php } ?> <?php if ($user->isAdmin() or mayAccessPage('change', $page->getName())) { ?> <?=$SEP?><?= Button($page->get('locked') ? 'unlock' : 'lock') ?> @@ -26,4 +27,5 @@ else <?php }} ?> <?php if ($user->isAdmin() or mayAccessPage('remove', $page->getName())) { ?> + <?=$SEP?><?= Button('revert',_("Revert"), $revision->isCurrent() ? $page->GetRevisionBefore() : $revision) ?> <?=$SEP?><?= Button('remove') ?> <?php } ?> @@ -36,10 +38,4 @@ else <?=$SEP?><?= Button("diff") ?> <?=$SEP?><?= Button(_("PageDump")) ?> -<?php - $PurgeCache = Button(array('nocache' => 'purge'), - _("PurgeHtmlCache"), $page->getName()); - $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); -?> - <?=$SEP?><?= $PurgeCache ?> <!-- End debugging buttons --> <?php } ?>