From: <var...@us...> - 2022-01-05 17:55:51
|
Revision: 10835 http://sourceforge.net/p/phpwiki/code/10835 Author: vargenau Date: 2022-01-05 17:55:47 +0000 (Wed, 05 Jan 2022) Log Message: ----------- templates: move banners for old revision and locked pages from browse.tmpl and viewsource.tmpl to body.tmpl Modified Paths: -------------- trunk/themes/Crao/templates/body.tmpl trunk/themes/Crao/templates/browse.tmpl trunk/themes/MonoBook/templates/body.tmpl trunk/themes/MonoBook/templates/browse.tmpl trunk/themes/MonoBook/templates/viewsource.tmpl trunk/themes/Portland/templates/body.tmpl trunk/themes/Portland/templates/browse.tmpl trunk/themes/Portland/templates/viewsource.tmpl trunk/themes/Sidebar/templates/body.tmpl trunk/themes/Wordpress/templates/body.tmpl trunk/themes/Wordpress/templates/browse.tmpl trunk/themes/Wordpress/templates/viewsource.tmpl trunk/themes/blog/templates/body.tmpl trunk/themes/default/templates/body.tmpl trunk/themes/default/templates/browse.tmpl trunk/themes/default/templates/viewsource.tmpl trunk/themes/wikilens/templates/body.tmpl Modified: trunk/themes/Crao/templates/body.tmpl =================================================================== --- trunk/themes/Crao/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Crao/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -12,6 +12,25 @@ <h1><?php echo $HEADER ?></h1> <?php } ?> <main role="main"> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> <?php echo $CONTENT ?> </main> <?php echo Template('bottom') ?> Modified: trunk/themes/Crao/templates/browse.tmpl =================================================================== --- trunk/themes/Crao/templates/browse.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Crao/templates/browse.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,17 +1,4 @@ -<?php -$action = $request->getArg('action'); -?> -<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?> - <p class="warning_msg"><?php echo _("Note:") ?> - <?php echo _("You are viewing an old revision of this page.") ?> - <?php echo Button('browse', _("View the current version."), $page) ?> - </p> -<?php } ?> -<?php if (!empty($redirected)) { ?> - <p><?php echo $redirected ?></p> -<?php } ?> <?php echo $CONTENT?> - <div id="revision"> <p class="editdate"><?php echo $WikiTheme->getLastModifiedMessage($revision) ?></p> <?php @@ -19,5 +6,4 @@ if (!$HIDE_TOOLBARS) { ?> </div> - <?php } ?> Modified: trunk/themes/MonoBook/templates/body.tmpl =================================================================== --- trunk/themes/MonoBook/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/MonoBook/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -6,6 +6,25 @@ <?php echo Template('top') ?> </header> <main role="main"> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> <div id="bodyContent"> <?php echo $CONTENT ?> <div class="clear-floats"></div> Modified: trunk/themes/MonoBook/templates/browse.tmpl =================================================================== --- trunk/themes/MonoBook/templates/browse.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/MonoBook/templates/browse.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,13 +1 @@ -<?php -$action = $request->getArg('action'); -?> -<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?> - <p class="warning_msg"><?php echo _("Note:") ?> - <?php echo _("You are viewing an old revision of this page.") ?> - <?php echo Button('browse', _("View the current version."), $page) ?> - </p> -<?php } ?> -<?php if (!empty($redirected)) { ?> - <p><?php echo $redirected ?></p> -<?php } ?> <?php echo $CONTENT?> Modified: trunk/themes/MonoBook/templates/viewsource.tmpl =================================================================== --- trunk/themes/MonoBook/templates/viewsource.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/MonoBook/templates/viewsource.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,14 +1,3 @@ -<?php -if ($page->get('locked') && !$user->isAdmin()) { ?> - <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> - <?php echo _("This page has been locked and cannot be edited.") ?> - </p> -<?php } ?> -<?php if ($revision and !$revision->isCurrent()) { ?> - <p class="warning_msg"><?php echo _("You are viewing an old revision of this page.")?> - <?php echo Button('viewsource', _("View the current version."), $page) ?> - </p> -<?php } ?> <br class="clear-floats" /> <textarea class="wikiedit" name="content" Modified: trunk/themes/Portland/templates/body.tmpl =================================================================== --- trunk/themes/Portland/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Portland/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -7,6 +7,25 @@ class="bottom" /></a> <?php echo $HEADER ?></h1> </header> <main role="main"> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> <?php echo $CONTENT ?> </main> <?php echo Template('navbar') ?> Modified: trunk/themes/Portland/templates/browse.tmpl =================================================================== --- trunk/themes/Portland/templates/browse.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Portland/templates/browse.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,18 +1,3 @@ -<?php -$action = $request->getArg('action'); -?> -<br class="clear-floats" /> -<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?> - <p class="warning_msg"><?php echo _("Note:") ?> - <?php echo _("You are viewing an old revision of this page.") ?> - <?php echo Button('browse', _("View the current version."), $page) ?> - </p> - <hr class="ignore" /> -<?php } ?> -<?php if (!empty($redirected)) { ?> - <p><?php echo $redirected ?></p> -<?php } ?> <?php echo $CONTENT?> <hr /> <?php echo Template('actionbar') ?> -<?php // The bottom navigation/search bar ?> Modified: trunk/themes/Portland/templates/viewsource.tmpl =================================================================== --- trunk/themes/Portland/templates/viewsource.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Portland/templates/viewsource.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,14 +1,3 @@ -<?php -if ($page->get('locked') && !$user->isAdmin()) { ?> - <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> - <?php echo _("This page has been locked and cannot be edited.") ?> - </p> -<?php } ?> -<?php if ($revision and !$revision->isCurrent()) { ?> - <p class="warning_msg"><?php echo _("You are viewing an old revision of this page.")?> - <?php echo Button('viewsource', _("View the current version."), $page) ?> - </p> -<?php } ?> <textarea class="wikiedit" name="content" rows="<?php echo $request->getPref('editHeight') ?>" Modified: trunk/themes/Sidebar/templates/body.tmpl =================================================================== --- trunk/themes/Sidebar/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Sidebar/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -4,9 +4,28 @@ <div id="content"> <main role="main"> <?php echo Template('top') ?> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> <div id="bodyContent"> - <?php echo $CONTENT ?> - <div class="clear-floats"></div> + <?php echo $CONTENT ?> + <div class="clear-floats"></div> </div> </main> </div> Modified: trunk/themes/Wordpress/templates/body.tmpl =================================================================== --- trunk/themes/Wordpress/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Wordpress/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -3,6 +3,25 @@ <h1 id="header"><?php echo $HEADER ?></h1> </header> <main role="main"> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> <?php echo $CONTENT ?> </main> <?php echo Template('navbar') ?> Modified: trunk/themes/Wordpress/templates/browse.tmpl =================================================================== --- trunk/themes/Wordpress/templates/browse.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Wordpress/templates/browse.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,18 +1,5 @@ -<?php -$action = $request->getArg('action'); -?> <br class="clear-floats" /> -<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?> - <p class="warning_msg"><?php echo _("Note:") ?> - <?php echo _("You are viewing an old revision of this page.") ?> - <?php echo Button('browse', _("View the current version."), $page) ?> - </p> - <hr class="ignore" /> -<?php } ?> -<?php if (!empty($redirected)) { ?> - <p><?php echo $redirected ?></p> -<?php } ?> +<hr class="ignore" /> <?php echo $CONTENT?> <hr /> <?php echo Template('actionbar') ?> -<?php // The bottom navigation/search bar ?> Modified: trunk/themes/Wordpress/templates/viewsource.tmpl =================================================================== --- trunk/themes/Wordpress/templates/viewsource.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/Wordpress/templates/viewsource.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,16 +1,4 @@ <div class="wikitext"> -<?php -if (empty($revision)) $revision = $page->getCurrentRevision(false); -if ($page->get('locked') && !$user->isAdmin()) { ?> - <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> - <?php echo _("This page has been locked and cannot be edited.") ?> - </p> -<?php } ?> -<?php if ($revision and !$revision->isCurrent()) { ?> - <p class="warning_msg"><?php echo _("You are viewing an old revision of this page.")?> - <?php echo Button('viewsource', _("View the current version."), $page) ?> - </p> -<?php } ?> <textarea class="wikiedit" name="content" rows="<?php echo $request->getPref('editHeight') ?>" Modified: trunk/themes/blog/templates/body.tmpl =================================================================== --- trunk/themes/blog/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/blog/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -4,23 +4,25 @@ <div id="pagetitle"> <h1 id="pagetitleText"><?php echo $HEADER ?></h1></div> <main role="main"> -<?php -$action = $request->getArg('action'); -if (empty($revision)) $revision = $page->getCurrentRevision(false); -if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> - <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> - <?php echo _("This page has been locked and cannot be edited.") ?> - </p> -<?php } ?> -<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?> - <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> - <?php echo _("You are viewing an old revision of this page.")?> - <?php echo Button('browse', _("View the current version."), $page)?> - </p> -<?php } ?> -<?php if (!empty($redirected)) { ?> - <p><?php echo $redirected ?></p> -<?php } ?> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> <div id="bodyContent"> <?php echo $CONTENT ?> </div> Modified: trunk/themes/default/templates/body.tmpl =================================================================== --- trunk/themes/default/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/default/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -5,6 +5,25 @@ </div> </header> <main role="main"> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> <div id="content"> <?php echo $CONTENT ?> </div> Modified: trunk/themes/default/templates/browse.tmpl =================================================================== --- trunk/themes/default/templates/browse.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/default/templates/browse.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,16 +1,4 @@ -<?php -$action = $request->getArg('action'); -?> -<?php if ($revision and !$revision->isCurrent() and ($action!='revert')) { ?> - <p class="warning_msg"><?php echo _("Note:") ?> - <?php echo _("You are viewing an old revision of this page.") ?> - <?php echo Button('browse', _("View the current version."), $page) ?> - </p> -<?php } ?> -<?php if (!empty($redirected)) { ?> - <p><?php echo $redirected ?></p> -<?php } ?> <?php echo $CONTENT?> -<div id="footer"><?php // for top & bottom toolbars stylesheet ?> +<div id="footer"> <?php echo Template('browse-footer') ?> </div> Modified: trunk/themes/default/templates/viewsource.tmpl =================================================================== --- trunk/themes/default/templates/viewsource.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/default/templates/viewsource.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -1,14 +1,3 @@ -<?php -if ($page->get('locked') && !$user->isAdmin()) { ?> - <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> - <?php echo _("This page has been locked and cannot be edited.") ?> - </p> -<?php } ?> -<?php if ($revision and !$revision->isCurrent()) { ?> - <p class="warning_msg"><?php echo _("You are viewing an old revision of this page.")?> - <?php echo Button('viewsource', _("View the current version."), $page) ?> - </p> -<?php } ?> <br class="clear-floats" /> <textarea class="wikiedit" name="content" @@ -17,6 +6,6 @@ readonly="readonly" ><?php echo $PAGE_SOURCE ?> </textarea> -<div id="footer"><?php // for top & bottom toolbars stylesheet ?> +<div id="footer"> <?php echo Template('browse-footer') ?> </div> Modified: trunk/themes/wikilens/templates/body.tmpl =================================================================== --- trunk/themes/wikilens/templates/body.tmpl 2022-01-05 17:51:01 UTC (rev 10834) +++ trunk/themes/wikilens/templates/body.tmpl 2022-01-05 17:55:47 UTC (rev 10835) @@ -28,8 +28,27 @@ $dbi = $request->getDbh(); // Needed in PHP 8 printXML($loader->expandPI("<"."?plugin RateIt ?".">", $request, $dbi->_markup)); } ?> </h1> - <?php echo $CONTENT ?> - </main> + <?php + $action = $request->getArg('action'); + if (empty($revision)) $revision = $page->getCurrentRevision(false); + if (($action == 'edit') && $page->get('locked') && !$user->isAdmin()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("This page has been locked and cannot be edited.") ?> + </p> + <?php + } + if (($action != 'edit') && ($action != 'revert') + && $revision and !$revision->isCurrent()) { ?> + <p class="warning_msg"><strong><?php echo _("Note:") ?></strong> + <?php echo _("You are viewing an old revision of this page.")?> + <?php echo Button('browse', _("View the current version."), $page)?> + </p> + <?php } ?> + <?php if (!empty($redirected)) { ?> + <p><?php echo $redirected ?></p> + <?php } ?> + <?php echo $CONTENT ?> + </main> <?php echo Template('bottom') ?> </td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |