Changeset - f046223bfea8
[Not reviewed]
default
0 1 0
Ethan Zonca - 15 years ago 2011-02-01 20:24:02
ez@ethanzonca.com
Ordering fix for saved schedules
1 file changed with 7 insertions and 6 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -271,20 +271,20 @@ class page
 
      if ($clean_urls) {
 
        $process_php_s = '';
 
      }
 

	
 
      echo '<h3>Saved Schedules:</h3>';
 

	
 
      $hidden = '';
 
      $hidden = 'hidden';
 
      $numsaved = count($session['saved']);
 
      $count = 0;
 
      $output = '';
 

	
 
      foreach($session['saved'] as $key => $name) {
 
	if($count == 4) {
 
	  $output .= '<div id="showMore"><a href="#">More...</a></div>';
 
	  $hidden = 'hidden';
 
	if($count == $numsaved - 4) {
 
	  $hidden = '';
 
	}
 
        else {
 
	  $output =  '<p class="' . $hidden . '">'  . PHP_EOL
 
	           . '  <a href="' . $process_php_s . $key . '" title="View schedule #' . $key . '">#' . $key . "</a>:" 
 
	           . htmlentities($name)
 
	           . ' <a href="input.php?s=' . $key . '">edit</a>'
 
@@ -292,14 +292,15 @@ class page
 
	           . ' <br /><br />' . PHP_EOL
 
	           . '</p>' . PHP_EOL . $output;
 
	  }
 
          $count++;
 
	}
 
	echo $output;
 
	echo '<div id="showLess"><a href="#">Less...</a></div>' . PHP_EOL;
 
	echo '</div>' . PHP_EOL;
 
	echo '<div id="showLess"><a href="#">Less...</a></div>' . PHP_EOL
 
           . '<div id="showMore"><a href="#">More...</a></div>' . PHP_EOL
 
	   . '</div>' . PHP_EOL;
 
      }
 
  }
 

	
 
  /**
 
   * \brief
 
   *   Display a list of schools the user might be from.
0 comments (0 inline, 0 general)