Skip to content

Commit

Permalink
refs #1249
Browse files Browse the repository at this point in the history
  * 메뉴 동작시 디자인 교정
  * 방명록 출력 부분 추가
  * TODO
   * 방명록 페이징 부분 및 메세지 국제화
   * 댓글 / 트랙백 목록 출력 부분 추가
  • Loading branch information
inureyes committed Nov 28, 2009
1 parent 642fd16 commit a0b8591
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
11 changes: 8 additions & 3 deletions interface/i/guestbook/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
requireView('iphoneView');
?>
<div id="guestbook_<?php echo time();?>" title="Guestbook" selected="false">
<?php
printIphoneCommentView(0);
?>
<?php
printIphoneGuestbookView(0);
?>
<fieldset class="navi margin-top10">
<?php
printIphoneNavigation($entry, false, false, $paging);
?>
</fieldset>
</div>
20 changes: 14 additions & 6 deletions library/view/iphoneView.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function printIphoneHtmlHeader($title = '') {
</div>
<div class="toolbar shortcut">
<ul>
<li><a href="<?php echo $blogURL;?>"><?php echo _text('글목록');?></a></li>
<li><a href="<?php echo $blogURL;?>" onclick="window.location.href='<?php echo $blogURL;?>'"><?php echo _text('글목록');?></a></li>
<li><a href="<?php echo $blogURL;?>/comment"><?php echo _text('댓글');?></a></li>
<li><a href="<?php echo $blogURL;?>/trackback"><?php echo _text('트랙백');?></a></li>
<li><a href="<?php echo $blogURL;?>/guestbook"><?php echo _text('방명록');?></a></li>
Expand Down Expand Up @@ -427,12 +427,16 @@ function printIphoneTrackbackView($entryId) {
}
}

function printIphoneCommentView($entryId) {
global $blogURL;
$comments = getComments($entryId);
function printIphoneCommentView($entryId, $page = null) {
global $blogURL, $blogid, $skinSetting, $paging;
if(!is_null($page)) {
list($comments, $paging) = getCommentsWithPagingForGuestbook($blogid, $page, $skinSetting['commentsOnGuestbook']);
} else {
$comments = getComments($entryId);
}
if (count($comments) == 0) {
?>
<p>&nbsp;<?php echo _text('댓글이 없습니다');?></p>
<p>&nbsp;<?php echo ($entryId == 0 ? _text('방명록이 없습니다') : _text('댓글이 없습니다'));?></p>
<?php
} else {
foreach ($comments as $commentItem) {
Expand All @@ -444,7 +448,7 @@ function printIphoneCommentView($entryId) {
(<?php echo Timestamp::format5($commentItem['written']);?>)
</span>
<span class="right">
<a href="<?php echo $blogURL;?>/comment/comment/<?php echo $commentItem['id'];?>"><?php echo _text('댓글에 댓글 달기');?></a> :
<a href="<?php echo $blogURL;?>/comment/comment/<?php echo $commentItem['id'];?>"><?php echo ($entryId == 0 ? _text('방명록에 댓글 달기') : _text('댓글에 댓글 달기'));?></a> :
<a href="<?php echo $blogURL;?>/comment/delete/<?php echo $commentItem['id'];?>"><?php echo _text('지우기');?></a>
</span>
</li>
Expand Down Expand Up @@ -476,6 +480,10 @@ function printIphoneCommentView($entryId) {
printIphoneCommentFormView($entryId, 'Write comment', 'comment');
}

function printIphoneGuestbookView() {
return printIphoneCommentView(0, 1);
}

function printIphoneCommentFormView($entryId, $title, $actionURL) {
global $blogURL;
?>
Expand Down
8 changes: 7 additions & 1 deletion resources/style/iphone/iphone.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@ body > .shortcut {

body > .shortcut ul {
margin-top:0;
padding-left:0 !important;
}

body > .shortcut ul li{
display:inline;
padding-right:15px;
padding-right:0;
}

body > .shortcut ul li a {
font-size:0.8em !important;
display:inline !important;
}

.button {
Expand Down

0 comments on commit a0b8591

Please # to comment.