mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 21:32:51 +09:00
issue 70 document, comment, trackback module UI change.
But not finished yet git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8639 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5385ebb524
commit
9acd474c52
37 changed files with 1125 additions and 830 deletions
|
|
@ -45,6 +45,7 @@
|
|||
<action name="procDocumentMoveCategory" type="controller" standalone="true" />
|
||||
<action name="procDocumentMakeXmlFile" type="controller" standalone="true" />
|
||||
<action name="procDocumentTempSave" type="controller" standalone="true" />
|
||||
<action name="procDocumentGetList" type="controller" standalone="true" />
|
||||
|
||||
<action name="procDocumentAdminInsertAlias" type="controller" standalone="true" ruleset="insertAlias" />
|
||||
<action name="procDocumentAdminDeleteAlias" type="controller" standalone="true" ruleset="deleteAlias" />
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@
|
|||
$oDocumentModel = &getModel('document');
|
||||
$output = $oDocumentModel->getDocumentList($args);
|
||||
|
||||
// count eache status, not in trash...
|
||||
$countOutput = $oDocumentModel->getDocumentCountByGroupStatus($args);;
|
||||
|
||||
// get Status name list
|
||||
$statusNameList = $oDocumentModel->getStatusNameList();
|
||||
|
||||
|
|
@ -53,6 +56,7 @@
|
|||
Context::set('document_list', $output->data);
|
||||
Context::set('status_name_list', $statusNameList);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('countOutput', $countOutput);
|
||||
|
||||
// set a search option used in the template
|
||||
$count_search_option = count($this->search_option);
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,28 @@ class documentController extends document {
|
|||
$this->add('document_srl', $obj->document_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return Document List for exec_xml
|
||||
**/
|
||||
function procDocumentGetList()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
// Taken from a list of selected sessions
|
||||
$flagList = $_SESSION['document_management'];
|
||||
if(count($flagList)) {
|
||||
foreach($flagList as $key => $val) {
|
||||
if(!is_bool($val)) continue;
|
||||
$documentSrlList[] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
if(count($documentSrlList)) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$documentList = $oDocumentModel->getDocuments($documentSrlList, $this->grant->is_admin);
|
||||
}
|
||||
$this->add('document_list', $documentList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief for old version, comment allow status check.
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -515,6 +515,26 @@
|
|||
$total_count = $output->data->count;
|
||||
return (int)$total_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief module_srl the total number of documents that are bringing
|
||||
**/
|
||||
function getDocumentCountByGroupStatus($search_obj = NULL) {
|
||||
// Additional search options
|
||||
$args->module_srl = $search_obj->module_srl;
|
||||
$args->s_title = $search_obj->s_title;
|
||||
$args->s_content = $search_obj->s_content;
|
||||
$args->s_user_name = $search_obj->s_user_name;
|
||||
$args->s_member_srl = $search_obj->s_member_srl;
|
||||
$args->s_ipaddress = $search_obj->s_ipaddress;
|
||||
$args->s_regdate = $search_obj->s_regdate;
|
||||
$args->category_srl = $search_obj->category_srl;
|
||||
|
||||
$output = executeQuery('document.getDocumentCountByGroupStatus', $args);
|
||||
if(!$output->toBool()) return array();
|
||||
|
||||
return $output->data;
|
||||
}
|
||||
/**
|
||||
* @brief Import page of the document, module_srl Without throughout ..
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -7,14 +7,33 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="category_srl" var="category_srl" />
|
||||
<condition operation="equal" column="is_notice" var="s_is_notice" pipe="and" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" pipe="and" />
|
||||
<condition operation="in" column="status" var="statusList" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="title" var="s_title" />
|
||||
<condition operation="like" column="content" var="s_content" pipe="and" />
|
||||
<condition operation="like" column="user_name" var="s_user_name" pipe="and" />
|
||||
<condition operation="like" column="user_id" var="s_user_id" pipe="or" />
|
||||
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="email_address" var="s_email_addres" pipe="or" />
|
||||
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like" column="tags" var="s_tags" pipe="or" />
|
||||
<condition operation="equal" column="member_srl" var="s_member_srl" pipe="and" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="and" />
|
||||
<condition operation="more" column="readed_count" var="s_readed_count" pipe="or" />
|
||||
<condition operation="more" column="voted_count" var="s_voted_count" pipe="or" />
|
||||
<condition operation="more" column="comment_count" var="s_comment_count" pipe="or" />
|
||||
<condition operation="more" column="trackback_count" var="s_trackback_count" pipe="or" />
|
||||
<condition operation="more" column="uploaded_count" var="s_uploaded_count" pipe="or" />
|
||||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="and" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_update" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="and" />
|
||||
</group>
|
||||
<group pipe="and">
|
||||
<condition operation="more" column="last_update" var="start_date" pipe="and" />
|
||||
<condition operation="less" column="last_update" var="end_date" pipe="and" />
|
||||
</group>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
43
modules/document/queries/getDocumentCountByGroupStatus.xml
Normal file
43
modules/document/queries/getDocumentCountByGroupStatus.xml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<query id="getDocumentCountByGroupStatus" action="select">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="status" alias="status" />
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="category_srl" var="category_srl" />
|
||||
<condition operation="equal" column="is_notice" var="s_is_notice" pipe="and" />
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" pipe="and" />
|
||||
<condition operation="in" column="status" var="statusList" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="like" column="title" var="s_title" />
|
||||
<condition operation="like" column="content" var="s_content" pipe="and" />
|
||||
<condition operation="like" column="user_name" var="s_user_name" pipe="and" />
|
||||
<condition operation="like" column="user_id" var="s_user_id" pipe="or" />
|
||||
<condition operation="like" column="nick_name" var="s_nick_name" pipe="or" />
|
||||
<condition operation="like" column="email_address" var="s_email_addres" pipe="or" />
|
||||
<condition operation="like" column="homepage" var="s_homepage" pipe="or" />
|
||||
<condition operation="like" column="tags" var="s_tags" pipe="or" />
|
||||
<condition operation="equal" column="member_srl" var="s_member_srl" pipe="and" />
|
||||
<condition operation="more" column="readed_count" var="s_readed_count" pipe="or" />
|
||||
<condition operation="more" column="voted_count" var="s_voted_count" pipe="or" />
|
||||
<condition operation="more" column="comment_count" var="s_comment_count" pipe="or" />
|
||||
<condition operation="more" column="trackback_count" var="s_trackback_count" pipe="or" />
|
||||
<condition operation="more" column="uploaded_count" var="s_uploaded_count" pipe="or" />
|
||||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="and" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_update" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="and" />
|
||||
</group>
|
||||
<group pipe="and">
|
||||
<condition operation="more" column="last_update" var="start_date" pipe="and" />
|
||||
<condition operation="less" column="last_update" var="end_date" pipe="and" />
|
||||
</group>
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="status" />
|
||||
</groups>
|
||||
</query>
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
<form id="fo_list" action="./" method="get">
|
||||
<!--%import("js/document_admin.js")-->
|
||||
<form id="fo_list" action="./" method="get" class="form">
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<h1 class="h1">Document</h1>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>All({number_format($total_count)}) <span class="side">All({number_format($total_count)}) | <a href="#">Public(456)</a> | <a href="#">Secret(8)</a> | <a href="#">Private(9)</a> | <a href="#">Temp(12)</a> | <a href="#">Trash(4)</a></span></caption>
|
||||
<table width="100%" border="1" cellspacing="0" id="documentListTable">
|
||||
<caption>All({number_format($total_count)}) <span class="side">All({number_format($total_count)})
|
||||
<!--@foreach($countOutput AS $key=>$value)-->
|
||||
| <a href="#">{$status_name_list[$value->status]}({$value->count})</a>
|
||||
<!--@end-->
|
||||
</span></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->title}</th>
|
||||
|
|
@ -13,7 +18,7 @@
|
|||
<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" onclick="XE.checkboxToggleAll({ doClick:true }); return false;" /></th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -29,57 +34,35 @@
|
|||
<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($oDocument->isCarted())-->checked="checked"<!--@end--> /></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<td class="title"><a href="#" target="_blank">The quick brown fox jumps over the lazy dog.</a></td>
|
||||
<td><a href="#popup_menu_area">홍길동</a></td>
|
||||
<td>2</td>
|
||||
<td>1/-1</td>
|
||||
<td>2010-12-24 15:59</td>
|
||||
<td>123.456.789.0</td>
|
||||
<td>Trash</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor">선택한 글 관리...</a></span>
|
||||
<span class="btn"><a href="#listManager" class="modalAnchor" onclick="getDocumentList();">선택한 글 관리...</a></span>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal" id="listManager">
|
||||
<form action="" class="fg form">
|
||||
<h2 class="h2">선택한 글 관리</h2>
|
||||
<div class="table even">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<table width="100%" border="1" cellspacing="0" id="documentManageListTable">
|
||||
<caption>선택한 글 <strong>8</strong></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">Title</th>
|
||||
<th scope="col">Author</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" checked="checked" /></th>
|
||||
<th scope="col"><input type="checkbox" title="Check All" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="title">The quick brown fox jumps over the lazy dog.</td>
|
||||
<td>홍길동</td>
|
||||
<td>Public</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title">The quick brown fox jumps over the lazy dog.</td>
|
||||
<td>홍길동</td>
|
||||
<td>Trash</td>
|
||||
<td><input type="checkbox" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="q"><label for="midUrl">선택한 글을 다음 위치로 옮기거나 복사할 수 있습니다.</label></p>
|
||||
<div class="a">
|
||||
<input type="text" id="midUrl" />
|
||||
<span class="desc"><a href="#midSuggestion" class="tgFade">Find Module ID</a></span>
|
||||
<span class="desc"><a href="#midSuggestion" class="tgFade" onclick="getModuleList();">Find Module ID</a></span>
|
||||
<div id="midSuggestion" class="tgContent">
|
||||
<ul>
|
||||
<li><button type="button">SiteID.ModuleID.Category</button></li>
|
||||
|
|
@ -103,33 +86,50 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="search">
|
||||
<form action="" class="pagination">
|
||||
<a href="#" class="direction">« FIRST</a>
|
||||
<a href="#" class="direction">‹ PREV</a>
|
||||
<strong>11</strong>
|
||||
<a href="#">12</a>
|
||||
<a href="#">13</a>
|
||||
<a href="#goTo" class="tgSimple">...</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<input title="Go to Page" />
|
||||
<button type="submit">GO</button>
|
||||
</span>
|
||||
<a href="#">99</a>
|
||||
<a href="#" class="direction">NEXT ›</a>
|
||||
<a href="#" class="direction">LAST »</a>
|
||||
</form>
|
||||
<form action="">
|
||||
<select>
|
||||
<option>제목</option>
|
||||
<option>내용</option>
|
||||
<option>닉네임</option>
|
||||
<option>아이디</option>
|
||||
<option>사용자 이름</option>
|
||||
<option>공지사항</option>
|
||||
<option>IP 주소</option>
|
||||
<option>모듈 아이디</option>
|
||||
<form action="./" class="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}" />
|
||||
|
||||
<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">
|
||||
<a href="{getUrl('page', '')}">1</a>
|
||||
<a href="#goTo" class="tgSimple">...</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<input name="page" title="Go to Page" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
|
||||
</block>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
{@$last_page = $page_no}
|
||||
<strong cond="$page_no == $page">{$page_no}</strong>
|
||||
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<block cond="$last_page != $page_navigation->last_page">
|
||||
<a href="#goTo" class="tgSimple">...</a>
|
||||
<span id="goTo" class="tgContent">
|
||||
<input name="page" title="Go to Page" />
|
||||
<button type="submit">Go</button>
|
||||
</span>
|
||||
<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>
|
||||
</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 title="Search" />
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
|
||||
<input type="submit" value="Search" />
|
||||
<a href="#">Cancel</a>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -147,3 +147,43 @@ function completeRestoreTrash(ret_obj) {
|
|||
alert(ret_obj['message']);
|
||||
location.href = current_url;
|
||||
}
|
||||
|
||||
function getDocumentList() {
|
||||
var params = new Array();
|
||||
var response_tags = ['error','message', 'document_list'];
|
||||
|
||||
exec_xml('document','procDocumentGetList',params, completeGetDocumentList, response_tags);
|
||||
}
|
||||
|
||||
function completeGetDocumentList(ret_obj, response_tags)
|
||||
{
|
||||
var document_list = ret_obj['document_list']['item'];
|
||||
var htmlListBuffer = '';
|
||||
var statusNameList = {"PUBLIC":"Public", "SECRET":"Secret", "PRIVATE":"Private", "TEMP":"Temp"};
|
||||
|
||||
for(var x in document_list)
|
||||
{
|
||||
var objDocument = document_list[x];
|
||||
htmlListBuffer += '<tr>' +
|
||||
'<td class="title">'+ objDocument.variables.title +'</td>' +
|
||||
'<td>'+ objDocument.variables.nick_name +'</td>' +
|
||||
'<td>'+ statusNameList[objDocument.variables.status] +'</td>' +
|
||||
'<td><input type="checkbox" /></td>' +
|
||||
'</tr>';
|
||||
}
|
||||
jQuery('#documentManageListTable>tbody').html(htmlListBuffer);
|
||||
}
|
||||
|
||||
function getModuleList()
|
||||
{
|
||||
var params = new Array();
|
||||
var response_tags = ['error', 'message'];
|
||||
|
||||
exec_xml('document','procModuleAdminGetList',params, completeGetModuleList, response_tags);
|
||||
}
|
||||
|
||||
function completeGetModuleList(ret_obj, response_tags)
|
||||
{
|
||||
console.log(ret_obj['error']);
|
||||
console.log(ret_obj['message']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue