/[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.7 by joko, Tue May 13 16:21:13 2003 UTC revision 1.9 by joko, Wed Jun 25 23:42:15 2003 UTC
# Line 3  Line 3 
3   * $Id$   * $Id$
4   *   *
5   * $Log$   * $Log$
6     * Revision 1.9  2003/06/25 23:42:15  joko
7     * trying to switch from "ap" completely to "t"
8     *
9     * Revision 1.8  2003/06/06 04:24:10  joko
10     * test: function here
11     *
12   * Revision 1.7  2003/05/13 16:21:13  joko   * Revision 1.7  2003/05/13 16:21:13  joko
13   * + function url::view_as, filter, parent   * + function url::view_as, filter, parent
14   * added comments/docu   * added comments/docu
# Line 104  class link { Line 110  class link {
110    }    }
111    
112    function topic($topic_name, $args = array()) {    function topic($topic_name, $args = array()) {
113        // 2003-0x-xx: css-class handling
114      $css_class = $args[_css_class];      $css_class = $args[_css_class];
115      unset($args[_css_class]);      unset($args[_css_class]);
116      $query_string = linkargs::topic($topic_name, $args);      $query_string = linkargs::topic($topic_name, $args);
# Line 120  class link { Line 127  class link {
127    }    }
128        
129    function action($action_name, $args = array()) {    function action($action_name, $args = array()) {
130        
131        // new as of 2003-05-29
132        $here = array( t => $_REQUEST[t], ap => $_REQUEST[ap] );
133        $args = php::array_join_merge($here, $args);
134        
135      $query_string = linkargs::action($action_name, $args);      $query_string = linkargs::action($action_name, $args);
136      return html_a($query_string, "[$action_name]");      return html_a($query_string, "[$action_name]");
137    }    }
# Line 129  class link { Line 141  class link {
141      return html_a($url, $caption);      return html_a($url, $caption);
142    }    }
143    
144      function here($caption, $args = array()) {
145        
146        // 2003-06-03: css-style handling
147        $css_style = $args[_css_style];
148        unset($args[_css_style]);
149        
150        $here = array( t => $_REQUEST[t] );
151        if ($_REQUEST[ap]) { $here[ap] = $_REQUEST[ap]; }
152        
153        $args = php::array_join_merge($here, $args);
154        $query_string = url::query($args);
155        $link = html_a($query_string, $caption);
156        
157        // 2003-06-03: css-style handling
158        if ($css_style) {
159          $link->set_style($css_style);
160        }
161        
162        return $link;
163      }
164      
165      function job($jobname, $type = "search") {
166        if ($type == 'search') {
167          $link = link::here( "[$jobname]", array( t => 'Jobs', q => $jobname ) );
168        } elseif ($type == 'run') {
169          $link = link::here( "[$jobname]", array( t => 'Jobs', job => $jobname, action => 'run' ) );
170        }
171        return $link;
172      }
173    
174  }  }
175    
176    
# Line 319  class url { Line 361  class url {
361      // REMEMBER: This is an hard coded fallback !!      // REMEMBER: This is an hard coded fallback !!
362      //  Normaly args passed in as 'additional' should explicit used!      //  Normaly args passed in as 'additional' should explicit used!
363      $final = array();      $final = array();
364      $defaults = array( 'ap' => 'explorer', 'ecl' => 'content' );      //$defaults = array( 'ap' => 'explorer', 'ecl' => 'content' );
365        $defaults = array( 't' => 'DataBrowser', 'ecl' => 'content' );
366      $location = array( 'ecdlk' => 'rpc' );      $location = array( 'ecdlk' => 'rpc' );
367      $args = array( 'ecmod' => 'view', 'ect' => 'data',  );      $args = array( 'ecmod' => 'view', 'ect' => 'data',  );
368            

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

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