mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
icons to add entry, especialy for hook_addressbook_view, which is no longer showing the Add-Button at the end
This commit is contained in:
parent
5c431fd271
commit
76ba59071a
@ -209,10 +209,10 @@
|
|||||||
return $referer;
|
return $referer;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_list( ) {
|
function get_list($for_include=0) {
|
||||||
global $phpgw,$phpgw_info;
|
global $phpgw,$phpgw_info;
|
||||||
global $cat_filter,$cat_id,$sort,$order,$query,$start,$filter;
|
global $cat_filter,$cat_id,$sort,$order,$query,$start,$filter;
|
||||||
global $action,$addr_id,$proj_id,$info_id,$for_include;
|
global $action,$addr_id,$proj_id,$info_id;
|
||||||
|
|
||||||
if (!$for_include) {
|
if (!$for_include) {
|
||||||
$phpgw->common->phpgw_header();
|
$phpgw->common->phpgw_header();
|
||||||
@ -231,30 +231,23 @@
|
|||||||
'sort' => $sort,'order' => $order,'query' => $query,
|
'sort' => $sort,'order' => $order,'query' => $query,
|
||||||
'start' => $start,'filter' => $filter,'cat_id' => $cat_id
|
'start' => $start,'filter' => $filter,'cat_id' => $cat_id
|
||||||
);
|
);
|
||||||
$common_hidden_vars = $html->input_hidden($hidden_vars);
|
|
||||||
|
|
||||||
global $PHP_SELF,$QUERY_STRING; // set referer for form
|
global $PHP_SELF,$QUERY_STRING; // set referer for form
|
||||||
$referer = $PHP_SELF.($QUERY_STRING ? '?'.$QUERY_STRING : '');
|
$referer = $PHP_SELF.($QUERY_STRING ? '?'.$QUERY_STRING : '');
|
||||||
$common_hidden_vars .= $html->input_hidden('referer',$referer);
|
|
||||||
|
|
||||||
if ($action)
|
|
||||||
$common_hidden_vars .= $html->input_hidden('action',$action);
|
|
||||||
|
|
||||||
|
$action_vars = array( 'action' => 'new' );
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'sp': // Sub-List
|
case 'sp': // Sub-List
|
||||||
$common_hidden_vars .= $html->input_hidden('info_id',$info_id);
|
$action_vars = array('action'=>'sp','info_id'=>$info_id);
|
||||||
$t->set_var(lang_info_action,lang('Info Log - Subprojects from'));
|
$t->set_var(lang_info_action,lang('Info Log - Subprojects from'));
|
||||||
break;
|
break;
|
||||||
case 'proj':
|
case 'proj':
|
||||||
$common_hidden_vars .=$html->input_hidden(array(
|
$action_vars += array('id_project' => $proj_id,'proj_id' => $proj_id);
|
||||||
'id_project' => $proj_id, 'proj_id' => $proj_id));
|
|
||||||
$proj = $this->bo->readProj($proj_id);
|
$proj = $this->bo->readProj($proj_id);
|
||||||
$t->set_var(lang_info_action,lang('Info Log').' - '.
|
$t->set_var(lang_info_action,lang('Info Log').' - '. $proj['title']);
|
||||||
$proj['title']);
|
|
||||||
break;
|
break;
|
||||||
case 'addr':
|
case 'addr':
|
||||||
$common_hidden_vars .= $html->input_hidden(array(
|
$action_vars += array( 'id_addr' => $addr_id, 'addr_id' => $addr_id );
|
||||||
'id_addr' => $addr_id, 'addr_id' => $addr_id ));
|
|
||||||
$addr = $this->bo->readAddr($addr_id);
|
$addr = $this->bo->readAddr($addr_id);
|
||||||
$t->set_var(lang_info_action,lang('Info Log').' - '.
|
$t->set_var(lang_info_action,lang('Info Log').' - '.
|
||||||
$this->bo->addr2name($addr));
|
$this->bo->addr2name($addr));
|
||||||
@ -264,15 +257,27 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$t->set_var($this->setStyleSheet( ));
|
$t->set_var($this->setStyleSheet( ));
|
||||||
global $REQUEST_URI;
|
|
||||||
$t->set_var(actionurl,$html->link('/index.php',
|
if (!$for_include)
|
||||||
$this->menuaction('edit')+array( 'action' => 'new')));
|
$t->set_var('add_button',$html->form_1button('add_button','Add',
|
||||||
|
$hidden_vars+$action_vars+array('referer'=>$referer),
|
||||||
|
'/index.php',$this->menuaction('edit')));
|
||||||
|
|
||||||
$t->set_var('cat_form',$html->link('/index.php',$this->menuaction()));
|
$t->set_var('cat_form',$html->link('/index.php',$this->menuaction()));
|
||||||
$t->set_var('lang_category',lang('Category'));
|
$t->set_var('lang_category',lang('Category'));
|
||||||
$t->set_var('lang_all',lang('All'));
|
$t->set_var('lang_all',lang('All'));
|
||||||
$t->set_var('lang_select',lang('Select'));
|
$t->set_var('lang_select',lang('Select'));
|
||||||
$t->set_var('categories',$this->categories->formated_list('select','all',$cat_id,'True'));
|
$t->set_var('categories',$this->categories->formated_list('select',
|
||||||
$t->set_var(common_hidden_vars,$common_hidden_vars);
|
'all',$cat_id,'True'));
|
||||||
|
$icons = array( 'task' => lang('add Task'),
|
||||||
|
'phone' => lang('add Phonecall'),
|
||||||
|
'note' => lang('add Note') );
|
||||||
|
$add_icons = lang('Add').':';
|
||||||
|
while (list($type,$lang) = each($icons)) {
|
||||||
|
$add_icons .= $html->a_href($this->icon('type',$type),'/index.php',
|
||||||
|
$this->menuaction('edit')+$action_vars+array('type'=>$type));
|
||||||
|
}
|
||||||
|
$t->set_var('add_icons',$add_icons);
|
||||||
|
|
||||||
// ===========================================
|
// ===========================================
|
||||||
// list header variable template-declarations
|
// list header variable template-declarations
|
||||||
@ -355,9 +360,9 @@
|
|||||||
// nextmatch variable template-declarations
|
// nextmatch variable template-declarations
|
||||||
// ===========================================
|
// ===========================================
|
||||||
if (!$for_include) {
|
if (!$for_include) {
|
||||||
$next_matchs = $this->nextmatchs->show_tpl('/index.php',$start,
|
$next_matchs = $this->nextmatchs->show_tpl('/index.php',$start,$total,
|
||||||
$total,"menuaction=infolog.uiinfolog.get_list&order=$order&filter=$filter&sort=$sort&query=$query&action=$action$nm_extra&info_id=$info_id&cat_id=$cat_id",
|
"&menuaction=infolog.uiinfolog.get_list&action=$action$nm_extra&".
|
||||||
'95%',$phpgw_info['theme']['th_bg']);
|
"info_id=$info_id&cat_id=$cat_id",'95%',$phpgw_info['theme']['th_bg']);
|
||||||
$t->set_var('next_matchs',$next_matchs);
|
$t->set_var('next_matchs',$next_matchs);
|
||||||
if ($total > $maxmatchs)
|
if ($total > $maxmatchs)
|
||||||
$t->set_var('next_matchs_end',$next_matchs);
|
$t->set_var('next_matchs_end',$next_matchs);
|
||||||
@ -440,20 +445,13 @@
|
|||||||
// =========================================================
|
// =========================================================
|
||||||
|
|
||||||
if ($action && !$for_include) {
|
if ($action && !$for_include) {
|
||||||
$t->set_var('lang_back2projects', '<br>'.
|
$t->set_var('back2projects',
|
||||||
$html->a_href(lang('Back to Projectlist'),'/index.php',
|
$html->form_1button('back','Back to Projectlist','',
|
||||||
$this->menuaction()+array('filter' => $filter)));
|
'/index.php',$this->menuaction()+array('filter'=>$filter)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================
|
|
||||||
// template declaration for Add Form
|
|
||||||
// ============================================
|
|
||||||
|
|
||||||
$t->set_var(lang_add,lang('Add'));
|
|
||||||
$t->pfp('out','info_list_t',true);
|
$t->pfp('out','info_list_t',true);
|
||||||
|
|
||||||
// -------------- end Add form declaration ------------------------
|
|
||||||
|
|
||||||
if (!$for_include)
|
if (!$for_include)
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
global $ab_id;
|
global $ab_id;
|
||||||
//echo "<p>hook_addressbook_view(ab_id=$ab_id)</p>";
|
//echo "<p>hook_addressbook_view(ab_id=$ab_id)</p>";
|
||||||
|
|
||||||
global $addr_id,$action,$for_include;
|
global $addr_id,$action;
|
||||||
$addr_id = $ab_id; $action='addr'; $for_include = True;
|
$addr_id = $ab_id; $action='addr';
|
||||||
$infolog = CreateObject('infolog.uiinfolog');
|
$infolog = CreateObject('infolog.uiinfolog');
|
||||||
$infolog->get_list();
|
$infolog->get_list(True);
|
||||||
|
|
||||||
$phpgw_info['flags']['currentapp'] = $save_app;
|
$phpgw_info['flags']['currentapp'] = $save_app;
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
{info_css}
|
{info_css}
|
||||||
<span class=action>{lang_info_action}</span><br>
|
<table width=98%><tr><td>
|
||||||
|
<span class=action>{lang_info_action}</span>
|
||||||
|
</td><td align=right>
|
||||||
|
<span class=action>{add_icons}</span>
|
||||||
|
</td></tr></table>
|
||||||
<hr noshade width="98%" align="center" size="1">
|
<hr noshade width="98%" align="center" size="1">
|
||||||
<center>
|
<center>
|
||||||
<!-- BEGIN projdetails -->
|
<!-- BEGIN projdetails -->
|
||||||
@ -25,7 +29,8 @@
|
|||||||
<!-- END projdetails -->
|
<!-- END projdetails -->
|
||||||
|
|
||||||
<!-- BEGIN cat_selection -->
|
<!-- BEGIN cat_selection -->
|
||||||
<TABLE><tr valign="middle"><td>
|
<table><tr valign="middle">
|
||||||
|
<td>
|
||||||
<form method="POST" name="cat" action="{cat_form}">
|
<form method="POST" name="cat" action="{cat_form}">
|
||||||
{lang_category}
|
{lang_category}
|
||||||
<select name="cat_filter" onChange="this.form.submit();">
|
<select name="cat_filter" onChange="this.form.submit();">
|
||||||
@ -36,7 +41,8 @@
|
|||||||
</form>
|
</form>
|
||||||
</td><td>
|
</td><td>
|
||||||
{total_matchs}
|
{total_matchs}
|
||||||
</td></tr></table>
|
</td>
|
||||||
|
</tr></table>
|
||||||
<!-- END cat_selection -->
|
<!-- END cat_selection -->
|
||||||
|
|
||||||
{next_matchs}
|
{next_matchs}
|
||||||
@ -69,21 +75,13 @@
|
|||||||
<!-- END info_list -->
|
<!-- END info_list -->
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{next_matchs_end}
|
{next_matchs_end}
|
||||||
|
|
||||||
<form method="POST" action="{actionurl}">
|
|
||||||
{common_hidden_vars}
|
|
||||||
<table width="95%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td width="4%" align="right">
|
|
||||||
<input type="submit" name="Add" value="{lang_add}">
|
|
||||||
</td>
|
|
||||||
<td width="72%"> </td>
|
|
||||||
<td width="24%"> </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">{lang_back2projects}<!-- {lang_matrixviewhref} --></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
|
<table><tr><td>
|
||||||
|
{add_button}
|
||||||
|
</td><td>
|
||||||
|
{back2projects}
|
||||||
|
</td></tr></table>
|
||||||
|
Loading…
Reference in New Issue
Block a user