/[drupal]/contributions/themes/internet_jobs/links.tpl.php
ViewVC logotype

Diff of /contributions/themes/internet_jobs/links.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Tue Jan 30 22:22:11 2007 UTC revision 1.3, Fri Jan 25 22:11:48 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  $delimiter = "&nbsp;&nbsp;";  
3  $path = $base_path . path_to_theme();    $delimiter = "&nbsp;&nbsp;";
4  $link_count = count($links);    $path = base_path() . path_to_theme();
5  $current = 1;  
6  foreach ( $links as $lnk ) {    $output = '';
7      // Print the link  
8      if ($lnk['title'] == 'Add new comment') {    if (count($links) > 0) {
9        print "<img alt=\"\" src=" . $path . "/images/comment.gif>";      //$output = '<ul'. drupal_attributes($attributes) .'>';
10    
11        $num_links = count($links);
12        $i = 1;
13    
14        foreach ($links as $key => $link) {
15          $class = $key;
16    
17          // Add first, last and active classes to the list of links to help out themers.
18          if ($i == 1) {
19            $class .= ' first';
20          }
21          if ($i == $num_links) {
22            $class .= ' last';
23          }
24          if (isset($link['href']) && $link['href'] == $_GET['q']) {
25            $class .= ' active';
26          }
27          //$output .= '<li class="'. $class .'">';
28    
29          if ($link['title'] == 'Add new comment') {
30                    $output .= "<img alt=\"\" src=" . $path . "/images/comment.gif>" ;
31              }
32              if ($link['title'] == 'Read more') {
33                    $output .= "<img alt=\"\" src=" . $path . "/images/more.gif>";
34              }
35    
36          if (isset($link['href'])) {
37            // Pass in $link as $options, they share the same keys.
38            $output .= l($link['title'], $link['href'], $link);
39          }
40          else if (!empty($link['title'])) {
41            // Some links are actually not links, but we wrap these in <span> for adding title and class attributes
42            if (empty($link['html'])) {
43              $link['title'] = check_plain($link['title']);
44            }
45            $span_attributes = '';
46            if (isset($link['attributes'])) {
47              $span_attributes = drupal_attributes($link['attributes']);
48            }
49            $output .= '<span'. $span_attributes .'>'. $link['title'] .'</span>';
50          }
51    
52          $i++;
53          $output .= $delimiter;
54          //$output .= "</li>\n";
55      }      }
56      if ($lnk['title'] == 'Read more') {  
57        print "<img alt=\"\" src=" . $path . "/images/more.gif>";      //$output .= '</ul>';
58      }    }
59      print l($lnk['title'], $lnk['href'],  
60      $lnk['attributes'], $lnk['query'],    print $output;
     $lnk['fragment'], FALSE, $lnk['html']);  
         // Only print the delimiter if not the last link  
     if ( $current < $link_count ) {  
         print $delimiter;  
     }  
     $current++;  
 }  
61  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2