forked from extern/egroupware
Moved nextmatchs over to template blocks
This commit is contained in:
parent
11ebee5fa9
commit
263a96944f
@ -30,11 +30,23 @@
|
||||
{
|
||||
var $maxmatches;
|
||||
var $action;
|
||||
var $template;
|
||||
|
||||
function nextmatchs()
|
||||
{
|
||||
global $phpgw_info, $menuaction;
|
||||
|
||||
$this->template = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$this->template->set_file(array(
|
||||
'_nextmatchs' => 'nextmatchs.tpl'
|
||||
));
|
||||
$this->template->set_block('_nextmatchs','nextmatchs');
|
||||
$this->template->set_block('_nextmatchs','filter');
|
||||
$this->template->set_block('_nextmatchs','form');
|
||||
$this->template->set_block('_nextmatchs','icon');
|
||||
$this->template->set_block('_nextmatchs','link');
|
||||
$this->template->set_block('_nextmatchs','search');
|
||||
|
||||
if(isset($phpgw_info['user']['preferences']['common']['maxmatchs']) &&
|
||||
intval($phpgw_info['user']['preferences']['common']['maxmatchs']) > 0)
|
||||
{
|
||||
@ -54,7 +66,6 @@
|
||||
/*!
|
||||
@function set_icon
|
||||
@abstract ?
|
||||
@param $tpl ?
|
||||
@param $align ?
|
||||
@param $img_src ?
|
||||
@param $label ?
|
||||
@ -62,24 +73,17 @@
|
||||
function set_icon($align,$img,$label)
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_file(
|
||||
Array(
|
||||
'link' => 'nextmatchs_link.tpl'
|
||||
)
|
||||
);
|
||||
|
||||
$var = Array(
|
||||
$var = array(
|
||||
'align' => $align,
|
||||
'img' => $phpgw->common->image('phpgwapi',$img),
|
||||
'label' => lang($label)
|
||||
);
|
||||
$tpl->set_var($var);
|
||||
return $tpl->fp('out','link');
|
||||
$this->template->set_var($var);
|
||||
return $this->template->fp('out','link');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
@function page
|
||||
@abstract ?
|
||||
@ -99,7 +103,6 @@
|
||||
/*!
|
||||
@function set_link
|
||||
@abstract ?
|
||||
@param $tpl ?
|
||||
@param $img_src ?
|
||||
@param $label ?
|
||||
@param $link ?
|
||||
@ -109,13 +112,6 @@
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_file(
|
||||
Array(
|
||||
'_out' => 'nextmatchs_form.tpl'
|
||||
)
|
||||
);
|
||||
|
||||
$hidden = '';
|
||||
while(list($var,$value) = each($extravars))
|
||||
{
|
||||
@ -125,16 +121,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
$var = Array(
|
||||
$var = array(
|
||||
'align' => $align,
|
||||
'action' => ($this->action?$this->page():$phpgw->link($link)),
|
||||
'hidden' => $hidden,
|
||||
'img' => $phpgw->common->image('phpgwapi',$img)
|
||||
);
|
||||
$tpl->set_var($var);
|
||||
return $tpl->fp('out','_out');
|
||||
$this->template->set_var($var);
|
||||
return $this->template->fp('_out','form');
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
@function show_tpl
|
||||
@abstract ?
|
||||
@ -152,14 +149,8 @@
|
||||
{
|
||||
global $filter, $qfield, $start, $order, $sort, $query, $phpgw, $phpgw_info;
|
||||
$start = $localstart;
|
||||
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_file(
|
||||
Array(
|
||||
'nextmatchs' => 'nextmatchs.tpl'
|
||||
)
|
||||
);
|
||||
|
||||
$var = Array(
|
||||
$var = array(
|
||||
'form_action' => ($this->action?$this->page($extra):$phpgw->link($sn, $extra)),
|
||||
'filter_value' => $filter,
|
||||
'qfield' => $qfield,
|
||||
@ -174,8 +165,8 @@
|
||||
'filter' => ($filter_obj?$this->filter($filter_obj,$yours):''),
|
||||
'right' => $this->right($sn,$start,$total,$extra)
|
||||
);
|
||||
$tpl->set_var($var);
|
||||
return $tpl->fp('out','nextmatchs');
|
||||
$this->template->set_var($var);
|
||||
return $this->template->fp('out','nextmatchs');
|
||||
}
|
||||
|
||||
function split_extras($extravars,$extradata)
|
||||
@ -322,12 +313,6 @@
|
||||
function search($search_obj=0)
|
||||
{
|
||||
global $query;
|
||||
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_file(
|
||||
Array(
|
||||
'search' => 'nextmatchs_search.tpl'
|
||||
)
|
||||
);
|
||||
|
||||
$_query = stripslashes($query);
|
||||
|
||||
@ -338,14 +323,14 @@
|
||||
$_query = ereg_replace('"','',$_query);
|
||||
}
|
||||
|
||||
$var = Array(
|
||||
$var = array(
|
||||
'query_value' => stripslashes($_query),
|
||||
'searchby' => $this->searchby($search_obj),
|
||||
'lang_search' => lang('Search')
|
||||
);
|
||||
|
||||
$tpl->set_var($var);
|
||||
return $tpl->fp('out','search');
|
||||
$this->template->set_var($var);
|
||||
return $this->template->fp('out','search');
|
||||
} /* search() */
|
||||
|
||||
/*!
|
||||
@ -408,12 +393,6 @@
|
||||
function filter($filter_obj,$yours=0)
|
||||
{
|
||||
global $filter, $phpgw, $phpgw_info;
|
||||
$tpl = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_file(
|
||||
Array(
|
||||
'filter' => 'nextmatchs_filter.tpl'
|
||||
)
|
||||
);
|
||||
|
||||
if (is_long($filter_obj))
|
||||
{
|
||||
@ -458,11 +437,11 @@
|
||||
}
|
||||
|
||||
$str = '<select name="filter" onChange="this.form.submit()">'."\n" . $str . '</select>'."\n";
|
||||
$tpl->set_var('select',$str);
|
||||
$tpl->set_var('lang_filter',lang('Filter'));
|
||||
$this->template->set_var('select',$str);
|
||||
$this->template->set_var('lang_filter',lang('Filter'));
|
||||
}
|
||||
|
||||
return $tpl->fp('out','filter');
|
||||
return $this->template->fp('out','filter');
|
||||
} /* filter() */
|
||||
|
||||
/*!
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!-- BEGIN nextmatchs -->
|
||||
<form method="POST" action="{form_action}">
|
||||
<input type="hidden" name="filter" value="{filter_value}">
|
||||
<input type="hidden" name="qfield" value="{qfield_value}">
|
||||
@ -17,4 +18,37 @@
|
||||
|
||||
<br>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
<!-- END nextmatchs -->
|
||||
|
||||
|
||||
<!-- BEGIN filter -->
|
||||
<td>{select}<noscript><input type="submit" value="{lang_filter}"></noscript></td>
|
||||
<!-- END filter -->
|
||||
|
||||
|
||||
<!-- BEGIN form -->
|
||||
<td width="2%" align="{align}">
|
||||
<form method="POST" action="{action}">
|
||||
{hidden} <input type="image" src="{img}" border="0">
|
||||
<form>
|
||||
</td>
|
||||
<!-- END form -->
|
||||
|
||||
|
||||
<!-- BEGIN icon -->
|
||||
<td width="2%" align="{align}"> {_link}</td>
|
||||
<!-- END icon -->
|
||||
|
||||
|
||||
<!-- BEGIN link -->
|
||||
<td width="2%" align="{align}"><img src="{img}" border="0" width="12" height="12" alt="{label}"></td>
|
||||
<!-- END link -->
|
||||
|
||||
|
||||
<!-- BEGIN search -->
|
||||
<td>
|
||||
<input type="text" name="query" value="{query_value}"> {searchby}<input type="submit" name="Search" value="{lang_search}">
|
||||
</td>
|
||||
<!-- END search -->
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
<td>{select}<noscript><input type="submit" value="{lang_filter}"></noscript></td>
|
@ -1,5 +0,0 @@
|
||||
<td width="2%" align="{align}">
|
||||
<form method="POST" action="{action}">
|
||||
{hidden} <input type="image" src="{img}" border="0">
|
||||
<form>
|
||||
</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"> {link}</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"><img src="{img}" border="0" width="12" height="12" alt="{label}"></td>
|
@ -1,3 +0,0 @@
|
||||
<td>
|
||||
<input type="text" name="query" value="{query_value}"> {searchby}<input type="submit" name="Search" value="{lang_search}">
|
||||
</td>
|
@ -1,67 +1,91 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML>
|
||||
<!-- BEGIN login_form -->
|
||||
<HEAD>
|
||||
<html>
|
||||
<head>
|
||||
<title>{website_title}</title>
|
||||
</head>
|
||||
<body bgcolor="AAAAAA" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" rightmargin="0" leftmargin="0" background="phpgwapi/templates/idsociety/images/content_spacer_middle.gif">
|
||||
|
||||
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<META name="AUTHOR" content="phpGroupWare http://www.phpgroupware.org">
|
||||
<META NAME="description" CONTENT="phpGroupWare login screen">
|
||||
<META NAME="keywords" CONTENT="phpGroupWare login screen">
|
||||
|
||||
<TITLE>{website_title} - Login</TITLE>
|
||||
</HEAD>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<BODY bgcolor="#FFFFFF">
|
||||
<p> </p>
|
||||
<CENTER>{lang_message}</CENTER>
|
||||
<p> </p>
|
||||
|
||||
<TABLE bgcolor="000000" border="0" cellpadding="0" cellspacing="0" width="40%" align="CENTER">
|
||||
<TR>
|
||||
<TD>
|
||||
<TABLE border="0" width="100%" bgcolor="486591" cellpadding="2" cellspacing="1">
|
||||
<TR bgcolor="486591">
|
||||
<TD align="LEFT" valign="MIDDLE">
|
||||
<A href="http://www.phpgroupware.org"><img src="phpgwapi/templates/{template_set}/images/logo.gif" alt="phpGroupWare" border="0"></a>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR bgcolor="e6e6e6">
|
||||
<TD valign="BASELINE">
|
||||
<form method="post" action="{login_url}">
|
||||
<table border="0" align="CENTER" width="40%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" background="phpgwapi/templates/idsociety/images/middle_line_spacer.gif">
|
||||
<tr>
|
||||
<td colspan="3" align="center">{cd}</td>
|
||||
</tr>
|
||||
|
||||
<FORM method="post" action="{login_url}">
|
||||
<TABLE border="0" align="CENTER" bgcolor="486591" width="100%" cellpadding="0" cellspacing="0">
|
||||
<TR bgcolor="e6e6e6">
|
||||
<TD colspan="2" align="CENTER">
|
||||
{cd}
|
||||
</TD>
|
||||
</TR>
|
||||
<TR bgcolor="e6e6e6">
|
||||
<TD align="RIGHT"><font color="000000">{lang_username}: </font></TD>
|
||||
<TD><input name="login" value="{cookie}"></TD>
|
||||
</TR>
|
||||
<TR bgcolor="e6e6e6">
|
||||
<TD align="RIGHT"><font color="000000">{lang_password}: </font></TD>
|
||||
<TD><input name="passwd" type="password"></TD>
|
||||
</TR>
|
||||
<TR bgcolor="e6e6e6">
|
||||
<TD colspan="2" align="CENTER">
|
||||
<input type="submit" value="{lang_login}" name="submit">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR bgcolor="e6e6e6">
|
||||
<TD colspan="2" align="RIGHT">
|
||||
<tr>
|
||||
<td align="right"><font color="000000">{lang_username}: </font></td>
|
||||
<td align="right"><input name="login" value="{cookie}"></td>
|
||||
<td width="20%" rowspan="3"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"><font color="000000">{lang_password}: </font></td>
|
||||
<td align="right"><input name="passwd" type="password"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<input name="submit" type="image" src="phpgwapi/templates/idsociety/images/login.gif" border="0">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td align="right">
|
||||
<font color="000000" size="-1">{version}</font>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</FORM>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- END login_form -->
|
||||
</HTML>
|
||||
<!--
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
||||
<tr>
|
||||
<td height="30%" valign="bottom" align="center" background="img/main_spacer.gif">
|
||||
<form method="post" action="{login_url}">
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="60%" height="69" align="center">
|
||||
<tr>
|
||||
<td align="right" valign="top" background="img/middle_line_spacer.gif">
|
||||
<img src="img/little_spacer.gif">
|
||||
<br><font size="2" color="#FFFFFF" face="verdana, arial, times new roman">{lang_username}</font>
|
||||
<input name="login" value="{cookie}">
|
||||
|
||||
<br><font size="2" color="#FFFFFF" face="verdana, arial, times new roman">{lang_password}</font>
|
||||
<input name="passwd" type="password">
|
||||
|
||||
<br><input name="submit" type="image" src="phpgwapi/templates/idsociety/images/login.gif" border="0">
|
||||
</td>
|
||||
</form>
|
||||
<td width="5" background="img/middle_line_spacer.gif"><spacer type="block" width="5"></spacer></TD>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="70%" background="img/main_spacer.gif"><spacer type="block" width="1"></spacer>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table> -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!-- END login_form -->
|
@ -1 +0,0 @@
|
||||
<td>{select}<noscript><input type="submit" value="{lang_filter}"></noscript></td>
|
@ -1,5 +0,0 @@
|
||||
<td width="2%" align="{align}">
|
||||
<form method="POST" action="{action}">
|
||||
{hidden} <input type="image" src="{img}" border="0">
|
||||
<form>
|
||||
</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"> {link}</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"><img src="{img}" border="0" width="12" height="12" alt="{label}"></td>
|
@ -1,3 +0,0 @@
|
||||
<td>
|
||||
<input type="text" name="query" value="{query_value}"> {searchby}<input type="submit" name="Search" value="{lang_search}">
|
||||
</td>
|
@ -1 +0,0 @@
|
||||
<td>{select}<noscript><input type="submit" value="{lang_filter}"></noscript></td>
|
@ -1,5 +0,0 @@
|
||||
<td width="2%" align="{align}">
|
||||
<form method="POST" action="{action}">
|
||||
{hidden} <input type="image" src="{img}" border="0">
|
||||
<form>
|
||||
</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"> {link}</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"><img src="{img}" border="0" width="12" height="12" alt="{label}"></td>
|
@ -1,3 +0,0 @@
|
||||
<td>
|
||||
<input type="text" name="query" value="{query_value}"> {searchby}<input type="submit" name="Search" value="{lang_search}">
|
||||
</td>
|
@ -1 +0,0 @@
|
||||
<td>{select}<noscript><input type="submit" value="{lang_filter}"></noscript></td>
|
@ -1,5 +0,0 @@
|
||||
<td width="2%" align="{align}">
|
||||
<form method="POST" action="{action}">
|
||||
{hidden} <input type="image" src="{img}" border="0">
|
||||
<form>
|
||||
</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"> {link}</td>
|
@ -1 +0,0 @@
|
||||
<td width="2%" align="{align}"><img src="{img}" border="0" width="12" height="12" alt="{label}"></td>
|
@ -1,3 +0,0 @@
|
||||
<td>
|
||||
<input type="text" name="query" value="{query_value}"> {searchby}<input type="submit" name="Search" value="{lang_search}">
|
||||
</td>
|
Loading…
Reference in New Issue
Block a user