/[cvs]/nfo/php/libs/org.netfrag.glib/utils/links.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/utils/links.php

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

revision 1.9 by joko, Wed Jun 25 23:42:15 2003 UTC revision 1.10 by joko, Tue Jul 1 23:43:29 2003 UTC
# Line 3  Line 3 
3   * $Id$   * $Id$
4   *   *
5   * $Log$   * $Log$
6     * Revision 1.10  2003/07/01 23:43:29  joko
7     * + target-option for link::job
8     * + link::jobmonitor
9     *
10   * Revision 1.9  2003/06/25 23:42:15  joko   * Revision 1.9  2003/06/25 23:42:15  joko
11   * trying to switch from "ap" completely to "t"   * trying to switch from "ap" completely to "t"
12   *   *
# Line 146  class link { Line 150  class link {
150      // 2003-06-03: css-style handling      // 2003-06-03: css-style handling
151      $css_style = $args[_css_style];      $css_style = $args[_css_style];
152      unset($args[_css_style]);      unset($args[_css_style]);
153        
154        // 2003-07-02: target handling
155        $target = $args[_target];
156        unset($args[_target]);
157    
158      $here = array( t => $_REQUEST[t] );      $here = array( t => $_REQUEST[t] );
159      if ($_REQUEST[ap]) { $here[ap] = $_REQUEST[ap]; }      if ($_REQUEST[ap]) { $here[ap] = $_REQUEST[ap]; }
160            
161      $args = php::array_join_merge($here, $args);      $args = php::array_join_merge($here, $args);
162      $query_string = url::query($args);      $query_string = url::query($args);
163      $link = html_a($query_string, $caption);      $link = html_a($query_string, $caption, NULL, $target);
164            
165      // 2003-06-03: css-style handling      // 2003-06-03: css-style handling
166      if ($css_style) {      if ($css_style) {
# Line 162  class link { Line 170  class link {
170      return $link;      return $link;
171    }    }
172        
173    function job($jobname, $type = "search") {    function job($jobname, $type = "search", $target = '') {
174      if ($type == 'search') {      if ($type == 'search') {
175        $link = link::here( "[$jobname]", array( t => 'Jobs', q => $jobname ) );        $link = link::here( "[$jobname]", array( t => 'Jobs', q => $jobname, _target => $target ) );
176      } elseif ($type == 'run') {      } elseif ($type == 'run') {
177        $link = link::here( "[$jobname]", array( t => 'Jobs', job => $jobname, action => 'run' ) );        $link = link::here( "[$jobname]", array( t => 'Jobs', job => $jobname, action => 'run', _target => $target ) );
178      }      }
179      return $link;      return $link;
180    }    }
181    
182      function jobmonitor($jobname, $type = "search") {
183        return link::job($jobname, $type, '_blank');
184      }
185    
186  }  }
187    
188    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed