1<?php
2/* Copyright (C) 2015      Laurent Destailleur  <eldy@users.sourceforge.net>
3 * Copyright (C) 2015      Frederic France      <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19/**
20 *  \file           htdocs/core/lib/receiptprinter.lib.php
21 *  \ingroup        printing
22 *  \brief          Library for receipt printer functions
23 */
24
25
26
27/**
28 *  Define head array for tabs of receipt printer setup pages
29 *
30 *  @param  string  $mode       Mode
31 *  @return                     Array of head
32 */
33function receiptprinteradmin_prepare_head($mode)
34{
35	global $langs, $conf;
36
37	$h = 0;
38	$head = array();
39
40	$head[$h][0] = DOL_URL_ROOT."/admin/receiptprinter.php?mode=config";
41	$head[$h][1] = $langs->trans("ListPrinters");
42	$head[$h][2] = 'config';
43	$h++;
44
45	$head[$h][0] = DOL_URL_ROOT."/admin/receiptprinter.php?mode=template";
46	$head[$h][1] = $langs->trans("SetupReceiptTemplate");
47	$head[$h][2] = 'template';
48	$h++;
49
50	if ($mode == 'test')
51	{
52		$head[$h][0] = DOL_URL_ROOT."/admin/receiptprinter.php?mode=test";
53		$head[$h][1] = $langs->trans("TargetedPrinter");
54		$head[$h][2] = 'test';
55		$h++;
56	}
57
58
59	//$object=new stdClass();
60
61	// Show more tabs from modules
62	// Entries must be declared in modules descriptor with line
63	// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__');   to add new tab
64	// $this->tabs = array('entity:-tabname);                                                   to remove a tab
65	//complete_head_from_modules($conf,$langs,$object,$head,$h,'printingadmin');
66
67	//complete_head_from_modules($conf,$langs,$object,$head,$h,'printing','remove');
68
69	return $head;
70}
71