MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005072ATutorContentpublic2012-09-14 20:002013-02-11 12:03
Reportergreg 
Assigned Togreg 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.0.3 
Target Version2.1Fixed in Version2.1.1 
Summary0005072: Glossary paging code
Description
The code used to display the glossary paging on the glossary tools page (/mods/_core/glossary/tools/index.php) is different than the code used for the manage glossary page (mods/_core/glossary/index.php). Since the functionality is the same it seems to me that the code and hence the HTML formatting should be the same. Here’s the code I’m talking about:

/mods/_core/glossary/tools/index.php:
if($num_pages > 1) {
echo _AT('page').': ';
for ($i=1; $i<=$num_pages; $i++) {
if ($i == $page) {
echo ''.$i.'';
} else {
echo ' | '.$_SERVER['PHP_SELF'].'?p='.$i.'#list';
}
}
}

mods/_core/glossary/index.php:
<?php
if($num_pages > 1):
?>
<div class="paging">

    <?php for ($i=1; $i<=$num_pages; $i++): ?>

  • <?php if ($i == $page) : ?>
    <a class="current" href="<?php echo url_rewrite('mods/_core/glossary/index.php?p='.$i.'#list'); ?>"><?php echo $i; ?></a>
    <?php else: ?>
    <a href="<?php echo url_rewrite('mods/_core/glossary/index.php?p='.$i.'#list'); ?>"><?php echo $i; ?></a>
    <?php endif; ?>

  • <?php endfor; ?>

</div>
<?php endif; ?>

Here’s the code I wrote to make it consistent on my site:
if($num_pages > 1) {
echo '<div class="paging">';
echo ''._AT('page').':
    ';
    for ($i=1; $i<=$num_pages; $i++) {
    echo '
  • ';
    if ($i == $page) {
    echo ''.$_SERVER['PHP_SELF'].'?p='.$i.'#list
  • ';
    }
    echo '
</div>';
}
Steps To Reproducehttp://atutor.ca/view/3/23551/1.html [^]
TagsNo tags attached.
Affects versionSVN
SVN Revision# 638a0ff..8c7084e master -> master
Attached Files

- Relationships

-  Notes
(0005962)
greg (administrator)
2013-02-05 14:53

adjust pager to match the one students see
(0005991)
greg (administrator)
2013-02-11 12:03

Closed for 2.1.1

- Issue History
Date Modified Username Field Change
2012-09-14 20:00 greg New Issue
2012-09-14 20:00 greg Status new => assigned
2012-09-14 20:00 greg Assigned To => greg
2013-02-05 14:53 greg SVN Revision# => 638a0ff..8c7084e master -> master
2013-02-05 14:53 greg Note Added: 0005962
2013-02-05 14:53 greg Status assigned => resolved
2013-02-05 14:53 greg Fixed in Version => 2.1.1
2013-02-05 14:53 greg Resolution open => fixed
2013-02-11 12:03 greg Note Added: 0005991
2013-02-11 12:03 greg Status resolved => closed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker