#17763740 : added the list of contributors

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5987 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-03-27 09:00:37 +00:00
parent 86ada3ed8f
commit 820775863a
10 changed files with 63 additions and 5 deletions

View file

@ -12,4 +12,5 @@
$lang->cmd_view_info = 'Wiki information';
$lang->use_comment = 'Use comment';
$lang->about_use_comment = 'You may configure to enable comments.';
$lang->contributors = 'Contributors';
?>

View file

@ -12,4 +12,5 @@
$lang->cmd_view_info = 'wiki情報';
$lang->use_comment = 'コメント機能を使う';
$lang->about_use_comment = 'コメント機能をオン・オフを設定します。';
$lang->contributors = 'Contributors';
?>

View file

@ -12,4 +12,5 @@
$lang->cmd_view_info = '위키 정보';
$lang->use_comment = '댓글 사용';
$lang->about_use_comment = '댓글을 활성화하거나 비활성화할 수 있습니다';
$lang->contributors = '공헌자';
?>

View file

@ -10,4 +10,7 @@
$lang->cmd_create = '新建文档';
$lang->cmd_wiki_list = '目录';
$lang->cmd_view_info = '维基信息';
$lang->use_comment = 'Use comment';
$lang->about_use_comment = 'You may configure to enable comments.';
$lang->contributors = 'Contributors';
?>

View file

@ -12,4 +12,5 @@
$lang->cmd_view_info = '維基資訊';
$lang->use_comment = 'Use comment';
$lang->about_use_comment = 'You may configure to enable comments.';
$lang->contributors = 'Contributors';
?>

View file

@ -0,0 +1,11 @@
<query id="getContributors" action="select">
<tables>
<table name="document_histories" />
</tables>
<columns>
<column name="nick_name" as="nick_name" />
</columns>
<groups>
<group column="nick_name" />
</groups>
</query>

View file

@ -344,3 +344,5 @@ color:#666666; font-size:11px; font-weight:normal; margin-top:5px; padding-top:5
.pagination.a1 a.prevEnd{ padding-left:15px; background:#fff url(../images/common/arrowPrevEndA1.gif) no-repeat left center; }
.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

View file

@ -53,11 +53,17 @@
</div>
</div>
<!-- 엮인글 -->
<!--@if($oDocument->allowTrackback())-->
<!--#include("./trackback.html")-->
<!--@end-->
<div class="replyBox contributors">
{$lang->contributors} :
{@ $bFirst = true}
<!--@foreach($contributors as $contributor)-->
<!--@if($contributor->nick_name != "")-->
<!--@if(!$bFirst)-->, <!--@end-->
{$contributor->nick_name}
{@ $bFirst = false}
<!--@endif-->
<!--@endforeach-->
</div>
<!--@if($module_info->use_comment != 'N')-->

View file

@ -0,0 +1,22 @@
<?php
/**
* @class wikiModel
* @author haneul (haneul0318@gmail.com)
* @brief wiki 모듈의 Model class
**/
class wikiModel extends module {
/**
* @brief 초기화
**/
function init() {
}
function getContributors($document_srl) {
$args->document_srl = $document_srl;
$output = executeQueryArray("wiki.getContributors", $args);
if(!$output->data) return array();
return $output->data;
}
}
?>

View file

@ -27,6 +27,7 @@
$document_config = $oModuleModel->getModulePartConfig('document', $this->module_info->module_srl);
if(!isset($document_config->use_history)) $document_config->use_history = 'N';
$this->use_history = $document_config->use_history;
Context::set('use_history', $document_config->use_history);
Context::addJsFile($this->module_path.'tpl/js/wiki.js');
@ -156,12 +157,21 @@
// 비밀글일때 컨텐츠를 보여주지 말자.
if($oDocument->isSecret() && !$oDocument->isGranted()) $oDocument->add('content',Context::getLang('thisissecret'));
$this->setTemplateFile('view_document');
// set contributors
if($this->use_history)
{
$oModel = &getModel('wiki');
$contributors = $oModel->getContributors($oDocument->document_srl);
Context::set('contributors', $contributors);
}
}
else
{
$this->setTemplateFile('create_document');
}
// 스킨에서 사용할 oDocument 변수 세팅
Context::set('oDocument', $oDocument);