diff --git a/htdocs/holiday/admin/tomergewithholiday.php b/htdocs/holiday/admin/tomergewithholiday.php new file mode 100755 index 00000000000..7ff795a455b --- /dev/null +++ b/htdocs/holiday/admin/tomergewithholiday.php @@ -0,0 +1,226 @@ + + * Copyright (C) 2011 Dimitri Mouillard + * Copyright (C) 2012 Regis Houssin + * + * 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 . + */ + +/** + * Page module configuration paid holiday. + * + * \file holiday.php + * \ingroup holiday + * \brief Page module configuration paid holiday. + */ + +require '../../main.inc.php'; +require DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; +require_once DOL_DOCUMENT_ROOT. '/core/class/html.form.class.php'; +require_once DOL_DOCUMENT_ROOT. '/user/class/user.class.php'; +require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php'; + +// Si pas administrateur +if (! $user->admin) accessforbidden(); + + +/* + * View + */ + +// Vérification si module activé +if (empty($conf->holiday->enabled)) print $langs->trans('NotActiveModCP'); + +llxheader('',$langs->trans('TitleAdminCP')); + +print_fiche_titre($langs->trans('MenuCPTypes')); + +echo '
'; + +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; + +$types = $db->query( + "SELECT * + FROM llx_congespayes_types + WHERE deleteAt IS NULL + ORDER BY label" +); + +while($type = $db->fetch_array($types)) +{ + echo' + + + + + + + + + + + + + '; +} + +echo ' + + + + + + +
' . $langs->trans('TypeLabel') . '' . $langs->trans('TypeDescription') . '' . $langs->trans('TypeAffect') . '' . $langs->trans('TypeDelay') . '' . $langs->trans('nbCongesDeductedCPMini') . '' . $langs->trans('nbCongesEveryMonthCPMini') . '
'.$type['label'].''.($type['description']?$type['description']:'N/A').' + '.($type['affect']?$langs->trans('TypeAffectYes'):$langs->trans('TypeAffectNo')).' + '.$type['delay'].''.$type['nbCongesDeducted'].''.$type['nbCongesEveryMonth'].' + + +
+ +
+ +'; + +echo '
'; + +llxFooter(); + +$db->close(); +?> \ No newline at end of file diff --git a/htdocs/holiday/img/add.png b/htdocs/holiday/img/add.png new file mode 100755 index 00000000000..d15cb50d835 Binary files /dev/null and b/htdocs/holiday/img/add.png differ diff --git a/htdocs/holiday/img/delete.png b/htdocs/holiday/img/delete.png new file mode 100755 index 00000000000..e22ed6f43fc Binary files /dev/null and b/htdocs/holiday/img/delete.png differ diff --git a/htdocs/holiday/img/edit.png b/htdocs/holiday/img/edit.png new file mode 100755 index 00000000000..c74571fde8a Binary files /dev/null and b/htdocs/holiday/img/edit.png differ diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index e8a62f9d05d..54aea6de52d 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -945,3 +945,17 @@ create table llx_c_email_templates UPDATE llx_c_regions SET rowid = 0 where rowid = 1; DELETE FROM llx_c_departements WHERE fk_region NOT IN (select rowid from llx_c_regions) AND fk_region IS NOT NULL AND fk_region <> 0; ALTER TABLE llx_c_departements ADD CONSTRAINT fk_departements_fk_region FOREIGN KEY (fk_region) REFERENCES llx_c_regions (rowid); + + +CREATE TABLE llx_holiday_types ( + rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, + label varchar(45) NOT NULL, + description varchar(255) NOT NULL, + affect int(1) NOT NULL, + delay int(1) NOT NULL, + insertAt DATETIME NOT NULL, + updateAt DATETIME, + deleteAt DATETIME, + nbCongesDeducted varchar(255) NOT NULL, + nbCongesEveryMonth varchar(255) NOT NULL +); diff --git a/htdocs/install/mysql/tables/llx_holiday_types.sql b/htdocs/install/mysql/tables/llx_holiday_types.sql new file mode 100755 index 00000000000..4fa2c5e387f --- /dev/null +++ b/htdocs/install/mysql/tables/llx_holiday_types.sql @@ -0,0 +1,30 @@ +-- =================================================================== +-- Copyright (C) 2014 Laurent Destailleur +-- +-- 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 . +-- +-- =================================================================== + +CREATE TABLE llx_holiday_types ( + rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, + label varchar(45) NOT NULL, + description varchar(255) NOT NULL, + affect int(1) NOT NULL, + delay int(1) NOT NULL, + insertAt DATETIME NOT NULL, + updateAt DATETIME, + deleteAt DATETIME, + nbCongesDeducted varchar(255) NOT NULL, + nbCongesEveryMonth varchar(255) NOT NULL +); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 319a58131ab..76a6a43f9bb 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2564,6 +2564,41 @@ a.cke_dialog_ui_button } +/* ============================================================================== */ +/* Holiday */ +/* ============================================================================== */ + +#types .btn { + cursor: pointer; +} + +#types .btn-primary { + font-weight: bold; +} + +#types form { + padding: 20px; +} + +#types label { + display:inline-block; + width:100px; + margin-right: 20px; + padding: 4px; + text-align: right; + vertical-align: top; +} + +#types input.text, #types textarea { + width: 400px; +} + +#types textarea { + height: 100px; +} + + + /* ============================================================================== */ /* JSGantt */ /* ============================================================================== */