Skip to content

Commit

Permalink
refs #1249
Browse files Browse the repository at this point in the history
  * 방명록 메뉴에 페이징 기능 추가
  • Loading branch information
inureyes committed Nov 28, 2009
1 parent a0b8591 commit 525b66e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 4 additions & 2 deletions interface/i/guestbook/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
define('__TEXTCUBE_IPHONE__', true);
require ROOT . '/library/preprocessor.php';
requireView('iphoneView');
if(isset($suri['id'])) $page = $suri['id'];
else $page = 1;
?>
<div id="guestbook_<?php echo time();?>" title="Guestbook" selected="false">
<?php
printIphoneGuestbookView(0);
printIphoneGuestbookView($page);
?>
<fieldset class="navi margin-top10">
<?php
printIphoneNavigation($entry, false, false, $paging);
printIphoneNavigation(0, false, false, $paging);
?>
</fieldset>
</div>
15 changes: 10 additions & 5 deletions library/view/iphoneView.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,22 +363,27 @@ function printIphoneHtmlFooter() {

function printIphoneNavigation($entry, $jumpToComment = true, $jumpToTrackback = true, $paging = null) {
global $suri, $blogURL;
if($entry == 0) {
$mode = 'guestbook';
} else {
$mode = 'entry';
}
?>
<ul class="content navigation">
<?php
if (isset($paging['prev'])) {
?>
<li><a href="<?php echo $blogURL;?>/entry/<?php echo $paging['prev'];?>" accesskey="1"><?php echo _text('이전 글 보기');?></a></li>
<li><a href="<?php echo $blogURL.'/'.$mode;?>/<?php echo $paging['prev'];?>" accesskey="1"><?php echo _text('이전 페이지');?></a></li>
<?php
}
if (isset($paging['next'])) {
?>
<li><a href="<?php echo $blogURL;?>/entry/<?php echo $paging['next'];?>" accesskey="2"><?php echo _text('다음 글 보기');?></a></li>
<li><a href="<?php echo $blogURL.'/'.$mode;?>/<?php echo $paging['next'];?>" accesskey="2"><?php echo _text('다음 페이지');?></a></li>
<?php
}
if (!isset($paging)) {
?>
<li><a href="<?php echo $blogURL;?>/entry/<?php echo $entry['id'];?>" accesskey="3"><?php echo _text('글 보기');?></a></li>
<li><a href="<?php echo $blogURL.'/'.$mode;?>/<?php echo $entry['id'];?>" accesskey="3"><?php echo _text('글 보기');?></a></li>
<?php
}
if ($jumpToComment) {
Expand Down Expand Up @@ -480,8 +485,8 @@ function printIphoneCommentView($entryId, $page = null) {
printIphoneCommentFormView($entryId, 'Write comment', 'comment');
}

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

function printIphoneCommentFormView($entryId, $title, $actionURL) {
Expand Down

0 comments on commit 525b66e

Please # to comment.