Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50768 - website/public_html/beta/doc
From: daniel_james_at_[hidden]
Date: 2009-01-25 12:40:24


Author: danieljames
Date: 2009-01-25 12:40:24 EST (Sun, 25 Jan 2009)
New Revision: 50768
URL: http://svn.boost.org/trac/boost/changeset/50768

Log:
Add a library's categories to its information on the documentation list.
Text files modified:
   website/public_html/beta/doc/libraries.php | 23 +++++++++++++++++++++--
   1 files changed, 21 insertions(+), 2 deletions(-)

Modified: website/public_html/beta/doc/libraries.php
==============================================================================
--- website/public_html/beta/doc/libraries.php (original)
+++ website/public_html/beta/doc/libraries.php 2009-01-25 12:40:24 EST (Sun, 25 Jan 2009)
@@ -107,6 +107,16 @@
   if ($lib['autolink'] == 'true') { $p[] = 'Automatic linking'; }
   print ($p ? implode(', ',$p) : ' ');
 }
+function libcategories($lib, $categories)
+{
+ $first = true;
+ foreach($lib['category'] as $category_name) {
+ if(!$first) echo ', ';
+ $first = false;
+ category_link($category_name, $categories[$category_name]);
+ }
+ if($first) echo ' ';
+}
 
 function option_link($description, $field, $value)
 {
@@ -141,6 +151,12 @@
   }
 }
 
+function category_link($name, $category) {
+ option_link(
+ isset($category['title']) ? $category['title'] : $name,
+ 'view', 'category_'.$name);
+}
+
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -220,6 +236,10 @@
                     <dt>Build&nbsp;&amp;&nbsp;Link</dt>
 
                     <dd><?php libbuildlink($lib); ?></dd>
+
+ <dt>Categories</dt>
+
+ <dd><?php libcategories($lib, $libs->categories); ?></dd>
                   </dl>
                 </dd><!-- --><?php } ?>
               </dl>
@@ -230,8 +250,7 @@
               <?php
               foreach ($libs->get_categorized($sort_value, 'library_filter') as $name => $category) {
                 if(count($category['libraries'])) {?>
- <h3><?php option_link(isset($category['title']) ? $category['title'] : $name,
- 'view', 'category_'.$name); ?></h3>
+ <h3><?php category_link($name, $category); ?></h3>
                   <ul><?php foreach ($category['libraries'] as $lib) { ?>
                     <li><?php libref($lib); ?>: <?php echo ($lib['description'] ? htmlentities($lib['description'],ENT_NOQUOTES,'UTF-8') : '&nbsp;'); ?></li>
                   <?php } ?></ul>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk