From 820775863a7b87f24ee6a038e945a5bdae52adba Mon Sep 17 00:00:00 2001 From: haneul Date: Fri, 27 Mar 2009 09:00:37 +0000 Subject: [PATCH] #17763740 : added the list of contributors git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5987 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/wiki/lang/en.lang.php | 1 + modules/wiki/lang/jp.lang.php | 1 + modules/wiki/lang/ko.lang.php | 1 + modules/wiki/lang/zh-CN.lang.php | 3 +++ modules/wiki/lang/zh-TW.lang.php | 1 + modules/wiki/queries/getContributors.xml | 11 ++++++++++ modules/wiki/skins/xe_wiki/css/wiki.css | 2 ++ modules/wiki/skins/xe_wiki/view_document.html | 16 +++++++++----- modules/wiki/wiki.model.php | 22 +++++++++++++++++++ modules/wiki/wiki.view.php | 10 +++++++++ 10 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 modules/wiki/queries/getContributors.xml create mode 100644 modules/wiki/wiki.model.php diff --git a/modules/wiki/lang/en.lang.php b/modules/wiki/lang/en.lang.php index 1e21cfc50..ece2d826a 100644 --- a/modules/wiki/lang/en.lang.php +++ b/modules/wiki/lang/en.lang.php @@ -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'; ?> diff --git a/modules/wiki/lang/jp.lang.php b/modules/wiki/lang/jp.lang.php index e163c7cea..1760c3597 100644 --- a/modules/wiki/lang/jp.lang.php +++ b/modules/wiki/lang/jp.lang.php @@ -12,4 +12,5 @@ $lang->cmd_view_info = 'wiki情報'; $lang->use_comment = 'コメント機能を使う'; $lang->about_use_comment = 'コメント機能をオン・オフを設定します。'; + $lang->contributors = 'Contributors'; ?> diff --git a/modules/wiki/lang/ko.lang.php b/modules/wiki/lang/ko.lang.php index 58ffa183d..b08f8dfc9 100644 --- a/modules/wiki/lang/ko.lang.php +++ b/modules/wiki/lang/ko.lang.php @@ -12,4 +12,5 @@ $lang->cmd_view_info = '위키 정보'; $lang->use_comment = '댓글 사용'; $lang->about_use_comment = '댓글을 활성화하거나 비활성화할 수 있습니다'; + $lang->contributors = '공헌자'; ?> diff --git a/modules/wiki/lang/zh-CN.lang.php b/modules/wiki/lang/zh-CN.lang.php index 20f0c8707..505c98937 100644 --- a/modules/wiki/lang/zh-CN.lang.php +++ b/modules/wiki/lang/zh-CN.lang.php @@ -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'; ?> diff --git a/modules/wiki/lang/zh-TW.lang.php b/modules/wiki/lang/zh-TW.lang.php index 10f541c97..e9a72c4f3 100644 --- a/modules/wiki/lang/zh-TW.lang.php +++ b/modules/wiki/lang/zh-TW.lang.php @@ -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'; ?> diff --git a/modules/wiki/queries/getContributors.xml b/modules/wiki/queries/getContributors.xml new file mode 100644 index 000000000..937ffacdb --- /dev/null +++ b/modules/wiki/queries/getContributors.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/modules/wiki/skins/xe_wiki/css/wiki.css b/modules/wiki/skins/xe_wiki/css/wiki.css index 5c06e57e2..ddd6756b5 100644 --- a/modules/wiki/skins/xe_wiki/css/wiki.css +++ b/modules/wiki/skins/xe_wiki/css/wiki.css @@ -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 diff --git a/modules/wiki/skins/xe_wiki/view_document.html b/modules/wiki/skins/xe_wiki/view_document.html index ba9de53df..b1fd5460c 100644 --- a/modules/wiki/skins/xe_wiki/view_document.html +++ b/modules/wiki/skins/xe_wiki/view_document.html @@ -53,11 +53,17 @@ - - - - - +
+{$lang->contributors} : +{@ $bFirst = true} + + +, +{$contributor->nick_name} +{@ $bFirst = false} + + +
diff --git a/modules/wiki/wiki.model.php b/modules/wiki/wiki.model.php new file mode 100644 index 000000000..7c9028f46 --- /dev/null +++ b/modules/wiki/wiki.model.php @@ -0,0 +1,22 @@ +document_srl = $document_srl; + $output = executeQueryArray("wiki.getContributors", $args); + if(!$output->data) return array(); + return $output->data; + } + } +?> diff --git a/modules/wiki/wiki.view.php b/modules/wiki/wiki.view.php index 9eecaeb78..e7b0be2fd 100644 --- a/modules/wiki/wiki.view.php +++ b/modules/wiki/wiki.view.php @@ -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);