aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Controllers/WikiController.php30
-rw-r--r--h-source/Application/Include/languages.php3
-rw-r--r--h-source/Application/Views/Wiki/page.php103
-rw-r--r--h-source/Application/Views/Wiki/pages.php4
-rw-r--r--h-source/Application/Views/right.php1
5 files changed, 91 insertions, 50 deletions
diff --git a/h-source/Application/Controllers/WikiController.php b/h-source/Application/Controllers/WikiController.php
index b282d24..8e26454 100644
--- a/h-source/Application/Controllers/WikiController.php
+++ b/h-source/Application/Controllers/WikiController.php
@@ -487,6 +487,7 @@ class WikiController extends BaseController
public function pages($lang = 'en')
{
+ $data['topString'] = 'list of pages';
$data['title'] = gtext('list of pages').' - '.Website::$generalName;
$this->setArgKeys(array('page:forceNat'=>1));
@@ -511,6 +512,35 @@ class WikiController extends BaseController
$this->right();
}
+ public function deleted($lang = 'en')
+ {
+ $this->s['registered']->check('admin');
+
+ $data['topString'] = 'list of deleted pages';
+ $data['title'] = gtext('list of deleted pages').' - '.Website::$generalName;
+
+ $this->setArgKeys(array('page:forceNat'=>1));
+
+ $this->shift(1);
+
+ $this->helper('Pages','wiki/deleted/'.$this->lang,'page');
+
+ $this->m['WikiModel']->clear()->select()->where(array('-deleted'=>'yes'))->orderBy('id_wiki desc');
+
+ $recordNumber = $this->m['WikiModel']->rowNumber();
+ $page = $this->viewArgs['page'];
+
+ $this->m['WikiModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30);
+
+ $data['table'] = $this->m['WikiModel']->send();
+
+ $data['pageList'] = $this->h['Pages']->render($page-7,15);
+
+ $this->append($data);
+ $this->load('pages');
+ $this->right();
+ }
+
//print all the modifications to the wiki
public function modifications($lang = 'en')
{
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php
index 9922e87..5145029 100644
--- a/h-source/Application/Include/languages.php
+++ b/h-source/Application/Include/languages.php
@@ -207,6 +207,9 @@ class Lang
"block the wiki page" => "blocca la pagina",
"show the wiki page" => "mostra la pagina della wiki",
"hide the wiki page" => "nascondi la pagina della wiki",
+ "list of deleted pages" => "lista delle pagine cancellate",
+ "restore the wiki page" => "ripristina la pagina",
+ "delete the wiki page" => "cancella la pagina",
),
'es' => array
(
diff --git a/h-source/Application/Views/Wiki/page.php b/h-source/Application/Views/Wiki/page.php
index e59d85c..da5b9d5 100644
--- a/h-source/Application/Views/Wiki/page.php
+++ b/h-source/Application/Views/Wiki/page.php
@@ -30,54 +30,6 @@
<a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/wiki/page/$lang/Main-Page";?>">Wiki</a> &raquo; <?php echo $tree_name;?>
</div>
- <!--block a page-->
- <?php if ($isadmin) { ?>
- <div class="moderator_box">
- <?php if ($isBlocked) { ?>
- <?php echo gtext('This wiki page has been blocked'); ?>
-
- <a id="<?php echo $id_wiki;?>" class="pageunblock_page block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/unlock.png"><?php echo gtext('unblock the wiki page'); ?></a>
-
- <?php } else { ?>
-
- <a id="<?php echo $id_wiki;?>" class="pageblock_page block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/lock.png"><?php echo gtext('block the wiki page'); ?></a>
-
- <?php } ?>
-
- <!--view details-->
- <div class="show_hidden_box_ext">
- <div class="md_type">page</div>
- <a id="<?php echo $id_wiki;?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
- <div class="moderation_details_box"></div>
- </div>
-
- </div>
- <?php } ?>
-
- <!--delete a page-->
- <?php if ($isadmin) { ?>
- <div class="moderator_box">
- <?php if ($isDeleted) { ?>
- <?php echo gtext('This wiki page has been deleted'); ?>
-
- <a id="<?php echo $id_wiki;?>" class="pageshow_page_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png"><?php echo gtext('show the wiki page'); ?></a>
-
- <?php } else { ?>
-
- <a id="<?php echo $id_wiki;?>" class="pagehide_page_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png"><?php echo gtext('hide the wiki page'); ?></a>
-
- <?php } ?>
-
- <!--view details-->
- <div class="show_hidden_box_ext">
- <div class="md_type">page_del</div>
- <a id="<?php echo $id_wiki;?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
- <div class="moderation_details_box"></div>
- </div>
-
- </div>
- <?php } ?>
-
<div class="notebook_insert_link">
<div class="view_page_back_button">
<a title="Insert a new wiki page" href="<?php echo $this->baseUrl."/".$this->controller."/insert/$lang";?>"><img class="top_left_images" src="<?php echo $this->baseUrl;?>/Public/Img/new-60.png"></a>
@@ -159,3 +111,58 @@
<? } ?>
</div>
+
+ <!--block the page-->
+ <?php if ($isadmin) { ?>
+ <div class="moderator_box">
+ <?php if ($isBlocked) { ?>
+ <?php echo gtext('This wiki page has been blocked'); ?>
+
+ <a id="<?php echo $id_wiki;?>" class="pageunblock_page block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/unlock.png"><?php echo gtext('unblock the wiki page'); ?></a>
+
+ <?php } else { ?>
+
+ <a id="<?php echo $id_wiki;?>" class="pageblock_page block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/lock.png"><?php echo gtext('block the wiki page'); ?></a>
+
+ <?php } ?>
+
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">page</div>
+ <a id="<?php echo $id_wiki;?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+ <div class="moderation_details_box"></div>
+ </div>
+
+ </div>
+ <?php } ?>
+
+ <!--delete the page-->
+ <?php if ($isadmin) { ?>
+ <div class="moderator_box_deleted">
+ <?php if ($isDeleted) { ?>
+ <?php echo gtext('This wiki page has been deleted'); ?>
+
+ <a id="<?php echo $id_wiki;?>" class="pageshow_page_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_ok.png"><?php echo gtext('restore the wiki page'); ?></a>
+
+ <?php } else { ?>
+
+ <a id="<?php echo $id_wiki;?>" class="pagehide_page_del block_general" href="<?php echo $this->baseUrl."/home/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/Crystal/button_cancel.png"><?php echo gtext('delete the wiki page'); ?></a>
+
+ <?php } ?>
+
+ <!--view details-->
+ <div class="show_hidden_box_ext">
+ <div class="md_type">page_del</div>
+ <a id="<?php echo $id_wiki;?>" class="hidden_message_view_details" href="<?php echo $this->baseUrl."/home/index/$lang";?>">view details</a>
+ <div class="details_of_hidden_message">
+ <?php foreach ($table as $page) { ?>
+ <div class="wiki_page_content">
+ <?php echo decodeWikiText($page[$tableName]['page'])?>
+ </div>
+ <?php } ?>
+ <div class="moderation_details_box"></div>
+ </div>
+ </div>
+
+ </div>
+ <?php } ?>
diff --git a/h-source/Application/Views/Wiki/pages.php b/h-source/Application/Views/Wiki/pages.php
index f944f36..7a6918a 100644
--- a/h-source/Application/Views/Wiki/pages.php
+++ b/h-source/Application/Views/Wiki/pages.php
@@ -23,11 +23,11 @@
<div id="left">
<div class="position_tree_box">
- <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/wiki/page/$lang/Main-Page";?>">Wiki</a> &raquo; <?php echo gtext('list of pages');?>
+ <a href="<?php echo $this->baseUrl."/home/index/$lang";?>">Home</a> &raquo; <a href="<?php echo $this->baseUrl."/wiki/page/$lang/Main-Page";?>">Wiki</a> &raquo; <?php echo gtext($topString);?>
</div>
<div class="contrib_explain_box">
- <?php echo gtext('List of wiki pages');?>
+ <?php echo gtext($topString);?>
</div>
<div class="notebooks_viewall">
diff --git a/h-source/Application/Views/right.php b/h-source/Application/Views/right.php
index 89f3d85..8c415cd 100644
--- a/h-source/Application/Views/right.php
+++ b/h-source/Application/Views/right.php
@@ -94,6 +94,7 @@
<div class="wiki_control_box">
<ul>
<li><a href="<?php echo $this->baseUrl."/wiki/pages/$lang";?>"><?php echo gtext('list of pages'); ?></a></li>
+ <li><a href="<?php echo $this->baseUrl."/wiki/deleted/$lang";?>"><?php echo gtext('list of deleted pages'); ?></a></li>
<li><a href="<?php echo $this->baseUrl."/wiki/modifications/$lang";?>"><?php echo gtext('last modifications'); ?></a></li>
</ul>
</div>