|
From: <var...@us...> - 2022-01-24 15:39:40
|
Revision: 10932
http://sourceforge.net/p/phpwiki/code/10932
Author: vargenau
Date: 2022-01-24 15:39:38 +0000 (Mon, 24 Jan 2022)
Log Message:
-----------
Tell that a version of the page does not exist; say "Edit", not "Edit Old Version" when the version does not exist; Revision --> Version
Modified Paths:
--------------
trunk/themes/Crao/templates/actionbar.tmpl
trunk/themes/Crao/templates/body.tmpl
trunk/themes/Crao/templates/editpage.tmpl
trunk/themes/MonoBook/templates/actionbar.tmpl
trunk/themes/MonoBook/templates/body.tmpl
trunk/themes/Portland/templates/actionbar.tmpl
trunk/themes/Portland/templates/body.tmpl
trunk/themes/Portland/templates/editpage.tmpl
trunk/themes/Sidebar/templates/actionbar.tmpl
trunk/themes/Sidebar/templates/body.tmpl
trunk/themes/Wordpress/templates/actionbar.tmpl
trunk/themes/Wordpress/templates/body.tmpl
trunk/themes/Wordpress/templates/editpage.tmpl
trunk/themes/blog/templates/body.tmpl
trunk/themes/default/templates/actionbar.tmpl
trunk/themes/default/templates/body.tmpl
trunk/themes/default/templates/editpage.tmpl
trunk/themes/fusionforge/templates/actionbar.tmpl
trunk/themes/fusionforge/templates/browse.tmpl
trunk/themes/fusionforge/templates/editpage.tmpl
trunk/themes/shamino_com/templates/actionbar.tmpl
trunk/themes/smaller/templates/actionbar.tmpl
trunk/themes/wikilens/templates/body.tmpl
Modified: trunk/themes/Crao/templates/actionbar.tmpl
===================================================================
--- trunk/themes/Crao/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Crao/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -1,6 +1,6 @@
<?php
if ($revision && (!$page->get('locked') || $user->isAdmin())) {
- $EditB = Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"));
+ $EditB = Button("edit", ($revision->isCurrent() || $revision->hasDefaultContents()) ? _("Edit") : _("Edit Old Version"));
} else {
$EditB = Button("viewsource", _("View Source"));
}
Modified: trunk/themes/Crao/templates/body.tmpl
===================================================================
--- trunk/themes/Crao/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Crao/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -25,11 +25,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
Modified: trunk/themes/Crao/templates/editpage.tmpl
===================================================================
--- trunk/themes/Crao/templates/editpage.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Crao/templates/editpage.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -9,7 +9,7 @@
<?php } ?>
<?php echo $PAGE_LOCKED_MESSAGE ?>
<?php echo $CONCURRENT_UPDATE_MESSAGE ?>
-<?php if (!$IS_CURRENT) { ?>
+<?php if (!$revision->isCurrent() && !$revision->hasDefaultContents()) { ?>
<p class="warning_msg">
<strong><?php echo _("Warning")._(": ") ?></strong>
<?php echo _("You are editing an old revision.") ?>
Modified: trunk/themes/MonoBook/templates/actionbar.tmpl
===================================================================
--- trunk/themes/MonoBook/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/MonoBook/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -28,7 +28,7 @@
<?php echo ActionButton(array(), _("Discussion"), $talk->getName(), array('class'=>$isBrowse ? "selected" : "")) ?>
<?php } ?>
<?php if (($isAdmin or mayAccessPage('edit', $pagename)) and $revision) { ?>
- <?php echo ActionButton("edit", $dbh->isWikiPage($page->getName()) ? ($revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) : _("Create Page"), false,
+ <?php echo ActionButton("edit", $dbh->isWikiPage($page->getName()) ? ($revision->isCurrent() || $revision->hasDefaultContents() ? _("Edit") : _("Edit Old Version")) : _("Create Page"), false,
array('id' => 'btn-edit', 'title' => "You can edit this page. Please use the preview button before saving.")) ?>
<?php } else { ?>
<?php echo ActionButton("viewsource", _("View Source")) ?>
Modified: trunk/themes/MonoBook/templates/body.tmpl
===================================================================
--- trunk/themes/MonoBook/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/MonoBook/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -19,11 +19,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
Modified: trunk/themes/Portland/templates/actionbar.tmpl
===================================================================
--- trunk/themes/Portland/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Portland/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -1,9 +1,9 @@
<?php
if ($revision && (!$page->get('locked') || $user->isAdmin())) {
- if ($revision->isCurrent()) {
+ if (($revision->isCurrent() || $revision->hasDefaultContents())) {
$EditB = Button("edit", _("Edit this page"));
} else {
- $EditB = Button("edit", _("Edit Old Revision"));
+ $EditB = Button("edit", _("Edit Old Version"));
$EditB = fmt("%s of this page", $EditB);
}
} else {
Modified: trunk/themes/Portland/templates/body.tmpl
===================================================================
--- trunk/themes/Portland/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Portland/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -20,11 +20,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
Modified: trunk/themes/Portland/templates/editpage.tmpl
===================================================================
--- trunk/themes/Portland/templates/editpage.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Portland/templates/editpage.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -6,7 +6,7 @@
<td>
<?php echo $PAGE_LOCKED_MESSAGE ?>
<?php echo $CONCURRENT_UPDATE_MESSAGE ?>
-<?php if (!$IS_CURRENT) { ?>
+<?php if (!$revision->isCurrent() && !$revision->hasDefaultContents()) { ?>
<p class="warning_msg">
<strong><?php echo _("Warning")._(": ") ?></strong>
<?php echo _("You are editing an old revision.") ?>
Modified: trunk/themes/Sidebar/templates/actionbar.tmpl
===================================================================
--- trunk/themes/Sidebar/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Sidebar/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -16,7 +16,8 @@
<li class="selected"><a class="named-wiki" name="browse"><?php echo _("View Page") ?></a></li>
<?php } ?>
<?php if (($isAdmin or $mayEdit) and $revision) { ?>
- <?php echo ActionButton("edit", $dbh->isWikiPage($page->getName()) ? ($revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) : _("Create Page"), false, array('id' => 'btn-edit', 'title' => _("You can edit this page. Please use the preview button before saving."))) ?>
+ <?php echo ActionButton("edit", $dbh->isWikiPage($page->getName()) ? ($revision->isCurrent() || $revision->hasDefaultContents() ? _("Edit") : _("Edit Old Version")) : _("Create Page"), false,
+ array('id' => 'btn-edit', 'title' => "You can edit this page. Please use the preview button before saving.")) ?>
<?php if (ENABLE_WYSIWYG) { ?>
<?php echo Button(array("action" => "edit", "mode"=> "wysiwyg"), _("Wysiwyg Editor"), false, array('id' => 'btn-wysiwyg-edit')) ?>
<?php } ?>
Modified: trunk/themes/Sidebar/templates/body.tmpl
===================================================================
--- trunk/themes/Sidebar/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Sidebar/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -17,11 +17,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
Modified: trunk/themes/Wordpress/templates/actionbar.tmpl
===================================================================
--- trunk/themes/Wordpress/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Wordpress/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -2,7 +2,7 @@
<div id="actionbar">
<?php
if ($revision && (!$page->get('locked') || $user->isAdmin())) {
- $EditB = Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"));
+ $EditB = Button("edit", ($revision->isCurrent() || $revision->hasDefaultContents()) ? _("Edit") : _("Edit Old Version"));
} else {
$EditB = Button("viewsource", _("View Source"));
}
Modified: trunk/themes/Wordpress/templates/body.tmpl
===================================================================
--- trunk/themes/Wordpress/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Wordpress/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -16,11 +16,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
Modified: trunk/themes/Wordpress/templates/editpage.tmpl
===================================================================
--- trunk/themes/Wordpress/templates/editpage.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/Wordpress/templates/editpage.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -8,7 +8,7 @@
<td>
<?php echo $PAGE_LOCKED_MESSAGE ?>
<?php echo $CONCURRENT_UPDATE_MESSAGE ?>
-<?php if (!$IS_CURRENT) { ?>
+<?php if (!$revision->isCurrent() && !$revision->hasDefaultContents()) { ?>
<p class="warning_msg">
<strong><?php echo _("Warning")._(": ") ?></strong>
<?php echo _("You are editing an old revision.") ?>
Modified: trunk/themes/blog/templates/body.tmpl
===================================================================
--- trunk/themes/blog/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/blog/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -17,11 +17,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
Modified: trunk/themes/default/templates/actionbar.tmpl
===================================================================
--- trunk/themes/default/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/default/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -4,8 +4,10 @@
<tr class="baseline">
<td>
<div id="actionbuttons">
- <?php if ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?>
- <?php echo Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision"), false, array('id'=>'btn-edit')) ?>
+ <?php if (!$page->exists()) { ?>
+ <?php echo Button("create", _("Create Page"), false, array('id'=>'btn-edit')) ?>
+ <?php } elseif ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?>
+ <?php echo Button("edit", ($revision->isCurrent() || $revision->hasDefaultContents()) ? _("Edit") : _("Edit Old Version"), false, array('id'=>'btn-edit')) ?>
<?php if (ENABLE_WYSIWYG) { ?>
<?php echo $SEP?><?php echo Button(array("action" => "edit", "mode"=> "wysiwyg"), "Wysiwyg Editor", false, array('id' => 'btn-wysiwyg-edit')) ?>
<?php } ?>
Modified: trunk/themes/default/templates/body.tmpl
===================================================================
--- trunk/themes/default/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/default/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -18,11 +18,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
Modified: trunk/themes/default/templates/editpage.tmpl
===================================================================
--- trunk/themes/default/templates/editpage.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/default/templates/editpage.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -9,7 +9,7 @@
<?php } ?>
<?php echo $PAGE_LOCKED_MESSAGE ?>
<?php echo $CONCURRENT_UPDATE_MESSAGE ?>
-<?php if (!$IS_CURRENT) { ?>
+<?php if (!$revision->isCurrent() && !$revision->hasDefaultContents()) { ?>
<p class="warning_msg">
<strong><?php echo _("Warning")._(": ") ?></strong>
<?php echo _("You are editing an old revision.") ?>
Modified: trunk/themes/fusionforge/templates/actionbar.tmpl
===================================================================
--- trunk/themes/fusionforge/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/fusionforge/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -46,7 +46,7 @@
<?php } else if ($revision && (($revision->isCurrent()) || ($revision->hasDefaultContents()))) { ?>
<?php echo Button("edit", _("Edit")) ?>
<?php } else { ?>
- <?php echo Button("edit", _("Edit Old Revision")) ?>
+ <?php echo Button("edit", _("Edit Old Version")) ?>
<?php } ?>
</li>
<?php } else if ($dbh->isWikiPage($page->getName())) { ?>
Modified: trunk/themes/fusionforge/templates/browse.tmpl
===================================================================
--- trunk/themes/fusionforge/templates/browse.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/fusionforge/templates/browse.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -5,13 +5,13 @@
<?php if ($page->exists() and $revision and $revision->hasDefaultContents()) { ?>
<p class="error"><?php echo _('Error')._(': ') ?>
- <?php echo _("This revision of the page does not exist.") ?>
+ <?php echo _("This version of the page does not exist.") ?>
<?php echo Button('browse', _("View the current version."), $page) ?>
</p>
<?php } else { ?>
<?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 _("You are viewing an old version of this page.") ?>
<?php echo Button('browse', _("View the current version."), $page) ?>
</p>
<?php } ?>
Modified: trunk/themes/fusionforge/templates/editpage.tmpl
===================================================================
--- trunk/themes/fusionforge/templates/editpage.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/fusionforge/templates/editpage.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -7,7 +7,7 @@
<?php } ?>
<?php echo $PAGE_LOCKED_MESSAGE ?>
<?php echo $CONCURRENT_UPDATE_MESSAGE ?>
-<?php if (!$IS_CURRENT) { ?>
+<?php if (!$revision->isCurrent() && !$revision->hasDefaultContents()) { ?>
<p class="warning_msg">
<strong><?php echo _("Warning")._(": ") ?></strong>
<?php echo _("You are editing an old revision.") ?>
Modified: trunk/themes/shamino_com/templates/actionbar.tmpl
===================================================================
--- trunk/themes/shamino_com/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/shamino_com/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -3,7 +3,7 @@
if (empty($revision)) $revision = $page->getCurrentRevision(false);
?>
<?php echo Button(array('action'=>__('PageInfo')), _("Page Info"),$page->getName()) ?>
-<?php echo $SEP?><?php echo Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?>
+<?php echo $SEP?><?php echo Button("edit", ($revision->isCurrent() || $revision->hasDefaultContents()) ? _("Edit") : _("Edit Old Version")) ?>
<?php if ($user->isAdmin() or mayAccessPage('change',$page->getName())) { ?>
<?php echo $SEP?><?php echo Button($page->get('locked') ? 'unlock' : 'lock') ?>
<?php if (ENABLE_PAGEPERM) { ?>
Modified: trunk/themes/smaller/templates/actionbar.tmpl
===================================================================
--- trunk/themes/smaller/templates/actionbar.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/smaller/templates/actionbar.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -3,9 +3,11 @@
<tr class="baseline">
<td>
<div id="actionbuttons">
- <?php if ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?>
- <?php echo Button("edit", $revision->isCurrent() ? _("Edit") : _("Edit Old Revision")) ?>
- <?php } else { ?>
+ <?php if (!$page->exists()) { ?>
+ <?php echo Button("create", _("Create Page"), false, array('id'=>'btn-edit')) ?>
+ <?php } elseif ((!$page->get('locked') || $user->isAdmin()) and $revision) { ?>
+ <?php echo Button("edit", ($revision->isCurrent() || $revision->hasDefaultContents()) ? _("Edit") : _("Edit Old Version"), false, array('id'=>'btn-edit')) ?>
+ <?php } else { ?>
<?php echo Button("viewsource", _("View Source")) ?>
<?php } ?>
<?php if ( $user->isSignedIn()) { ?>
Modified: trunk/themes/wikilens/templates/body.tmpl
===================================================================
--- trunk/themes/wikilens/templates/body.tmpl 2022-01-23 17:29:40 UTC (rev 10931)
+++ trunk/themes/wikilens/templates/body.tmpl 2022-01-24 15:39:38 UTC (rev 10932)
@@ -41,11 +41,16 @@
<?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>
+ && $revision and !$revision->isCurrent()) {
+ if ($revision->hasDefaultContents()) { ?>
+ <p class="error">
+ <?php echo _("This version of the page does not exist.") ?>
+ <?php } else { ?>
+ <p class="warning_msg"><strong><?php echo _("Note:") ?></strong>
+ <?php echo _("You are viewing an old version of this page.") ?>
+ <?php } ?>
+ <?php echo Button('browse', _("View the current version."), $page) ?>
+ </p>
<?php } ?>
<?php if (!empty($redirected)) { ?>
<p><?php echo $redirected ?></p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|