Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16203/include
Modified Files:
functions_images.inc.php
Log Message:
- Add prettier (non-javascript and non-fake button) navigation links
Index: functions_images.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_images.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- functions_images.inc.php 15 Dec 2004 19:58:04 -0000 1.19
+++ functions_images.inc.php 26 Dec 2004 18:34:33 -0000 1.20
@@ -780,8 +780,9 @@
$extraParems .= 'serendipity[sortorder]['. $k .']='. $v .'&';
}
- $left = '<input type="button" value="<<<" onclick="location.href=\'?'. $extraParems .'serendipity[page]=' . ($page-1) . '\';" '. (($start <= 0) ? 'disabled' : '') .'>' . "\n";
- $right = '<input type="button" value=">>>" onclick="location.href=\'?'. $extraParems .'serendipity[page]=' . ($page+1) . '\';" '. (($totalImages < $start+$perPage) ? 'disabled' : '') .'>' . "\n";
+ $pages = ceil($totalImages/$perPage);
+ $linkPrevious = '?'. $extraParems .'serendipity[page]=' . ($page-1);
+ $linkNext = '?'. $extraParems .'serendipity[page]=' . ($page+1);
$sort_order = serendipity_getImageFields();
@@ -871,8 +872,14 @@
<td colspan="<?php echo floor($lineBreak); ?>">
<table width="100%">
<tr>
- <td><?php echo $left; ?></td>
- <td align="right"><?php echo $right; ?></td>
+ <td>
+ <?php if ( $page != 1 && $page <= $pages ) { ?>
+ <a href="<?php echo $linkPrevious ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/previous.png') ?>" /><?php echo PREVIOUS ?></a>
+ <?php } ?></td>
+ <td align="right">
+ <?php if ($page != $pages ) { ?>
+ <a href="<?php echo $linkNext ?>" class="serendipityIconLinkRight"><?php echo NEXT ?><img src="<?php echo serendipity_getTemplateFile('admin/img/next.png') ?>" /></a>
+ <?php } ?></td>
</tr>
</table>
</td>
@@ -952,17 +959,6 @@
}
?>
</tr>
-
- <tr>
- <td colspan="<?php echo floor($lineBreak); ?>">
- <table width="100%">
- <tr>
- <td><?php echo $left; ?></td>
- <td align="right"><?php echo $right; ?></td>
- </tr>
- </table>
- </td>
- </tr>
</table>
<?php
}
|