diff --git a/htdocs/cache.manifest b/htdocs/cache.manifest
index 9119290941b..a3d1b1c554f 100644
--- a/htdocs/cache.manifest
+++ b/htdocs/cache.manifest
@@ -33,5 +33,5 @@ NETWORK:
# If the browser is unable to retrieve the original content, the fallback resource will be used.
# In the example above, we display a static image in case the dynamic one is unavailable.
FALLBACK:
-#/ public/offline.php
-#theme/amarok/img/* theme/eldy/img/
+#/ public/notice.php
+#theme/eldy/img/* theme/md/img/*
diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php
index bc5641b2593..cc60f9feb13 100644
--- a/htdocs/core/lib/expensereport.lib.php
+++ b/htdocs/core/lib/expensereport.lib.php
@@ -56,6 +56,18 @@ function expensereport_prepare_head($object)
$head[$h][2] = 'documents';
$h++;
+ if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
+ {
+ $nbNote = 0;
+ if(!empty($object->note_private)) $nbNote++;
+ if(!empty($object->note_public)) $nbNote++;
+ $head[$h][0] = DOL_URL_ROOT.'/expensereport/note.php?id='.$object->id;
+ $head[$h][1] = $langs->trans('Notes');
+ if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.'';
+ $head[$h][2] = 'note';
+ $h++;
+ }
+
$head[$h][0] = DOL_URL_ROOT . '/expensereport/info.php?id=' . $object->id;
$head[$h][1] = $langs->trans("Info");
$head[$h][2] = 'info';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 1e0e4239763..01c23ce70f6 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2585,7 +2585,7 @@ function img_warning($titlealt = 'default', $morealt = '')
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
- return img_picto($titlealt, 'warning.png', 'class="pictowarning"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): ''));
+ return img_picto($titlealt, 'warning.png', 'class="pictowarning valignmiddle"'.($morealt ? ($morealt == '1' ? ' style="float: right"' : ' '.$morealt): ''));
}
/**
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index ec39ba35302..b95e0c5bd25 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -681,15 +681,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $menutoshow=$langs->trans("CustomersCategoriesShort");
if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $menutoshow=$langs->trans("ProspectsCategoriesShort");
$newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
- $newmenu->add("/categories/card.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
+ $newmenu->add("/categories/card.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
}
// Categories Contact
- $newmenu->add("/categories/index.php?leftmenu=cat&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
+ $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat');
$newmenu->add("/categories/card.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
// Categories suppliers
if (! empty($conf->fournisseur->enabled))
{
- $newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
+ $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
$newmenu->add("/categories/card.php?action=create&type=1", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
}
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire);
diff --git a/htdocs/disabled.php b/htdocs/disabled.php
deleted file mode 100644
index 43c650466a6..00000000000
--- a/htdocs/disabled.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- *
- * 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
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
| '.$langs->trans("Ref").' | '; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); - print ' | ||
| ".$langs->trans("Company")." | ".$object->client->getNomUrl(1)." | ||
| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' | ||
| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' | ||
| '.$langs->trans("TotalSizeOfAttachedFiles").' | '.$totalsize.' '.$langs->trans("bytes").' | ||
| ';
+ $linkback = ''.$langs->trans("BackToList").'';
+
+ $morehtmlref=' ';
+ $morehtmlref.=' ';
+
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+ print '';
+ print '';
+
+ print ' ';
+
+ dol_fiche_end();
}
llxFooter();
diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php
new file mode 100644
index 00000000000..71ba4eb32dd
--- /dev/null
+++ b/htdocs/expensereport/note.php
@@ -0,0 +1,119 @@
+
+ * Copyright (C) 2004-2007 Laurent Destailleur '; + + print '
';
+ $morehtmlref.=' ';
+
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+ /*
+ print '
'; + */ + + print ' ';
+ print '';
+
+ $cssclass="titlefield";
+ include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
+
+ print ' ';
+
+ dol_fiche_end();
+
+}
+
+
+llxFooter();
+$db->close();
diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
index 4d653644f39..9b65050b663 100644
--- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
+++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
@@ -219,6 +219,15 @@ create table llx_user_employment
)ENGINE=innodb;
+ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_date_debut (date_debut);
+ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_date_fin (date_fin);
+ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_statut (fk_statut);
+
+ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_author (fk_user_author);
+ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_valid (fk_user_valid);
+ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_approve (fk_user_approve);
+ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_refuse (fk_user_approve);
+
-- Sequence to removed duplicated values of llx_links. Use serveral times if you still have duplicate.
drop table tmp_links_double;
@@ -230,5 +239,7 @@ drop table tmp_links_double;
ALTER TABLE llx_links ADD UNIQUE INDEX uk_links (objectid,label);
+ALTER TABLE llx_expensereport ADD UNIQUE INDEX idx_expensereport_uk_ref (ref, entity);
+
UPDATE llx_projet_task SET ref = NULL WHERE ref = '';
ALTER TABLE llx_projet_task ADD UNIQUE INDEX uk_projet_task_ref (ref, entity);
diff --git a/htdocs/install/mysql/tables/llx_expensereport.key.sql b/htdocs/install/mysql/tables/llx_expensereport.key.sql
new file mode 100644
index 00000000000..a7e4fd54425
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_expensereport.key.sql
@@ -0,0 +1,36 @@
+-- ===================================================================
+-- Copyright (C) 2005 Laurent Destailleur '; + print 'You need to be connected to network to use this software. '; +} +else +{ + $langs->load("error"); + $langs->load("other"); + + if (GETPOST('transphrase')) print GETPOST('transphrase'); + if (GETPOST('transkey')) print $langs->trans(GETPOST('transkey')); +} + diff --git a/htdocs/public/offline.php b/htdocs/public/offline.php deleted file mode 100644 index 043da4ac9c7..00000000000 --- a/htdocs/public/offline.php +++ /dev/null @@ -1,37 +0,0 @@ - - * Copyright (C) 2004-2012 Laurent Destailleur '; -print 'You need to be connected to network to use this software. '; - | |||||