Qual: Remove a useless action button to save one click.

This commit is contained in:
Laurent Destailleur 2013-10-26 16:34:31 +02:00
parent 966f135316
commit 1ae27b0977

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
@ -168,15 +168,13 @@ $picto=($product->type==1?'service':'product');
dol_fiche_head($head, 'subproduct', $titre, 0, $picto); dol_fiche_head($head, 'subproduct', $titre, 0, $picto);
if ($id || $ref) if ($id > 0 || ! empty($ref))
{ {
if ($result) /* if ($result)
{ {
if ($action <> 'edit' && $action <> 'search' && $action <> 're-edit') if ($action <> 'edit' && $action <> 'search' && $action <> 're-edit')
{ {
/* // mode visu
* En mode visu
*/
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -262,11 +260,11 @@ if ($id || $ref)
dol_fiche_end(); dol_fiche_end();
} }
} }
*/
/* /*
* Fiche en mode edition * Fiche en mode edition
*/ */
if (($action == 'edit' || $action == 'search' || $action == 're-edit') && ($user->rights->produit->creer || $user->rights->service->creer)) if ($user->rights->produit->lire || $user->rights->service->lire)
{ {
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -350,13 +348,17 @@ if ($id || $ref)
dol_fiche_end(); dol_fiche_end();
// Form with product to add
if ((empty($action) || $action == 'view' || $action == 'edit' || $action == 'search' || $action == 're-edit') && ($user->rights->produit->creer || $user->rights->service->creer))
{
print '<br>'; print '<br>';
$rowspan=1; $rowspan=1;
if (! empty($conf->categorie->enabled)) $rowspan++; if (! empty($conf->categorie->enabled)) $rowspan++;
print_fiche_titre($langs->trans("ProductToAddSearch"),'',''); print_fiche_titre($langs->trans("ProductToAddSearch"),'','');
print '<form action="'.DOL_URL_ROOT.'/product/composition/fiche.php?id='.$id.'" method="post">'; print '<form action="'.DOL_URL_ROOT.'/product/composition/fiche.php?id='.$id.'" method="POST">';
print '<table class="border" width="100%"><tr><td>'; print '<table class="border" width="100%"><tr><td>';
print '<table class="nobordernopadding">'; print '<table class="nobordernopadding">';
@ -380,7 +382,10 @@ if ($id || $ref)
print '</table>'; print '</table>';
print '</td></td></table>'; print '</td></td></table>';
print '</form>'; print '</form>';
}
// List of products
if ($action == 'search') if ($action == 'search')
{ {
print '<br>'; print '<br>';
@ -491,7 +496,7 @@ if ($id || $ref)
/* Barre d'action */ /* Barre d'action */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
/*
print "\n<div class=\"tabsAction\">\n"; print "\n<div class=\"tabsAction\">\n";
if ($action == '') if ($action == '')
@ -503,10 +508,9 @@ if ($action == '')
} }
print "\n</div>\n"; print "\n</div>\n";
*/
llxFooter(); llxFooter();
$db->close(); $db->close();
?> ?>