mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
#17727625 : features to view old revision and to apply old revision
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6011 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a50139a884
commit
9c88f8a395
12 changed files with 72 additions and 11 deletions
|
|
@ -13,4 +13,5 @@
|
|||
$lang->use_comment = 'Use comment';
|
||||
$lang->about_use_comment = 'You may configure to enable comments.';
|
||||
$lang->contributors = 'Contributors';
|
||||
$lang->notice_old_revision = 'This is an old revision';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@
|
|||
$lang->use_comment = 'コメント機能を使う';
|
||||
$lang->about_use_comment = 'コメント機能をオン・オフを設定します。';
|
||||
$lang->contributors = 'Contributors';
|
||||
$lang->notice_old_revision = 'This is an old revision';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@
|
|||
$lang->use_comment = '댓글 사용';
|
||||
$lang->about_use_comment = '댓글을 활성화하거나 비활성화할 수 있습니다';
|
||||
$lang->contributors = '공헌자';
|
||||
$lang->notice_old_revision = '옛날 버전을 보고 계십니다';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@
|
|||
$lang->use_comment = 'Use comment';
|
||||
$lang->about_use_comment = 'You may configure to enable comments.';
|
||||
$lang->contributors = 'Contributors';
|
||||
$lang->notice_old_revision = 'This is an old revision';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@
|
|||
$lang->use_comment = '使用評論';
|
||||
$lang->about_use_comment = '可設定是否使用評論功能。';
|
||||
$lang->contributors = 'Contributors';
|
||||
$lang->notice_old_revision = 'This is an old revision';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -345,4 +345,4 @@ color:#666666; font-size:11px; font-weight:normal; margin-top:5px; padding-top:5
|
|||
.pagination.a1 a.next{ padding-right:10px; background:#fff url(../images/common/arrowNextA1.gif) no-repeat right center; }
|
||||
.pagination.a1 a.nextEnd{ padding-right:15px; background:#fff url(../images/common/arrowNextEndA1.gif) no-repeat right center; }
|
||||
|
||||
.contributors
|
||||
.oldhistory { float:left; margin-left: 5px; }
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@
|
|||
<div class="pageHistory">
|
||||
<!--@if($oDocument)-->
|
||||
<div class="userInfo">
|
||||
<!--@if($history)-->
|
||||
<div class="author">last edited by {$history->nick_name}</div>
|
||||
<!--@else-->
|
||||
<!--@if(!$oDocument->getMemberSrl())-->
|
||||
<div class="author">
|
||||
last edited by
|
||||
|
|
@ -35,13 +38,22 @@
|
|||
last edited by
|
||||
<span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></div>
|
||||
<!--@end-->
|
||||
<!--@endif-->
|
||||
<div class="date" title="{$lang->regdate}">
|
||||
<!--@if($history)-->
|
||||
<strong>{zdate($history->regdate, 'Y.m.d')}</strong> {zdate($history->regdate, 'H:i:s')}
|
||||
<!--@else-->
|
||||
<strong>{$oDocument->getUpdate('Y.m.d')}</strong> {$oDocument->getUpdate('H:i:s')}
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@if($history)-->
|
||||
<div class="oldhistory">[{$lang->notice_old_revision}]
|
||||
</div>
|
||||
<!--@endif-->
|
||||
</div>
|
||||
<!--@if($use_history != 'N')-->
|
||||
<div class="history">
|
||||
<a href="{getUrl('act','dispWikiHistory','document_srl',$oDocument->document_srl)}">View History</a>
|
||||
<a href="{getUrl('act','dispWikiHistory','document_srl',$oDocument->document_srl,'history_srl','')}">View History</a>
|
||||
</div>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -2,16 +2,18 @@
|
|||
<div class="readBody">
|
||||
<table>
|
||||
<tr>
|
||||
<!--@if($page == 1)-->
|
||||
<td>
|
||||
{$oDocument->getUpdate()}
|
||||
</td>
|
||||
<td>
|
||||
by {$oDocument->getNickName()}
|
||||
by {$oDocument->getNickName()} (current)
|
||||
</td>
|
||||
<td>
|
||||
(current revision)
|
||||
<a href="{getUrl('act','',page,'')}">[View]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endif-->
|
||||
<!--@foreach($histories as $val)-->
|
||||
<tr>
|
||||
<td>
|
||||
|
|
@ -21,9 +23,24 @@
|
|||
by {$val->nick_name}
|
||||
</td>
|
||||
<td>
|
||||
<!--@if($val->content)-->
|
||||
<a href="{getUrl('act','',page,'',history_srl,$val->history_srl)}">[View]</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination a1">
|
||||
<a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<strong>{$page_no}</strong>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
|
||||
</div>
|
||||
|
||||
<!--#include("footer.html")-->
|
||||
|
|
|
|||
|
|
@ -18,7 +18,11 @@
|
|||
</form>
|
||||
</div>
|
||||
<!--@else-->
|
||||
{$oDocument->getContent(false)}
|
||||
<!--@if($history)-->
|
||||
{$history->content}
|
||||
<!--@else-->
|
||||
{$oDocument->getContent(false)}
|
||||
<!--@endif-->
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert)" id="fo_write">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<!--@if($history)-->
|
||||
<input type="hidden" name="content" value="{htmlspecialchars($history->content)}" />
|
||||
<!--@else-->
|
||||
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
|
||||
<!--@end-->
|
||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||
<input type="hidden" name="title" value="{$entry}" />
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ function completeDocumentInserted(ret_obj) {
|
|||
}
|
||||
else
|
||||
{
|
||||
url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','');
|
||||
url = current_url.setQuery('mid',mid).setQuery('document_srl',document_srl).setQuery('act','').setQuery('history_srl','');
|
||||
}
|
||||
location.href = url;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,14 +44,17 @@
|
|||
function dispWikiHistory() {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_srl = Context::get('document_srl');
|
||||
$page = Context::get('page');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->isExists()) return $this->stop('msg_invalid_request');
|
||||
$entry = $oDocument->getTitleText();
|
||||
Context::set('entry',$entry);
|
||||
$histories = $oDocumentModel->getHistories($document_srl);
|
||||
$histories = $oDocumentModel->getHistories($document_srl, 10, $page);
|
||||
if(!$histories) $histories = array();
|
||||
Context::set('histories',$histories);
|
||||
Context::set('histories',$histories->data);
|
||||
Context::set('oDocument', $oDocument);
|
||||
Context::set('page_navigation', $histories->page_navigation);
|
||||
Context::set('page', $histories->page);
|
||||
$this->setTemplateFile('histories');
|
||||
}
|
||||
|
||||
|
|
@ -65,6 +68,15 @@
|
|||
$oDocument->add('module_srl', $this->module_srl);
|
||||
Context::set('document_srl',$document_srl);
|
||||
Context::set('oDocument', $oDocument);
|
||||
$history_srl = Context::get('history_srl');
|
||||
if($history_srl)
|
||||
{
|
||||
$output = $oDocumentModel->getHistory($history_srl);
|
||||
if($output && $output->content != null)
|
||||
{
|
||||
Context::set('history', $output);
|
||||
}
|
||||
}
|
||||
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml');
|
||||
|
||||
|
|
@ -109,9 +121,6 @@
|
|||
$document_srl = $oDocumentModel->getDocumentSrlByAlias($this->module_info->mid, $entry);
|
||||
}
|
||||
|
||||
|
||||
// document model 객체 생성
|
||||
|
||||
/**
|
||||
* 요청된 문서 번호가 있다면 문서를 구함
|
||||
**/
|
||||
|
|
@ -131,6 +140,16 @@
|
|||
|
||||
// 상담기능이 사용되고 공지사항이 아니고 사용자의 글도 아니면 무시
|
||||
|
||||
$history_srl = Context::get('history_srl');
|
||||
if($history_srl)
|
||||
{
|
||||
$output = $oDocumentModel->getHistory($history_srl);
|
||||
if($output && $output->content != null)
|
||||
{
|
||||
Context::set('history', $output);
|
||||
}
|
||||
}
|
||||
|
||||
// 요청된 문서번호의 문서가 없으면 document_srl null 처리 및 경고 메세지 출력
|
||||
} else {
|
||||
Context::set('document_srl','',true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue