mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
위키XE의 공헌자 및 댓글 정상적으로 나오도록 수정하고 히스토리를 일단 구현하여 보는 기능은 가능하도록 개선. (diff는 차후에)
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6206 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
06d59f203c
commit
78b9eddba9
11 changed files with 75 additions and 45 deletions
|
|
@ -919,5 +919,12 @@
|
|||
$output = executeQueryArray('document.getHistories', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
function getHistory($history_srl)
|
||||
{
|
||||
$args->history_srl = $history_srl;
|
||||
$output = executeQuery('document.getHistory', $args);
|
||||
return $output->data;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -3,11 +3,7 @@
|
|||
<table name="document_histories" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="history_srl" />
|
||||
<column name="nick_name" />
|
||||
<column name="member_srl" />
|
||||
<column name="regdate" />
|
||||
<column name="ipaddress" />
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
|
|
|
|||
11
modules/document/queries/getHistory.xml
Normal file
11
modules/document/queries/getHistory.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getHistories" action="select">
|
||||
<tables>
|
||||
<table name="document_histories" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="history_srl" var="history_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -3,9 +3,14 @@
|
|||
<table name="document_histories" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="nick_name" as="nick_name" />
|
||||
<column name="member_srl" alias="member_srl" />
|
||||
<column name="nick_name" alias="nick_name" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" />
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="member_srl" />
|
||||
<group column="nick_name" />
|
||||
</groups>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -44,11 +44,18 @@ Jeong, Chan Myeong 070601~070630
|
|||
.blogNotice .item .replyAndTrackback { color:#AAAAAA; font-size:.9em; }
|
||||
|
||||
/* wikiRead */
|
||||
.wikimain a { color:#000; text-decoration:underline !important;}
|
||||
.wikimain a:visited { color:#555; }
|
||||
.viewDocument { border-bottom:2px solid #AAAAAA; margin-bottom:20px; }
|
||||
.wikiRead { }
|
||||
|
||||
.wikiRead .titleAndUser { overflow:hidden; border-bottom:1px solid #e0e1db; }
|
||||
.readBody .histories { border-top:2px solid #ccc; margin-top:10px; width:100%; padding:0;}
|
||||
.readBody .histories li._item { list-style:none; padding:10px; margin-bottom:10px; border-bottom:1px solid #ccc; }
|
||||
.readBody .histories li span.date { font-size:11px; color:#555; font-family:tahoma; margin-right:10px; }
|
||||
.readBody .histories li a.view { font-size:11px; font-family:tahoma; color:#999; text-decoration:none !important; display:block; width:40px; white-space:nowrap; float:right; text-align:right; margin-top:-19px; }
|
||||
.readBody .histories li .historyContent { display:none; clear:both; }
|
||||
|
||||
.wikiRead .titleAndUser { overflow:hidden; border-bottom:1px solid #e0e1db; }
|
||||
|
||||
.wikiRead .dateAndCount { clear:both; white-space:nowrap; color:#444444; margin:5px 0 0 0; font-size:.9em; font-family:tahoma; line-height:17px; padding-bottom:10px; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,15 @@
|
|||
<!--#include("header.html")-->
|
||||
<div class="readBody">
|
||||
<table>
|
||||
<tr>
|
||||
<!--@if($page == 1)-->
|
||||
<td>
|
||||
{$oDocument->getUpdate()}
|
||||
</td>
|
||||
<td>
|
||||
by {$oDocument->getNickName()} (current)
|
||||
</td>
|
||||
<td>
|
||||
<a href="{getUrl('act','',page,'')}">[View]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endif-->
|
||||
<ul class="histories">
|
||||
<li class="_item"><span class="date">{$oDocument->getUpdate()}</span> by {$oDocument->getNickName()} (current) <a href="{getUrl('act','',page,'','history_srl','')}" class="view">[view]</a></li>
|
||||
<!--@foreach($histories as $val)-->
|
||||
<tr>
|
||||
<td>
|
||||
{zdate($val->regdate, 'Y.m.d H:i:s')}
|
||||
</td>
|
||||
<td>
|
||||
by {$val->nick_name}
|
||||
</td>
|
||||
<td>
|
||||
<!--@if($val->content)-->
|
||||
<a href="{getUrl('act','',page,'',history_srl,$val->history_srl)}">[View]</a>
|
||||
<li class="_item"><span class="date">{zdate($val->regdate, 'Y.m.d H:i:s')}</span> by <a href="#" onclick="return false;" class="member_{$val->member_srl}">{$val->nick_name}</a> <!--@if($val->content)--><a href="#" onclick="viewHistory('{$val->history_srl}'); return false;" class="view">[view]</a><!--@end-->
|
||||
<div id="historyContent{$val->history_srl}" class="historyContent">
|
||||
{$val->content}
|
||||
</div>
|
||||
</li>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!--#include("footer.html")-->
|
||||
|
|
|
|||
BIN
modules/wiki/skins/xe_wiki/images/common/buttonDeleteX.gif
Normal file
BIN
modules/wiki/skins/xe_wiki/images/common/buttonDeleteX.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 B |
|
|
@ -4,3 +4,9 @@ function moveHistory(fo_obj) {
|
|||
if(typeof(xeVid)!='undefined') url = url.setQuery('vid',xeVid);
|
||||
location.href=url;
|
||||
}
|
||||
|
||||
function viewHistory(history_srl) {
|
||||
var zone = jQuery('#historyContent'+history_srl);
|
||||
if(zone.css('display')=='block') zone.css('display','none');
|
||||
else zone.css('display','block');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
<!--@foreach($contributors as $contributor)-->
|
||||
<!--@if($contributor->nick_name != "")-->
|
||||
<!--@if(!$bFirst)-->, <!--@end-->
|
||||
{$contributor->nick_name}
|
||||
<a href="#" class="member_{$contributor->member_srl}" onclick="return false;">{$contributor->nick_name}</a>
|
||||
{@ $bFirst = false}
|
||||
<!--@endif-->
|
||||
<!--@endforeach-->
|
||||
|
|
|
|||
|
|
@ -13,10 +13,26 @@
|
|||
}
|
||||
|
||||
function getContributors($document_srl) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->isExists()) return array();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray("wiki.getContributors", $args);
|
||||
if(!$output->data) return array();
|
||||
return $output->data;
|
||||
if($output->data) $list = $output->data;
|
||||
else $list = array();
|
||||
|
||||
$item->member_srl = $oDocument->getMemberSrl();
|
||||
$item->nick_name = $oDocument->getNickName();
|
||||
$contributors[] = $item;
|
||||
for($i=0,$c=count($list);$i<$c;$i++) {
|
||||
unset($item);
|
||||
$item->member_srl = $list[$i]->member_srl;
|
||||
$item->nick_name = $list[$i]->nick_name;
|
||||
if($item->member_srl == $oDocument->getMemberSrl()) continue;
|
||||
$contributors[] = $item;
|
||||
}
|
||||
return $contributors;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -182,13 +182,15 @@
|
|||
$contributors = $oModel->getContributors($oDocument->document_srl);
|
||||
Context::set('contributors', $contributors);
|
||||
}
|
||||
|
||||
// 댓글 허용일 경우 문서에 강제 지정
|
||||
if($this->module_info->use_comment) $oDocument->add('allow_comment','Y');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setTemplateFile('create_document');
|
||||
}
|
||||
|
||||
|
||||
// 스킨에서 사용할 oDocument 변수 세팅
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue