문서 신고시 이유 적을 수 있게 항목 추가

문서 신고시 항목 적을 수 있게 함
This commit is contained in:
MinSoo Kim 2016-01-27 17:44:34 +09:00
parent 79955b083c
commit f77b8fde3c
16 changed files with 330 additions and 88 deletions

View file

@ -1,71 +1,73 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module> <module>
<grants /> <grants />
<permissions> <permissions>
<permission action="dispDocumentAdminList" target="manager" /> <permission action="dispDocumentAdminList" target="manager" />
<permission action="dispDocumentManageDocument" target="member" /> <permission action="dispDocumentManageDocument" target="member" />
<permission action="getDocumentCategories" target="member" /> <permission action="getDocumentCategories" target="member" />
<permission action="getDocumentCategoryTplInfo" target="member" /> <permission action="getDocumentCategoryTplInfo" target="member" />
<permission action="procDocumentAddCart" target="member" /> <permission action="procDocumentAddCart" target="member" />
<permission action="procDocumentInsertCategory" target="member" /> <permission action="procDocumentInsertCategory" target="member" />
<permission action="procDocumentManageCheckedDocument" target="member" /> <permission action="procDocumentManageCheckedDocument" target="member" />
<permission action="procDocumentMoveCategory" target="member" /> <permission action="procDocumentMoveCategory" target="member" />
<permission action="procDocumentDeleteCategory" target="member" /> <permission action="procDocumentDeleteCategory" target="member" />
<permission action="procDocumentMakeXmlFile" target="member" /> <permission action="procDocumentMakeXmlFile" target="member" />
<permission action="procDocumentAdminMoveToTrash" target="member" /> <permission action="procDocumentAdminMoveToTrash" target="member" />
<permission action="procDocumentAdminInsertExtraVar" target="manager" /> <permission action="procDocumentAdminInsertExtraVar" target="manager" />
<permission action="procDocumentAdminDeleteExtraVar" target="manager" /> <permission action="procDocumentAdminDeleteExtraVar" target="manager" />
</permissions> </permissions>
<actions> <actions>
<action name="dispDocumentPrint" type="view" /> <action name="dispDocumentPrint" type="view" />
<action name="dispDocumentPreview" type="view" /> <action name="dispDocumentPreview" type="view" />
<action name="dispDocumentManageDocument" type="view" /> <action name="dispDocumentManageDocument" type="view" />
<action name="dispTempSavedList" type="view" /> <action name="dispTempSavedList" type="view" />
<action name="dispDocumentDeclare" type="view" />
<action name="getDocumentCategories" type="model" /> <action name="getDocumentCategories" type="model" />
<action name="getDocumentMenu" type="model" /> <action name="getDocumentMenu" type="model" />
<action name="procDocumentVoteUp" type="controller" /> <action name="procDocumentVoteUp" type="controller" />
<action name="procDocumentVoteUpCancel" type="controller" />. <action name="procDocumentVoteUpCancel" type="controller" />.
<action name="procDocumentVoteDown" type="controller" /> <action name="procDocumentVoteDown" type="controller" />
<action name="procDocumentVoteDownCancel" type="controller" /> <action name="procDocumentVoteDownCancel" type="controller" />
<action name="procDocumentDeclare" type="controller" /> <action name="procDocumentDeclare" type="controller" />
<action name="procDocumentAddCart" type="controller" /> <action name="procDocumentAddCart" type="controller" />
<action name="procDocumentManageCheckedDocument" type="controller" /> <action name="procDocumentManageCheckedDocument" type="controller" />
<action name="procDocumentInsertModuleConfig" type="controller" /> <action name="procDocumentInsertModuleConfig" type="controller" />
<action name="dispDocumentAdminList" type="view" admin_index="true" menu_name="document" menu_index="true" /> <action name="dispDocumentAdminList" type="view" admin_index="true" menu_name="document" menu_index="true" />
<action name="dispDocumentAdminConfig" type="view" /> <action name="dispDocumentAdminConfig" type="view" />
<action name="dispDocumentAdminAlias" type="view" menu_name="document" /> <action name="dispDocumentAdminAlias" type="view" menu_name="document" />
<action name="dispDocumentAdminDeclared" type="view" menu_name="document" /> <action name="dispDocumentAdminDeclared" type="view" menu_name="document" />
<action name="dispDocumentAdminTrashList" type="view" menu_name="document" /> <action name="dispDocumentAdminDeclaredLogByDocumentSrl" type="view" menu_name="document" />
<action name="dispDocumentAdminTrashList" type="view" menu_name="document" />
<action name="getDocumentCategoryTplInfo" type="model" /> <action name="getDocumentCategoryTplInfo" type="model" />
<action name="getDocumentVotedMemberList" type="model" /> <action name="getDocumentVotedMemberList" type="model" />
<action name="procDocumentInsertCategory" type="controller" ruleset="insertCategory" /> <action name="procDocumentInsertCategory" type="controller" ruleset="insertCategory" />
<action name="procDocumentDeleteCategory" type="controller" /> <action name="procDocumentDeleteCategory" type="controller" />
<action name="procDocumentMoveCategory" type="controller" /> <action name="procDocumentMoveCategory" type="controller" />
<action name="procDocumentMakeXmlFile" type="controller" /> <action name="procDocumentMakeXmlFile" type="controller" />
<action name="procDocumentTempSave" type="controller" /> <action name="procDocumentTempSave" type="controller" />
<action name="procDocumentGetList" type="controller" /> <action name="procDocumentGetList" type="controller" />
<action name="procDocumentAdminInsertAlias" type="controller" ruleset="insertAlias" /> <action name="procDocumentAdminInsertAlias" type="controller" ruleset="insertAlias" />
<action name="procDocumentAdminDeleteAlias" type="controller" ruleset="deleteAlias" /> <action name="procDocumentAdminDeleteAlias" type="controller" ruleset="deleteAlias" />
<action name="procDocumentAdminRestoreTrash" type="controller" /> <action name="procDocumentAdminRestoreTrash" type="controller" />
<action name="procDocumentAdminMoveExtraVar" type="controller" /> <action name="procDocumentAdminMoveExtraVar" type="controller" />
<action name="procDocumentAdminInsertExtraVar" type="controller" ruleset="insertExtraVar" /> <action name="procDocumentAdminInsertExtraVar" type="controller" ruleset="insertExtraVar" />
<action name="procDocumentAdminDeleteExtraVar" type="controller" /> <action name="procDocumentAdminDeleteExtraVar" type="controller" />
<action name="procDocumentAdminDeleteChecked" type="controller" /> <action name="procDocumentAdminDeleteChecked" type="controller" />
<action name="procDocumentAdminInsertConfig" type="controller" /> <action name="procDocumentAdminInsertConfig" type="controller" />
<action name="procDocumentAdminDeleteAllThumbnail" type="controller" /> <action name="procDocumentAdminDeleteAllThumbnail" type="controller" />
<action name="procDocumentAdminCancelDeclare" type="controller" /> <action name="procDocumentAdminCancelDeclare" type="controller" />
<action name="procDocumentAdminMoveToTrash" type="controller" /> <action name="procDocumentAdminMoveToTrash" type="controller" />
</actions> </actions>
<menus> <menus>
<menu name="document"> <menu name="document">
<title xml:lang="en">Document</title> <title xml:lang="en">Document</title>
@ -81,4 +83,4 @@
<title xml:lang="tr">Document</title> <title xml:lang="tr">Document</title>
</menu> </menu>
</menus> </menus>
</module> </module>

View file

@ -161,6 +161,53 @@ class documentAdminView extends document
$this->setTemplateFile('declared_list'); $this->setTemplateFile('declared_list');
} }
/**
* Display a report list on the admin page
* @return void
*/
function dispDocumentAdminDeclaredLogByDocumentSrl()
{
// option for a list
$args = new stdClass;
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->document_srl = intval(Context::get('target_srl'));
// get Status name list
$oDocumentModel = getModel('document');
$oMemberModel = getModel('member');
$statusNameList = $oDocumentModel->getStatusNameList();
$oDocument = $oDocumentModel->getDocument($args->document_srl);
$declared_output = executeQuery('document.getDeclaredLogByDocumentSrl', $args);
if($declared_output->data && count($declared_output->data))
{
$reporter_list = array();
foreach($declared_output->data as $key => $log)
{
$reporter_list[$log->member_srl] = $oMemberModel->getMemberInfoByMemberSrl($log->member_srl);
}
}
// Set values of document_model::getDocumentList() objects for a template
Context::set('total_count', $declared_output->total_count);
Context::set('total_page', $declared_output->total_page);
Context::set('page', $declared_output->page);
Context::set('declare_log', $declared_output->data);
Context::set('reporter_list', $reporter_list);
Context::set('declared_document', $oDocument);
Context::set('page_navigation', $declared_output->page_navigation);
Context::set('status_name_list', $statusNameList);
// Set the template
$this->setLayoutFile('popup_layout');
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('declared_log');
}
/** /**
* Display a alias list on the admin page * Display a alias list on the admin page
* @return void * @return void

View file

@ -124,6 +124,9 @@ class document extends ModuleObject
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied // 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after')) return true; if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after')) return true;
// 2016. 1. 27: Add a column(declare_message) for report
if(!$oDB->isColumnExists("document_declared_log","declare_message")) return true;
return false; return false;
} }
@ -320,6 +323,12 @@ class document extends ModuleObject
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after'); $oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after');
} }
// 2016. 1. 27: Add a column(declare_message) for report
if(!$oDB->isColumnExists("document_declared_log","declare_message"))
{
$oDB->addColumn('document_declared_log',"declare_message","text");
}
return new Object(0,'success_updated'); return new Object(0,'success_updated');
} }

View file

@ -192,12 +192,18 @@ class documentController extends document
*/ */
function procDocumentDeclare() function procDocumentDeclare()
{ {
if(!Context::get('is_logged')) return new Object(-1, 'msg_invalid_request'); if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$document_srl = Context::get('target_srl'); $document_srl = Context::get('target_srl');
$declare_message = Context::get('declare_message');
if(!$document_srl) return new Object(-1, 'msg_invalid_request'); if(!$document_srl) return new Object(-1, 'msg_invalid_request');
return $this->declaredDocument($document_srl); if(Context::get('success_return_url'))
{
$this->setRedirectUrl(Context::get('success_return_url'));
}
return $this->declaredDocument($document_srl, $declare_message);
} }
/** /**
@ -1359,9 +1365,10 @@ class documentController extends document
/** /**
* Report posts * Report posts
* @param int $document_srl * @param int $document_srl
* @param string $declare_message
* @return void|Object * @return void|Object
*/ */
function declaredDocument($document_srl) function declaredDocument($document_srl, $declare_message = '')
{ {
// Fail if session information already has a reported document // Fail if session information already has a reported document
if($_SESSION['declared_document'][$document_srl]) return new Object(-1, 'failed_declared'); if($_SESSION['declared_document'][$document_srl]) return new Object(-1, 'failed_declared');
@ -1421,6 +1428,7 @@ class documentController extends document
} }
$args->document_srl = $document_srl; $args->document_srl = $document_srl;
$args->declare_message = trim(htmlspecialchars($declare_message));
$output = executeQuery('document.getDocumentDeclaredLogInfo', $args); $output = executeQuery('document.getDocumentDeclaredLogInfo', $args);
// Pass after registering a sesson if reported/declared documents are in the logs. // Pass after registering a sesson if reported/declared documents are in the logs.
@ -1438,6 +1446,7 @@ class documentController extends document
if($declared_count > 0) $output = executeQuery('document.updateDeclaredDocument', $args); if($declared_count > 0) $output = executeQuery('document.updateDeclaredDocument', $args);
else $output = executeQuery('document.insertDeclaredDocument', $args); else $output = executeQuery('document.insertDeclaredDocument', $args);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;
// Leave logs // Leave logs
$output = executeQuery('document.insertDocumentDeclaredLog', $args); $output = executeQuery('document.insertDocumentDeclaredLog', $args);
if(!$output->toBool()) if(!$output->toBool())

View file

@ -514,8 +514,8 @@ class documentModel extends document
} }
// Adding Report // Adding Report
$url = sprintf("doCallModuleAction('document','procDocumentDeclare','%s')", $document_srl); $url = getUrl('', 'act', 'dispDocumentDeclare', 'target_srl', $document_srl);
$oDocumentController->addDocumentPopupMenu($url,'cmd_declare','','javascript'); $oDocumentController->addDocumentPopupMenu($url,'cmd_declare','','popup');
// Add Bookmark button // Add Bookmark button
$url = sprintf("doCallModuleAction('member','procMemberScrapDocument','%s')", $document_srl); $url = sprintf("doCallModuleAction('member','procMemberScrapDocument','%s')", $document_srl);

View file

@ -175,6 +175,35 @@ class documentView extends document
$this->setTemplateFile('saved_list_popup'); $this->setTemplateFile('saved_list_popup');
} }
/**
* Document temp saved list
* @return void
*/
function dispDocumentDeclare()
{
$this->setLayoutFile('popup_layout');
$document_srl = Context::get('target_srl');
$oMemberModel = getModel('member');
// A message appears if the user is not logged-in
if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
// Create the document object. If the document module of basic data structures, write it all works .. -_-;
$oDocumentModel = getModel('document');
// Creates an object for displaying the selected document
$oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager, FALSE);
if(!$oDocument->isExists()) return new Object(-1,'msg_invalid_request');
// Check permissions
if(!$oDocument->isAccessible()) return new Object(-1,'msg_not_permitted');
// Browser title settings
Context::set('target_document', $oDocument);
Context::set('target_srl', $document_srl);
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('declare_document');
}
} }
/* End of file document.view.php */ /* End of file document.view.php */
/* Location: ./modules/document/document.view.php */ /* Location: ./modules/document/document.view.php */

View file

@ -965,4 +965,20 @@
<value xml:lang="vi"><![CDATA[deletes]]></value> <value xml:lang="vi"><![CDATA[deletes]]></value>
</item> </item>
</item> </item>
<item name="improper_document_declare">
<value xml:lang="ko"><![CDATA[불량 게시글 신고]]></value>
<value xml:lang="en"><![CDATA[Report an improper document]]></value>
</item>
<item name="declaring_user">
<value xml:lang="ko"><![CDATA[신고자]]></value>
<value xml:lang="en"><![CDATA[Reporter]]></value>
</item>
<item name="improper_document_declare_reason">
<value xml:lang="ko"><![CDATA[신고 이유]]></value>
<value xml:lang="en"><![CDATA[Reason]]></value>
</item>
<item name="about_improper_document_declare">
<value xml:lang="ko"><![CDATA[게시글 신고 사유를 간단히 적어서 제출해주시면 관리자 검토 후 조치하겠습니다.]]></value>
<value xml:lang="en"><![CDATA[Write here the reason you report this article as an improper document.]]></value>
</item>
</lang> </lang>

View file

@ -0,0 +1,17 @@
<query id="getDeclaredLogByDocumentSrl" action="select">
<tables>
<table name="document_declared_log" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="document_srl" var="document_srl" default="0" filter="number" notnull="notnull" />
</conditions>
<navigation>
<index var="sort_index" default="regdate" order="order_type" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />
</navigation>
</query>

View file

@ -1,11 +1,12 @@
<query id="insertDocumentDeclaredLog" action="insert"> <query id="insertDocumentDeclaredLog" action="insert">
<tables> <tables>
<table name="document_declared_log" /> <table name="document_declared_log" />
</tables> </tables>
<columns> <columns>
<column name="document_srl" var="document_srl" filter="number" default="0" notnull="notnull" /> <column name="document_srl" var="document_srl" filter="number" default="0" notnull="notnull" />
<column name="member_srl" var="member_srl" filter="number" default="0" /> <column name="member_srl" var="member_srl" filter="number" default="0" />
<column name="ipaddress" var="ipaddress" default="ipaddress()" /> <column name="ipaddress" var="ipaddress" default="ipaddress()" />
<column name="regdate" var="regdate" default="curdate()" /> <column name="declare_message" var="declare_message" />
</columns> <column name="regdate" var="regdate" default="curdate()" />
</columns>
</query> </query>

View file

@ -1,11 +1,11 @@
<query id="updateDeclaredDocument" action="update"> <query id="updateDeclaredDocument" action="update">
<tables> <tables>
<table name="document_declared" /> <table name="document_declared" />
</tables> </tables>
<columns> <columns>
<column name="declared_count" default="plus(1)" /> <column name="declared_count" default="plus(1)" />
</columns> </columns>
<conditions> <conditions>
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" /> <condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
</conditions> </conditions>
</query> </query>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="target_srl" required="true" rule="number" default="0" />
</fields>
</ruleset>

View file

@ -1,4 +1,4 @@
<table name="document_declared"> <table name="document_declared">
<column name="document_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" /> <column name="document_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
<column name="declared_count" type="number" size="11" default="0" notnull="notnull" index="idx_declared_count" /> <column name="declared_count" type="number" size="11" default="0" notnull="notnull" index="idx_declared_count" />
</table> </table>

View file

@ -1,6 +1,7 @@
<table name="document_declared_log"> <table name="document_declared_log">
<column name="document_srl" type="number" size="11" notnull="notnull" index="idx_document_srl" /> <column name="document_srl" type="number" size="11" notnull="notnull" index="idx_document_srl" />
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" /> <column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" /> <column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" />
<column name="regdate" type="date" index="idx_regdate" /> <column name="declare_message" type="text" />
<column name="regdate" type="date" index="idx_regdate" />
</table> </table>

View file

@ -0,0 +1,32 @@
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<section class="section">
<h1>{$lang->improper_document_declare}</h1>
<form action="./" method="post" id="fo_component" ruleset="insertDeclare">
<input type="hidden" name="module" value="document" />
<input type="hidden" name="act" value="procDocumentDeclare" />
<input type="hidden" name="target_srl" value="{$target_srl}" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', $act, 'target_srl', $target_srl)}" />
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/1" />
<blockquote>
<section class="target_article">
<h1>{$target_document->getTitleText()}</h1>
<p>{$target_document->getSummary(200)}</p>
</section>
</blockquote>
<label class="x_control-label" for="declare_message">{$lang->improper_document_declare_reason}</label>
<div class="x_controls">
<textarea name="declare_message" id="declare_message"></textarea>
<p>{$lang->about_improper_document_declare}<p>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary" />{$lang->cmd_submit}</button>
</div>
</div>
</form>
</section>
<script>
jQuery(window).load(setFixedPopupSize);
</script>

View file

@ -46,7 +46,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<tr loop="$document_list => $no,$oDocument"> <tr loop="$document_list => $no,$oDocument">
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank">{$oDocument->getTitle()}</a></td> <td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank">{$oDocument->getTitle()}</a></td>
<td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td> <td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
<td class="nowr">{$oDocument->get('declared_count')}</td> <td class="nowr">{$oDocument->get('declared_count')} (<a href="{getUrl('', 'act', 'dispDocumentAdminDeclaredLogByDocumentSrl', 'target_srl',$oDocument->document_srl)}" onclick="popopen(this.href, 'admin_popup');return false">{$lang->improper_document_declare_reason}</a>)</td>
<td class="nowr">{$oDocument->get('readed_count')}</td> <td class="nowr">{$oDocument->get('readed_count')}</td>
<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td> <td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
<td class="nowr">{$oDocument->getRegdate("Y-m-d H:i")}</td> <td class="nowr">{$oDocument->getRegdate("Y-m-d H:i")}</td>

View file

@ -0,0 +1,71 @@
<h1>{$lang->improper_document_declare}</h1>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/declared_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form id="fo_list" action="./" method="get">
<input type="hidden" name="module" value="document" />
<input type="hidden" name="page" value="{$page}" />
<blockquote>
<section>
<h1>{$declared_document->getTitleText()}</h1>
<p>{$declared_document->getSummary(200)}</p>
<address cond="$declared_document->get('member_srl')"><a href="#popup_menu_area" class="member_{$declared_document->get('member_srl')}">{$declared_document->getNickName()}</a></address>
</section>
</blockquote>
<h2>{$lang->improper_document_declare_reason}</h2>
<table class="x_table x_table-striped x_table-hover" id="documentListTable">
<thead>
<tr>
<th scope="col" class="nowr">{$lang->declaring_user}</th>
<th scope="col" class="nowr">{$lang->improper_document_declare_reason}</th>
<th scope="col" class="nowr">{$lang->date}</th>
</tr>
</thead>
<tbody>
<tr loop="$declare_log => $no,$log">
<td class="nowr"><a cond="$log->member_srl" href="#popup_menu_area" class="member_{$log->member_srl}">{$reporter_list[$log->member_srl]->nick_name}</a> ({$log->ipaddress})</td>
<td class="nowr">{$log->declare_message}</td>
<td class="nowr">{date('Y-m-d H:i:s', strtotime($log->regdate))}</td>
</tr>
</tbody>
</table>
</form>
<form action="./" class="x_pagination">
<input type="hidden" name="error_return_url" value="" />
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
<input cond="$search_target" type="hidden" name="search_target" value="{$search_target}" />
<ul>
<li class="x_disabled"|cond="!$page || $page == 1"><a href="{getUrl('page', '')}">&laquo; {$lang->first_page}</a></li>
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
{@$isGoTo = true}
<li>
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">&hellip;</a>
<span cond="$isGoTo" id="goTo" class="x_input-append">
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit" class="x_add-on">Go</button>
</span>
</li>
</block>
<!--@while($page_no = $page_navigation->getNextPage())-->
{@$last_page = $page_no}
<li class="x_active"|cond="$page_no == $page"><a href="{getUrl('page', $page_no)}">{$page_no}</a></li>
<!--@end-->
<block cond="$last_page != $page_navigation->last_page && $last_page + 1 != $page_navigation->last_page">
{@$isGoTo = true}
<li>
<a href="#goTo" data-toggle title="{$lang->cmd_go_to_page}">&hellip;</a>
<span cond="$isGoTo" id="goTo" class="x_input-append">
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit" class="x_add-on">Go</button>
</span>
</li>
</block>
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="{getUrl('page', $page_navigation->last_page)}" title="{$page_navigation->last_page}">{$lang->last_page} &raquo;</a></li>
</ul>
</form>