Merge pull request #10058 from frederic34/patch-2
correct link and avoid warning in resource list
This commit is contained in:
commit
ecb6ea9151
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
|
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -51,6 +52,9 @@ $extrafields = new ExtraFields($db);
|
|||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
||||||
|
if (! is_array($search_array_options)) {
|
||||||
|
$search_array_options = array();
|
||||||
|
}
|
||||||
$search_ref=GETPOST("search_ref");
|
$search_ref=GETPOST("search_ref");
|
||||||
$search_type=GETPOST("search_type");
|
$search_type=GETPOST("search_type");
|
||||||
|
|
||||||
@ -196,7 +200,7 @@ if($ret == -1) {
|
|||||||
$newcardbutton='';
|
$newcardbutton='';
|
||||||
if ($user->rights->resource->write)
|
if ($user->rights->resource->write)
|
||||||
{
|
{
|
||||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuResourceAdd').'</span>';
|
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/resource/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuResourceAdd').'</span>';
|
||||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||||
$newcardbutton.= '</a>';
|
$newcardbutton.= '</a>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user