Work on import module
This commit is contained in:
parent
ed55bd35f0
commit
99985ad417
@ -112,12 +112,6 @@ if (sizeof($export->array_export_code))
|
||||
print '</tr>';
|
||||
|
||||
}
|
||||
|
||||
print '<tr class="total"><td class="total" colspan="2" align="center">';
|
||||
print '<form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"';
|
||||
print ($user->rights->export->creer?'':' disabled="true"');
|
||||
print '></form>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -125,6 +119,14 @@ else
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
if (sizeof($export->array_export_code))
|
||||
{
|
||||
print '<center><form action="'.DOL_URL_ROOT.'/exports/export.php?leftmenu=export"><input type="submit" class="button" value="'.$langs->trans("NewExport").'"';
|
||||
print ($user->rights->export->creer?'':' disabled="true"');
|
||||
print '></form></center>';
|
||||
}
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
@ -19,11 +19,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/fourn/commande/history.php
|
||||
\ingroup commande
|
||||
\brief Fiche commande
|
||||
\version $Id$
|
||||
*/
|
||||
* \file htdocs/fourn/commande/history.php
|
||||
* \ingroup commande
|
||||
* \brief Fiche commande
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/fourn.lib.php");
|
||||
@ -126,10 +126,10 @@ if ($id > 0 || ! empty($ref))
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Author").'</td>';
|
||||
print '<td align="left">'.$langs->trans("Comment").'</td>';
|
||||
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Date").'</td>';
|
||||
print '<td class="liste_titre">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="liste_titre" align="center">'.$langs->trans("Author").'</td>';
|
||||
print '<td class="liste_titre" align="left">'.$langs->trans("Comment").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$sql = "SELECT l.fk_statut, l.datelog as dl, l.comment, u.rowid, u.login, u.firstname, u.name";
|
||||
@ -156,14 +156,14 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td width="20%">'.dol_print_date($db->jdate($obj->dl),"dayhour")."</td>\n";
|
||||
|
||||
// Statut
|
||||
print '<td width="100px" nowrap="1">'.$commande->LibStatut($obj->fk_statut,4)."</td>\n";
|
||||
print '<td nowrap="nowrap">'.$commande->LibStatut($obj->fk_statut,4)."</td>\n";
|
||||
|
||||
// User
|
||||
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
|
||||
print img_object($langs->trans("ShowUser"),'user').' '.$obj->login.'</a></td>';
|
||||
|
||||
// Comment
|
||||
print '<td width="100px" nowrap="1" title="'.dol_escape_htmltag($obj->comment).'">'.dol_trunc($obj->comment,48)."</td>\n";
|
||||
print '<td nowrap="nowrap" title="'.dol_escape_htmltag($obj->comment).'">'.dol_trunc($obj->comment,48)."</td>\n";
|
||||
|
||||
print '</tr>';
|
||||
|
||||
@ -181,8 +181,8 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Commande non trouvée */
|
||||
print "Commande inexistante ou accés refusé";
|
||||
/* Commande non trouvee */
|
||||
print "Commande inexistante ou acces refuse";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -108,8 +108,6 @@ if (sizeof($import->array_import_code))
|
||||
print '</tr>';
|
||||
|
||||
}
|
||||
|
||||
print '<tr class="total"><td class="total" colspan="2" align="center"><form action="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import"><input type="submit" class="button" value="'.$langs->trans("NewImport").'"></form></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -117,6 +115,11 @@ else
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
if (sizeof($import->array_import_code))
|
||||
{
|
||||
print '<center><form action="'.DOL_URL_ROOT.'/imports/import.php?leftmenu=import"><input type="submit" class="button" value="'.$langs->trans("NewImport").'"></form></center>';
|
||||
}
|
||||
|
||||
/*
|
||||
// Affiche les profils d'exports
|
||||
$sql = "SELECT rowid, label, public, fk_user, ".$db->pdate("datec");
|
||||
|
||||
@ -807,14 +807,14 @@ class MenuLeft {
|
||||
//$newmenu->add(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->rights->export->lire);
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_MODULE_IMPORT))
|
||||
if (! empty($conf->import->enabled))
|
||||
{
|
||||
$langs->load("exports");
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/index.php?leftmenu=import",$langs->trans("FormatedImport"),0, $user->rights->import->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/import.php?leftmenu=import",$langs->trans("NewImport"),1, $user->rights->import->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/index.php?leftmenu=import",$langs->trans("FormatedImport"),0, $user->rights->import->run);
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/import.php?leftmenu=import",$langs->trans("NewImport"),1, $user->rights->import->run);
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_MODULE_DOMAIN))
|
||||
if (! empty($conf->domain->enabled))
|
||||
{
|
||||
$langs->load("domains");
|
||||
$newmenu->add(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("DomainNames"),0, $user->rights->domain->read);
|
||||
|
||||
@ -812,14 +812,14 @@ class MenuLeft {
|
||||
$newmenu->add(DOL_URL_ROOT."/exports/export.php?leftmenu=export",$langs->trans("NewExport"),1, $user->rights->export->creer);
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_MODULE_IMPORT))
|
||||
if (! empty($conf->import->enabled))
|
||||
{
|
||||
$langs->load("exports");
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/index.php?leftmenu=import",$langs->trans("FormatedImport"),0, $user->rights->import->lire);
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/import.php?leftmenu=import",$langs->trans("NewImport"),1, $user->rights->import->creer);
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/index.php?leftmenu=import",$langs->trans("FormatedImport"),0, $user->rights->import->run);
|
||||
$newmenu->add(DOL_URL_ROOT."/imports/import.php?leftmenu=import",$langs->trans("NewImport"),1, $user->rights->import->run);
|
||||
}
|
||||
|
||||
if (! empty($conf->global->MAIN_MODULE_DOMAIN))
|
||||
if (! empty($conf->domaine->enabled))
|
||||
{
|
||||
$langs->load("domains");
|
||||
$newmenu->add(DOL_URL_ROOT."/domain/index.php?leftmenu=export",$langs->trans("DomainNames"),0, $user->rights->domain->read);
|
||||
|
||||
@ -262,8 +262,8 @@ insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`,
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->mailing->enabled', 'auguria', 'left', 3902__+MAX_llx_menu__, 'tools', '', 3900__+MAX_llx_menu__, '/comm/mailing/liste.php?leftmenu=mailing', 'List', 1, 'mails', '$user->rights->mailing->lire', '', 0, 1, __ENTITY__);
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->export->enabled', 'auguria', 'left', 4100__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'FormatedExport', 0, 'exports', '$user->rights->export->lire', '', 2, 2, __ENTITY__);
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->export->enabled', 'auguria', 'left', 4101__+MAX_llx_menu__, 'tools', '', 4100__+MAX_llx_menu__, '/exports/export.php?leftmenu=export', 'NewExport', 1, 'exports', '$user->rights->export->creer', '', 2, 0, __ENTITY__);
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->import->enabled', 'auguria', 'left', 4130__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/imports/index.php?leftmenu=import', 'FormatedImport', 0, 'exports', '$user->rights->import->lire', '', 2, 2, __ENTITY__);
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->import->enabled', 'auguria', 'left', 4131__+MAX_llx_menu__, 'tools', '', 4130__+MAX_llx_menu__, '/imports/import.php?leftmenu=import', 'NewImport', 1, 'exports', '$user->rights->import->creer', '', 2, 0, __ENTITY__);
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->import->enabled', 'auguria', 'left', 4130__+MAX_llx_menu__, 'tools', '', 8__+MAX_llx_menu__, '/imports/index.php?leftmenu=import', 'FormatedImport', 0, 'exports', '$user->rights->import->run', '', 2, 2, __ENTITY__);
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->import->enabled', 'auguria', 'left', 4131__+MAX_llx_menu__, 'tools', '', 4130__+MAX_llx_menu__, '/imports/import.php?leftmenu=import', 'NewImport', 1, 'exports', '$user->rights->import->run', '', 2, 0, __ENTITY__);
|
||||
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->adherent->enabled', 'auguria', 'left', 4200__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=members&mainmenu=members', 'Members', 0, 'members', '$user->rights->adherent->lire', '', 2, 0, __ENTITY__);
|
||||
insert into `llx_menu` (`enabled`, `menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position, entity) values ('$conf->adherent->enabled', 'auguria', 'left', 4201__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/fiche.php?action=create', 'NewMember', 1, 'members', '$user->rights->adherent->creer', '', 2, 0, __ENTITY__);
|
||||
|
||||
@ -77,19 +77,21 @@ class modExport extends DolibarrModules
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'export';
|
||||
$r=0;
|
||||
|
||||
$this->rights[1][0] = 1201;
|
||||
$this->rights[1][1] = 'Lire les exports';
|
||||
$this->rights[1][2] = 'r';
|
||||
$this->rights[1][3] = 1;
|
||||
$this->rights[1][4] = 'lire';
|
||||
|
||||
$this->rights[2][0] = 1202;
|
||||
$this->rights[2][1] = 'Creer/modifier un export';
|
||||
$this->rights[2][2] = 'w';
|
||||
$this->rights[2][3] = 0;
|
||||
$this->rights[2][4] = 'creer';
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1201;
|
||||
$this->rights[$r][1] = 'Lire les exports';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'lire';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1202;
|
||||
$this->rights[$r][1] = 'Creer/modifier un export';
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'creer';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -77,14 +77,14 @@ class modImport extends DolibarrModules
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights_class = 'import';
|
||||
$r=0;
|
||||
|
||||
/*
|
||||
$this->rights[1][0] = 1401;
|
||||
$this->rights[1][1] = 'Réaliser un import';
|
||||
$this->rights[1][2] = 'r';
|
||||
$this->rights[1][3] = 1;
|
||||
$this->rights[1][4] = 'lire';
|
||||
*/
|
||||
$r++;
|
||||
$this->rights[$r][0] = 1251;
|
||||
$this->rights[$r][1] = 'Run mass imports of external data (data load)';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'run';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -133,8 +133,8 @@ function llxHeader($head = '', $title='', $help_url='')
|
||||
if (! empty($conf->global->MAIN_MODULE_IMPORT))
|
||||
{
|
||||
$langs->load("exports");
|
||||
$menu->add(DOL_URL_ROOT."/imports/index.php?leftmenu=import",$langs->trans("FormatedImport"),0,$user->rights->import->lire);
|
||||
$menu->add(DOL_URL_ROOT."/imports/import.php?leftmenu=import",$langs->trans("NewImport"),1,$user->rights->import->creer);
|
||||
$menu->add(DOL_URL_ROOT."/imports/index.php?leftmenu=import",$langs->trans("FormatedImport"),0,$user->rights->import->run);
|
||||
$menu->add(DOL_URL_ROOT."/imports/import.php?leftmenu=import",$langs->trans("NewImport"),1,$user->rights->import->run);
|
||||
}
|
||||
|
||||
if ($user->rights->user->user->lire || $user->admin)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user