mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
issue 481 implemented declared list
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9605 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
830cf41e8b
commit
39c02c7663
4 changed files with 67 additions and 64 deletions
|
|
@ -84,37 +84,40 @@
|
|||
* @brief display a report list on the admin page
|
||||
**/
|
||||
function dispDocumentAdminDeclared() {
|
||||
// option for a list
|
||||
$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
|
||||
// option for a list
|
||||
$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->sort_index = 'document_declared.declared_count'; // /< sorting values
|
||||
$args->order_type = 'desc'; // /< sorting values by order
|
||||
$args->sort_index = 'document_declared.declared_count'; // /< sorting values
|
||||
$args->order_type = 'desc'; // /< sorting values by order
|
||||
|
||||
// get a list
|
||||
$declared_output = executeQuery('document.getDeclaredList', $args);
|
||||
// get Status name list
|
||||
$oDocumentModel = &getModel('document');
|
||||
$statusNameList = $oDocumentModel->getStatusNameList();
|
||||
|
||||
if($declared_output->data && count($declared_output->data)) {
|
||||
$document_list = array();
|
||||
// get a list
|
||||
$declared_output = executeQuery('document.getDeclaredList', $args);
|
||||
if($declared_output->data && count($declared_output->data)) {
|
||||
$document_list = array();
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
foreach($declared_output->data as $key => $document) {
|
||||
$document_list[$key] = new documentItem();
|
||||
$document_list[$key]->setAttribute($document);
|
||||
}
|
||||
$declared_output->data = $document_list;
|
||||
}
|
||||
|
||||
// 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('document_list', $declared_output->data);
|
||||
Context::set('page_navigation', $declared_output->page_navigation);
|
||||
// Set the template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('declared_list');
|
||||
foreach($declared_output->data as $key => $document) {
|
||||
$document_list[$key] = new documentItem();
|
||||
$document_list[$key]->setAttribute($document);
|
||||
}
|
||||
$declared_output->data = $document_list;
|
||||
}
|
||||
|
||||
// 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('document_list', $declared_output->data);
|
||||
Context::set('page_navigation', $declared_output->page_navigation);
|
||||
Context::set('status_name_list', $statusNameList);
|
||||
// Set the template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('declared_list');
|
||||
}
|
||||
|
||||
function dispDocumentAdminAlias() {
|
||||
|
|
|
|||
|
|
@ -1625,8 +1625,8 @@ class documentController extends document {
|
|||
// Set a spam-filer not to be filtered to spams
|
||||
$oSpamController = &getController('spamfilter');
|
||||
$oSpamController->setAvoidLog();
|
||||
$oDocumentAdminController = &getAdminController('document');
|
||||
|
||||
$oDocumentAdminController = &getAdminController('document');
|
||||
if($type == 'move') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
|
||||
|
|
@ -1635,7 +1635,8 @@ class documentController extends document {
|
|||
|
||||
$msg_code = 'success_moved';
|
||||
|
||||
} elseif($type == 'copy') {
|
||||
}
|
||||
elseif($type == 'copy') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
|
||||
$output = $oDocumentAdminController->copyDocumentModule($document_srl_list, $module_srl, $category_srl);
|
||||
|
|
@ -1643,7 +1644,8 @@ class documentController extends document {
|
|||
|
||||
$msg_code = 'success_copy';
|
||||
|
||||
} elseif($type =='delete') {
|
||||
}
|
||||
elseif($type =='delete') {
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
for($i=0;$i<$document_srl_count;$i++) {
|
||||
|
|
@ -1653,7 +1655,8 @@ class documentController extends document {
|
|||
}
|
||||
$oDB->commit();
|
||||
$msg_code = 'success_deleted';
|
||||
} elseif($type == 'trash') {
|
||||
}
|
||||
elseif($type == 'trash') {
|
||||
$args->description = $message_content;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -1666,6 +1669,10 @@ class documentController extends document {
|
|||
$oDB->commit();
|
||||
$msg_code = 'success_trashed';
|
||||
}
|
||||
elseif($type == 'cancelDeclare') {
|
||||
$args->document_srl = $document_srl_list;
|
||||
$output = executeQuery('document.deleteDeclaredDocuments', $args);
|
||||
}
|
||||
|
||||
$_SESSION['document_management'] = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,25 @@
|
|||
<script type="text/javascript">
|
||||
xe.lang.msg_empty_search_target = '{$lang->msg_empty_search_target}';
|
||||
xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||
</script>
|
||||
<load target="js/document_admin.js" usecdn="true" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form id="fo_list" action="./" method="get" class="form">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<h1 class="h1">{$lang->document}</h1>
|
||||
<h1 class="h1">{$lang->cmd_declared_list}</h1>
|
||||
<div class="table even">
|
||||
<div class="cnb">
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{$lang->all}</a>
|
||||
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'N')}">{$status_name_list['PUBLIC']}</a>
|
||||
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'Y')}">{$status_name_list['SECRET']}</a>
|
||||
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'temp')}">{$status_name_list['TEMP']}</a>
|
||||
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}" class="active">{$lang->cmd_declared_list}</a>
|
||||
</div>
|
||||
<table width="100%" border="1" cellspacing="0" id="documentListTable">
|
||||
<caption>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">All</a>
|
||||
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'N')}">{$status_name_list['PUBLIC']}({$statusCount['PUBLIC']})</a>
|
||||
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'Y')}">{$status_name_list['SECRET']}({$statusCount['SECRET']})</a>
|
||||
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'temp')}">{$status_name_list['TEMP']}({$statusCount['TEMP']})</a>
|
||||
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}">{$lang->accusation}(#)</a>
|
||||
| <a href="#">{$lang->trash}(#)</a>
|
||||
{$lang->all} ({number_format($total_count)})
|
||||
<div class="side">
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getDocumentList();">{$lang->document_manager}...</a></span>
|
||||
</div>
|
||||
|
|
@ -22,37 +28,34 @@
|
|||
<tr>
|
||||
<th scope="col" class="title">{$lang->title}</th>
|
||||
<th scope="col">{$lang->writer}</th>
|
||||
<th scope="col">{$lang->cmd_declare}</th>
|
||||
<th scope="col">{$lang->readed_count}</th>
|
||||
<th scope="col">{$lang->cmd_vote}(+/-)</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->ipaddress}</th>
|
||||
<th scope="col">{$lang->status}</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->title}</th>
|
||||
<th scope="col">{$lang->writer}</th>
|
||||
<th scope="col">{$lang->cmd_declare}</th>
|
||||
<th scope="col">{$lang->readed_count}</th>
|
||||
<th scope="col">{$lang->cmd_vote}(+/-)</th>
|
||||
<th scope="col">{$lang->date}</th>
|
||||
<th scope="col">{$lang->ipaddress}</th>
|
||||
<th scope="col">{$lang->status}</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<!--@foreach($document_list as $no => $oDocument)-->
|
||||
<tr>
|
||||
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank">{$oDocument->getTitle()}</a></td>
|
||||
<td><a href="#popup_menu_area"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></a></td>
|
||||
<td><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
|
||||
<td>{$oDocument->get('declared_count')}</td>
|
||||
<td>{$oDocument->get('readed_count')}</td>
|
||||
<td>{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
|
||||
<td>{$oDocument->getRegdate("Y-m-d H:i")}</td>
|
||||
<td><a href="{getUrl('search_target','ipaddress','search_keyword',$oDocument->get('ipaddress'))}">{$oDocument->get('ipaddress')}</a></td>
|
||||
<td>{$status_name_list[$oDocument->get('status')]}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($oDocument->isCarted())-->checked="checked"<!--@end--> /></td>
|
||||
<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" /></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
|
|
@ -66,6 +69,7 @@
|
|||
<form action="./" method="post" class="fg form" id="manageForm">
|
||||
<input type="hidden" name="act" value="procDocumentManageCheckedDocument" />
|
||||
<input type="hidden" name="type" value="" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}" />
|
||||
<h2 class="h2">{$lang->document_manager}</h2>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0" id="documentManageListTable">
|
||||
|
|
@ -110,6 +114,7 @@
|
|||
<span class="btn"><button type="submit" name="type" value="delete">{$lang->cmd_delete}</button></span>
|
||||
<span class="btn"><button type="submit" name="type" value="move">{$lang->cmd_move}</button></span>
|
||||
<span class="btn"><button type="submit" name="type" value="copy">{$lang->cmd_copy}</button></span>
|
||||
<span class="btn"><button type="submit" name="type" value="cancelDeclare">{$lang->cmd_cancel_declare}</button></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -124,6 +129,7 @@
|
|||
|
||||
<a href="{getUrl('page', '')}" class="direction">« FIRST</a>
|
||||
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
|
||||
{@$isGoTo = true}
|
||||
<a href="{getUrl('page', '')}">1</a>
|
||||
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
|
||||
</block>
|
||||
|
|
@ -133,28 +139,14 @@
|
|||
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<block cond="$last_page != $page_navigation->last_page">
|
||||
{@$isGoTo = true}
|
||||
<a href="#goTo" class="tgAnchor" title="{$lang->cmd_go_to_page}">...</a>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST »</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<span cond="$isGoTo" id="goTo" class="tgContent">
|
||||
<input name="page" title="{$lang->cmd_go_to_page}" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
</form>
|
||||
|
||||
<form action="./" method="get" class="adminSearch">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<select name="search_target">
|
||||
<option value="">{$lang->search_target}</option>
|
||||
<!--@foreach($lang->search_target_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
<a href="#">{$lang->cmd_cancel}</a>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'N')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'N')-->class="active"<!--@end-->>{$status_name_list['PUBLIC']}</a>
|
||||
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'Y')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$status_name_list['SECRET']}</a>
|
||||
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'temp')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'temp')-->class="active"<!--@end-->>{$status_name_list['TEMP']}</a>
|
||||
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}">{$lang->cmd_declared_list}</a>
|
||||
</div>
|
||||
<table width="100%" border="1" cellspacing="0" id="documentListTable">
|
||||
<caption>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue