#17763731 : Added a feature, comment, to wiki

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5842 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-03-11 05:04:20 +00:00
parent b386bd7c44
commit 173955e8f9
19 changed files with 566 additions and 1 deletions

View file

@ -0,0 +1,105 @@
<!--@if($oDocument->getCommentCount())-->
<div class="replyBox">
{@ $_comment_list = $oDocument->getComments() }
{@ debugPrint($oDocument) }
<!--@foreach($_comment_list as $key => $comment)-->
<div class="replyItem <!--@if($comment->get('depth'))-->reply<!--@end-->">
<!--@if($comment->get('depth'))-->
<div style="margin-left:{($comment->get('depth')-1)*20}px" class="replyIndent">
<!--@end-->
<a name="comment_{$comment->comment_srl}"></a>
<div class="replyOption">
<!--@if($comment->isGranted() || !$comment->get('member_srl'))-->
<a href="{getUrl('act','dispWikiDeleteComment','comment_srl',$comment->comment_srl)}"><img src="./images/common/buttonDeleteX.gif" alt="{$lang->cmd_delete}" width="12" height="13" /></a>
<a href="{getUrl('act','dispWikiModifyComment','comment_srl',$comment->comment_srl)}"><img src="./images/{$module_info->colorset}/buttonModifyE.gif" alt="{$lang->cmd_modify}" width="20" height="17" /></a>
<!--@end-->
<a href="{getUrl('act','dispWikiReplyComment','comment_srl',$comment->comment_srl)}"><img src="./images/{$module_info->colorset}/buttonReply.gif" alt="{$lang->cmd_reply}" width="20" height="17" /></a>
</div>
<div class="date">
<strong>{$comment->getRegdate('Y.m.d')}</strong> {$comment->getRegdate('H:i:s')}
<!--@if($grant->manager|| $module_info->display_ip_address!='N')-->({$comment->getIpaddress()})<!--@end-->
</div>
<div class="author">
<!--@if(!$comment->member_srl)-->
<!--@if($comment->homepage)-->
<a href="{$comment->homepage}" onclick="window.open(this.href);return false;">{$comment->getNickName()}</a>
<!--@else-->
{$comment->getNickName()}
<!--@end-->
<!--@else-->
<div class="member_{$comment->member_srl}">{$comment->getNickName()}</div>
<!--@end-->
</div>
<!--@if($comment->get('voted_count')!=0 || $comment->get('blamed_count') != 0)-->
<div class="voted">
({$lang->voted_count}:
<strong>{$comment->get('voted_count')?$comment->get('voted_count'):0}</strong> / <strong>{$comment->get('blamed_count')?$comment->get('blamed_count'):0}</strong>)
</div>
<!--@end-->
<div class="clear"></div>
<div class="replyContent">
<!--@if(!$comment->isAccessible())-->
<div class="secretContent">
<form action="./" method="get" onsubmit="return procFilter(this, input_password)">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="document_srl" value="{$comment->get('document_srl')}" />
<input type="hidden" name="comment_srl" value="{$comment->get('comment_srl')}" />
<div class="title">{$lang->msg_is_secret}</div>
<div class="content"><input type="password" name="password" class="inputTypeText" /><span class="button {$btn_class}"><input type="submit" value="{$lang->cmd_input}" accesskey="s" /></span></div>
</form>
</div>
<!--@else-->
<!--@if($comment->getProfileImage())-->
<img src="{$comment->getProfileImage()}" alt="profile" class="commentProfileImage" />
<!--@end-->
{$comment->getContent(true)}
<!--@end-->
<div class="clear"></div>
</div>
<!--@if($comment->hasUploadedFIles())-->
<div class="fileAttached">
<ul>
{@ $_uploaded_files = $comment->getUploadedFiles() }
<!--@foreach($_uploaded_files as $key => $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} ({FileHandler::filesize($file->file_size)})({number_format($file->download_count)})</a></li>
<!--@end-->
</ul>
<div class="clear"></div>
</div>
<!--@end-->
<!--@if($comment->get('depth'))-->
</div>
<!--@end-->
</div>
<!--@end-->
<!-- 댓글 페이지 네비게이션 -->
<!--@if($oDocument->comment_page_navigation)-->
<div class="pagination a1">
<a href="{getUrl('cpage',1)}#comment" class="prevEnd">{$lang->first_page}</a>
<!--@while($page_no = $oDocument->comment_page_navigation->getNextPage())-->
<!--@if($cpage == $page_no)-->
<strong>{$page_no}</strong>
<!--@else-->
<a href="{getUrl('cpage',$page_no)}#comment">{$page_no}</a>
<!--@end-->
<!--@end-->
<a href="{getUrl('cpage',$oDocument->comment_page_navigation->last_page)}#comment" class="nextEnd">{$lang->last_page}</a>
</div>
<!--@end-->
</div>
<!--@end-->

View file

@ -0,0 +1,66 @@
<!--#include("header.html")-->
<!--// 만약 댓글의 답을 다는 것이라면 원문 보여줌 -->
<!--@if($oSourceComment->isExists())-->
<div class="replyBox">
<div class="replyItem">
<div class="author"><div class="member_{$oSourceComment->getMemberSrl()}">{$oSourceComment->getNickName()}</div></div>
<div class="date">
{$oSourceComment->getRegdate("Y.m.d H:i")}
<!--@if($grant->manager)-->
({$oSourceComment->get('ipaddress')})
<!--@end-->
</div>
<div class="clear"></div>
<div class="replyContent gap1">
{$oSourceComment->getContent(false)}
</div>
</div>
</div>
<!--@end-->
<!-- 글쓰기 폼 -->
<form action="./" method="post" onsubmit="return procFilter(this, insert_comment)" class="boardEditor" >
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oComment->get('document_srl')}" />
<input type="hidden" name="comment_srl" value="{$oComment->get('comment_srl')}" />
<input type="hidden" name="content" value="{htmlspecialchars($oComment->get('content'))}" />
<input type="hidden" name="parent_srl" value="{$oComment->get('parent_srl')}" />
<div class="boardWrite commentEditor">
<div class="userNameAndPw">
<!--@if(!$is_logged)-->
<label for="userName">{$lang->writer}</label>
<input type="text" name="nick_name" value="{$oComment->get('nick_name')}" class="userName inputTypeText" id="userName"/>
<label for="userPw">{$lang->password}</label>
<input type="password" name="password" value="" id="userPw" class="userPw inputTypeText" />
<label for="emailAddress">{$lang->email_address}</label>
<input type="text" name="email_address" value="{htmlspecialchars($oComment->get('email_address'))}" id="emailAddress" class="emailAddress inputTypeText"/>
<label for="homePage">{$lang->homepage}</label>
<input type="text" name="homepage" value="{htmlspecialchars($oComment->get('homepage'))}" id="homePage" class="homePage inputTypeText"/>
<!--@else-->
<input type="checkbox" name="notify_message" value="Y" <!--@if($oComment->useNotify())-->checked="checked"<!--@end--> id="notify_message" />
<label for="notify_message">{$lang->notify}</label>
<!--@end-->
<!--@if($module_info->secret=="Y")-->
<input type="checkbox" name="is_secret" value="Y" <!--@if($oComment->isSecret())-->checked="checked"<!--@end--> id="is_secret" />
<label for="is_secret">{$lang->secret}</label>
<!--@end-->
</div>
<div class="editor">{$oComment->getEditor()}</div>
</div>
<div class="commentButton tRight">
<span class="button {$btn_class}"><input type="button" value="{$lang->cmd_back}" onclick="location.href='{getUrl('act','')}'"/></span>
<span class="button {$btn_class}"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>
</div>
</form>
<!--#include("footer.html")-->

View file

@ -0,0 +1,23 @@
<!--#include("header.html")-->
<div class="smallBox w268">
<div class="header">
<h3>{$lang->confirm_delete}</h3>
</div>
<form action="./" method="get" onsubmit="return procFilter(this, delete_comment)">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="document_srl" value="{$oComment->get('document_srl')}" />
<input type="hidden" name="comment_srl" value="{$oComment->get('comment_srl')}" />
<div class="inputPassword tCenter">
<span class="button {$btn_class}"><input type="submit" value="{$lang->cmd_delete}" accesskey="s" /></span>
<a href="{getUrl('act','','comment_srl','')}" class="button {$btn_class}"><span>{$lang->cmd_cancel}</span></a>
</div>
</form>
</div>
<!--#include("footer.html")-->

View file

@ -1,4 +1,7 @@
<!--%import("css/wiki.css")-->
<!--@if(!$module_info->colorset)-->
{@$module_info->colorset = "white"}
<!--@end-->
<div class="wikimain">
<div class="header">
<!--@if($oDocument)-->

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

View file

@ -0,0 +1,16 @@
<!--#include("header.html")-->
<div class="smallBox w268">
<div class="tCenter messageBox">{$message}</div>
<div class="gap1 tCenter">
<!--@if(!$is_logged)-->
<a href="{getUrl('act','dispMemberLoginForm')}" class="button {$btn_class}"><span>{$lang->cmd_login}</span></a>
<!--@end-->
<a href="#" onclick="history.back(); return false;" class="button {$btn_class}"><span>{$lang->cmd_back}</span></a>
</div>
</div>
<!--#include("footer.html")-->

View file

@ -0,0 +1,26 @@
<!-- 엮인글 목록 -->
<div class="trackbackBox">
<div class="trackbackUrl"><a name="trackback" href="{$oDocument->getTrackbackUrl()}" onclick="return false;">{$lang->trackback_url} : {$oDocument->getTrackbackUrl()}</a><div class="clear"></div></div>
<!--@if($oDocument->getTrackbackCount())-->
<!--@foreach($oDocument->getTrackbacks() as $key => $val)-->
<div class="trackbackItem">
<a name="trackback_{$val->trackback_srl}"></a>
<address>
<a href="{$val->url}" onclick="winopen(this.href);return false;">{htmlspecialchars($val->title)} - {htmlspecialchars($val->blog_name)}</a>
<a href="{getUrl('act','dispBoardDeleteTrackback','trackback_srl',$val->trackback_srl)}"><img src="./images/common/buttonDeleteX.gif" border="0" alt="delete" width="12" height="13" /></a>
<span class="date">
{zdate($val->regdate, "Y.m.d H:i")}
({$val->ipaddress})
</span>
</address>
<div>
<a href="{$val->url}" onclick="winopen(this.href);return false;">{$val->excerpt}</a>
</div>
</div>
<!--@end-->
<!--@end-->
</div>

View file

@ -53,4 +53,55 @@
</div>
</div>
<!-- 엮인글 -->
<!--@if($oDocument->allowTrackback())-->
<!--#include("./trackback.html")-->
<!--@end-->
<!--@if($module_info->use_comment != 'N')-->
<!-- 댓글 -->
<a name="comment"></a>
<!--#include("./comment.html")-->
<!-- 댓글 입력 폼 -->
<!--@if($grant->write_comment && $oDocument->isEnableComment() )-->
<form action="./" method="post" onsubmit="return procFilter(this, insert_comment)" class="boardEditor" >
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="comment_srl" value="" />
<input type="hidden" name="content" value="" />
<div class="boardWrite commentEditor">
<div class="userNameAndPw">
<!--@if(!$is_logged)-->
<label for="userName">{$lang->writer}</label>
<input type="text" name="nick_name" value="" class="userName inputTypeText" id="userName"/>
<label for="userPw">{$lang->password}</label>
<input type="password" name="password" value="" id="userPw" class="userPw inputTypeText" />
<label for="emailAddress">{$lang->email_address}</label>
<input type="text" name="email_address" value="" id="emailAddress" class="emailAddress inputTypeText"/>
<label for="homePage">{$lang->homepage}</label>
<input type="text" name="homepage" value="" id="homePage" class="homePage inputTypeText"/>
<!--@else-->
<input type="checkbox" name="notify_message" value="Y" id="notify_message" />
<label for="notify_message">{$lang->notify}</label>
<!--@end-->
<!--@if($module_info->secret=="Y")-->
<input type="checkbox" name="is_secret" value="Y" id="is_secret" />
<label for="is_secret">{$lang->secret}</label>
<!--@end-->
</div>
<div class="editor">{$oDocument->getCommentEditor()}</div>
</div>
<div class="commentButton tRight">
<span class="button {$btn_class}"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>
</div>
</form>
<!--@end-->
<!--@end-->
<!--#include("footer.html")-->