";
+}
+
function meta_forward($forward_to, $params="")
{
global $Ajax;
@@ -59,12 +102,32 @@ function meta_forward($forward_to, $params="")
}
//-----------------------------------------------------------------------------------
+// Find and replace hotkey marker.
+// if $clean == true marker is removed and clean label is returned
+// (for use in wiki help system), otherwise result is array of label
+// with underlined hotkey letter and access property string.
+//
+function access_string($label, $clean=false)
+{
+ $access = '';
+ $slices = array();
+
+ if (preg_match('/(.*)&([a-zA-Z0-9])(.*)/', $label, $slices))
+ {
+ $label = $clean ? $slices[1].$slices[2].$slices[3] :
+ $slices[1].''.$slices[2].''.$slices[3];
+ $access = " accesskey='".strtoupper($slices[2])."'";
+ }
+
+ $label = str_replace( '&&', '&', $label);
+
+ return $clean ? $label : array($label, $access);
+}
function hyperlink_back($center=true)
{
if ($center)
echo "";
- //echo ""._("Back")."\n";
echo " "._("Back")." \n";
if ($center)
echo "";
@@ -73,9 +136,13 @@ function hyperlink_back($center=true)
function hyperlink_no_params($target, $label, $center=true)
{
+ $id = default_focus();
+ $pars = access_string($label);
+ if ($target == '')
+ $target = $_SERVER['PHP_SELF'];
if ($center)
echo " ";
- echo "$label\n";
+ echo "$pars[0]\n";
if ($center)
echo "";
}
@@ -87,13 +154,67 @@ function hyperlink_no_params_td($target, $label)
echo " | \n";
}
+function viewer_link($label, $url='', $class='', $id='', $icon=null)
+{
+ global $path_to_root;
+
+ if ($class != '')
+ $class = " class='$class'";
+
+ if ($id != '')
+ $class = " id='$id'";
+
+ if ($url != "")
+ {
+ $pars = access_string($label);
+ if (user_graphic_links() && $icon)
+ $pars[0] = set_icon($icon, $pars[0]);
+ $preview_str = "$pars[0]";
+ }
+ else
+ $preview_str = $label;
+
+ return $preview_str;
+}
+
+function menu_link($url, $label, $id=null)
+{
+
+ $id = default_focus($id);
+ $pars = access_string($label);
+ return "";
+}
+
+function submenu_option($title, $url, $id=null)
+{
+ global $path_to_root;
+ display_note(menu_link($path_to_root . $url, $title, $id));
+ echo '
';
+}
+
+function submenu_view($title, $type, $number, $id=null)
+{
+ display_note(get_trans_view_str($type, $number, $title, false, 'menu_option', $id));
+ echo '
';
+}
+
+function submenu_print($title, $type, $number, $id=null)
+{
+ display_note(print_document_link($number, $title, true, $type, false, 'menu_option', $id));
+ echo '
';
+}
//-----------------------------------------------------------------------------------
function hyperlink_params($target, $label, $params, $center=true)
{
+ $id = default_focus();
+
+ $pars = access_string($label);
+ if ($target == '')
+ $target = $_SERVER['PHP_SELF'];
if ($center)
echo "
";
- echo "$label\n";
+ echo "$pars[0]\n";
if ($center)
echo "";
}
@@ -109,9 +230,12 @@ function hyperlink_params_td($target, $label, $params)
function hyperlink_params_separate($target, $label, $params, $center=false)
{
+ $id = default_focus();
+
+ $pars = access_string($label);
if ($center)
echo "
";
- echo "$label\n";
+ echo "$pars[0]\n";
if ($center)
echo "";
}
@@ -139,48 +263,18 @@ function alt_table_row_color(&$k)
}
}
-function table_section_title($msg)
+function table_section_title($msg, $colspan=2)
{
- echo "