Changeset 5610 for trunk/interface/owner/entry/comment/index.php
- Timestamp:
- 03/20/08 22:33:32 (10 months ago)
- Files:
-
- 1 modified
-
trunk/interface/owner/entry/comment/index.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/owner/entry/comment/index.php
r5588 r5610 12 12 if (isset($_GET['search'])) $_POST['search'] = $_GET['search']; 13 13 if (isset($_GET['withSearch'])) $_POST['withSearch'] = $_GET['withSearch']; 14 if (isset($_GET['status'])) $_POST['status'] = $_GET['status']; 14 15 15 16 $IV = array( … … 25 26 'perPage' => array('int', 1, 'mandatory' => false), 26 27 'search' => array('string', 'default' => ''), 27 'withSearch' => array(array('on'), 'mandatory' => false) 28 'withSearch' => array(array('on'), 'mandatory' => false), 29 'status' => array('string', 'mandatory' => false) 28 30 ) 29 31 ); … … 44 46 setBlogSetting('rowsPerPage', $_POST['perPage']); 45 47 } 46 list($comments, $paging) = getCommentsWithPagingForOwner($blogid, $categoryId, $name, $ip, $search, $suri['page'], $perPage); 48 49 $tabsClass = array(); 50 if (isset($_POST['status'])) { 51 if($_POST['status']=='comment') { 52 $tabsClass['comment'] = true; 53 $visibilityText = _t('댓글'); 54 } else if($_POST['status']=='guestbook') { 55 $tabsClass['guestbook'] = true; 56 $visibilityText = _t('방명록'); 57 } 58 } else { 59 $tabsClass['comment'] = true; 60 $visibilityText = _t('댓글'); 61 } 62 if($tabsClass['comment'] == true) { 63 list($comments, $paging) = getCommentsWithPagingForOwner($blogid, $categoryId, $name, $ip, $search, $suri['page'], $perPage); 64 } else { 65 list($comments, $paging) = getGuestbookWithPagingForOwner($blogid, $name, $ip, $search, $suri['page'], $perPage); 66 } 47 67 require ROOT . '/lib/piece/owner/header.php'; 48 68 require ROOT . '/lib/piece/owner/contentMenu.php'; … … 162 182 <div id="part-post-comment" class="part"> 163 183 <h2 class="caption"> 164 <span class="main-text"><?php echo _t('등록된 댓글 목록입니다');?></span>184 <span class="main-text"><?php echo (isset($tabsClass['guestbook']) ? _t('등록된 방명록 목록입니다') : _t('등록된 댓글 목록입니다'));?></span> 165 185 <?php 166 186 if (strlen($name) > 0 || strlen($ip) > 0) { … … 179 199 ?> 180 200 </h2> 181 201 <ul id="communication-tabs-box" class="tabs-box"> 202 <!-- TODO : $tab['postfix'] 버그 --> 203 <li<?php echo isset($tabsClass['comment']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry/comment?page=1<?php echo $tab['postfix'];?>&status=comment"><?php echo _t('댓글');?></a></li> 204 <li<?php echo isset($tabsClass['guestbook']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry/comment?page=1<?php echo $tab['postfix'];?>&status=guestbook"><?php echo _t('방명록');?></a></li> 205 <li<?php echo isset($tabsClass['notify']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry/notify"><?php echo _t('댓글 알리미');?></a></li> 206 <li<?php echo isset($tabsClass['received']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry/trackback?page=1<?php echo $tab['postfix'];?>&status=received"><?php echo _t('걸린 글');?></a></li> 207 <li<?php echo isset($tabsClass['sent']) ? ' class="selected"' : NULL;?>><a href="<?php echo $blogURL;?>/owner/entry/trackback?page=1<?php echo $tab['postfix'];?>&status=sent"><?php echo _t('건 글');?></a></li> 208 </ul> 209 <?php 210 if(isset($tabsClass['comment'])) { 211 ?> 182 212 <form id="category-form" class="category-box" method="post" action="<?php echo $blogURL;?>/owner/entry/comment"> 183 213 <div class="section"> … … 201 231 </div> 202 232 </form> 203 233 <?php 234 } 235 ?> 204 236 <form id="list-form" method="post" action="<?php echo $blogURL;?>/owner/entry/comment"> 205 237 <?php … … 272 304 } 273 305 ?> 274 <a href="?name=<?php echo urlencode(escapeJSInAttribute($comment['name'])) ;?>" title="<?php echo _t('이 이름으로 등록된 댓글 목록을 보여줍니다.');?>"><?php echo htmlspecialchars($comment['name']);?></a>306 <a href="?name=<?php echo urlencode(escapeJSInAttribute($comment['name'])).'&status='.(isset($tabsClass['guestbook']) ? 'guestbook' : 'comment');?>" title="<?php echo (isset($tabsClass['guestbook']) ? _t('이 이름으로 등록된 방명록을 보여줍니다.') : _t('이 이름으로 등록된 댓글 목록을 보여줍니다.'));?>"><?php echo htmlspecialchars($comment['name']);?></a> 275 307 </td> 276 308 <td class="content"> 277 309 <?php 278 echo '<a class="entryURL" href="'.$blogURL.'/'.$comment['entry'].'#comment'.$comment['id'].'" title="'._t('댓글이 작성된 포스트로 직접 이동합니다.').'">'; 310 if(isset($tabsClass['guestbook'])) { 311 echo '<a class="entryURL" href="'.$blogURL.'/guestbook/'.$comment['id'].'#guestbook'.$comment['id'].'" title="'._t('방명록으로 직접 이동합니다.').'">'; 312 } else { 313 echo '<a class="entryURL" href="'.$blogURL.'/'.$comment['entry'].'#comment'.$comment['id'].'" title="'._t('댓글이 작성된 포스트로 직접 이동합니다.').'">'; 314 } 279 315 echo '<span class="entry-title">'. htmlspecialchars($comment['title']) .'</span>'; 280 316 … … 283 319 } 284 320 285 echo empty($comment['parent']) ? '' : '<span class="explain">' . _f('%1 님의 댓글에 대한 댓글',$comment['parentName']) . '</span>';321 echo empty($comment['parent']) ? '' : '<span class="explain">' . (isset($tabsClass['guestbook']) ? _f('%1 님의 방명록에 대한 댓글',$comment['parentName']) : _f('%1 님의 댓글에 대한 댓글',$comment['parentName'])) . '</span>'; 286 322 echo "</a>"; 287 323 ?> … … 289 325 <?php echo htmlspecialchars($comment['comment']);?> 290 326 <?php 291 if(empty($comment['parent'])) echo '<span class="reply"><a href="#" onclick="commentComment('.$comment['id'].');return false;">'. _t('이 댓글에 댓글을 씁니다.').'</a></span>';327 if(empty($comment['parent'])) echo '<span class="reply"><a href="#" onclick="commentComment('.$comment['id'].');return false;">'.(isset($tabsClass['guestbook']) ? _t('이 방명록에 답글을 씁니다') : _t('이 댓글에 댓글을 씁니다.')).'</a></span>'; 292 328 ?> 293 329 </td>
