Fix make page of categories of web site working
This commit is contained in:
parent
76823d3e39
commit
43103f40a5
@ -64,9 +64,7 @@ class Categorie extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* @var array ID mapping from type string
|
||||
*
|
||||
* @note This array should be removed in future, once previous constants are moved to the string value. Deprecated
|
||||
* @var array Table of mapping between type string and ID used for field 'type' in table llx_categories
|
||||
*/
|
||||
protected $MAP_ID = array(
|
||||
'product' => 0,
|
||||
@ -79,7 +77,8 @@ class Categorie extends CommonObject
|
||||
'user' => 7,
|
||||
'bank_line' => 8,
|
||||
'warehouse' => 9,
|
||||
'actioncomm' => 10
|
||||
'actioncomm' => 10,
|
||||
'website_page' => 11
|
||||
);
|
||||
|
||||
/**
|
||||
@ -1113,6 +1112,10 @@ class Categorie extends CommonObject
|
||||
global $conf, $langs;
|
||||
|
||||
if (!is_numeric($type)) $type = $this->MAP_ID[$type];
|
||||
if (is_null($type)) {
|
||||
$this->error = 'BadValueForParameterType';
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (is_string($markafterid))
|
||||
{
|
||||
|
||||
@ -54,6 +54,7 @@ $typetext = $type;
|
||||
if ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans('AccountsCategoriesArea');
|
||||
elseif ($type == Categorie::TYPE_WAREHOUSE) $title = $langs->trans('StocksCategoriesArea');
|
||||
elseif ($type == Categorie::TYPE_ACTIONCOMM) $title = $langs->trans('ActionCommCategoriesArea');
|
||||
elseif ($type == Categorie::TYPE_WEBSITE_PAGE) $title = $langs->trans('WebsitePagesCategoriesArea');
|
||||
else $title = $langs->trans(ucfirst($type).'sCategoriesArea');
|
||||
|
||||
$arrayofjs = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||
@ -69,8 +70,6 @@ if (!empty($user->rights->categorie->creer)) {
|
||||
|
||||
print load_fiche_titre($title, $newcardbutton, 'object_category');
|
||||
|
||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
|
||||
@ -88,20 +87,9 @@ print '<td colspan="3">'.$langs->trans("Search").'</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="oddeven nohover"><td>';
|
||||
print $langs->trans("Name").':</td><td><input class="flat inputsearch" type="text" name="catname" value="'.$catname.'"/></td><td><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
|
||||
/*
|
||||
// faire une rech dans une sous categorie uniquement
|
||||
print '<tr '.$bc[0].'><td>';
|
||||
print $langs->trans("SubCatOf").':</td><td>';
|
||||
|
||||
print $form->select_all_categories('','subcatof');
|
||||
print '</td>';
|
||||
print '<td><input type="submit" class="button" value="'.$langs->trans ("Search").'"></td></tr>';
|
||||
*/
|
||||
|
||||
print '</table></form>';
|
||||
|
||||
|
||||
//print '</td><td valign="top" width="70%">';
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
@ -138,7 +126,6 @@ if ($catname || $id > 0)
|
||||
else print ' ';
|
||||
|
||||
|
||||
//print '</td></tr></table>';
|
||||
print '</div></div></div>';
|
||||
|
||||
print '<div class="fichecenter"><br>';
|
||||
|
||||
@ -86,4 +86,5 @@ ByDefaultInList=By default in list
|
||||
ChooseCategory=Choose category
|
||||
StocksCategoriesArea=Warehouses Categories Area
|
||||
ActionCommCategoriesArea=Events Categories Area
|
||||
WebsitePagesCategoriesArea=Page-Container Categories Area
|
||||
UseOrOperatorForCategories=Use or operator for categories
|
||||
|
||||
Loading…
Reference in New Issue
Block a user