From 134263416c1bc31d749865e0c3d44ed5c5779fe3 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 22 Apr 2011 08:50:25 +0000 Subject: [PATCH] task #9747: Can show content of external calendar (ical) into agenda --- htdocs/admin/agenda_extsites.php | 73 ++++++++++++++++++++++++++++++++ htdocs/langs/ca_ES/agenda.lang | 2 + htdocs/langs/en_US/agenda.lang | 4 +- htdocs/langs/es_ES/agenda.lang | 2 + htdocs/langs/fr_FR/agenda.lang | 4 +- htdocs/lib/agenda.lib.php | 6 +++ 6 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 htdocs/admin/agenda_extsites.php diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php new file mode 100644 index 00000000000..9cac5863ed9 --- /dev/null +++ b/htdocs/admin/agenda_extsites.php @@ -0,0 +1,73 @@ + + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file htdocs/admin/agenda_extsites.php + * \ingroup agenda + * \brief Page to setup external calendars for agenda module + * \version $Id$ + */ + +require("../main.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php"); + +if (!$user->admin) + accessforbidden(); + +$langs->load("admin"); +$langs->load("other"); +$langs->load("agenda"); + +$action=$_POST["action"]; + +/* +* Actions +*/ + + +/* + * View + */ + +llxHeader(); + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup'); +print "
\n"; + +print $langs->trans("AgendaExtSitesDesc")."
\n"; +print "
\n"; + +$head=agenda_prepare_head(); + +dol_fiche_head($head, 'extsites', $langs->trans("Agenda")); + +print '
'; +print ''; +print ''; + +$var=true; + +print "
\n"; + +if ($mesg) print "
$mesg
"; +print "
"; + +llxFooter('$Date$ - $Revision$'); +?> diff --git a/htdocs/langs/ca_ES/agenda.lang b/htdocs/langs/ca_ES/agenda.lang index 3d2ac9e8b4e..af6f7a46400 100644 --- a/htdocs/langs/ca_ES/agenda.lang +++ b/htdocs/langs/ca_ES/agenda.lang @@ -31,6 +31,7 @@ ViewWithPredefinedFilters= Veure amb els filtres predefinits AutoActions= Inclusió automàtica a l'agenda AgendaAutoActionDesc= Definir els esdeveniments aquí per què voleu que Dolibarr creu automàticament una acció en l'ordre del dia. Si no està marcada (per defecte), es podran crear manualment. AgendaSetupOtherDesc= Aquesta pàgina us permet configurar altres paràmetres del mòdul agenda. +AgendaExtSitesDesc=Aquesta pàgina us permet configurar calendaris externs. ActionsEvents= Esdeveniments per a què Dolibarr crei una acció de forma automàtica PropalValidatedInDolibarr= Pressupost %s validat InvoiceValidatedInDolibarr= Factura %s validada @@ -55,3 +56,4 @@ AgendaUrlOptions4= logint=%s per a restringir insercions a accions que af AgendaUrlOptions5= logind= %s per a restringir insercions a accions realitzades per l'usuari %s. AgendaShowBirthdayEvents= Mostra aniversari dels contactes AgendaHideBirthdayEvents= Amaga aniversari dels contacte +ExtSites=Calendaris externs \ No newline at end of file diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 65e3653fa58..1ce2afaa02e 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -31,6 +31,7 @@ ViewWithPredefinedFilters= View with predefined filters AutoActions= Automatic filling of agenda AgendaAutoActionDesc= Define here events for which you want Dolibarr to create automatically an action in agenda. If nothing is checked (by default), only manual actions will be included in agenda. AgendaSetupOtherDesc= This page allows to configure other parameters of agenda module. +AgendaExtSitesDesc=This page allows to configure external calendars. ActionsEvents= Events for which Dolibarr will create an action in agenda automatically PropalValidatedInDolibarr= Proposal %s validated InvoiceValidatedInDolibarr= Invoice %s validated @@ -54,4 +55,5 @@ AgendaUrlOptions3=logina=%s to restrict output to actions created by user AgendaUrlOptions4=logint=%s to restrict output to actions affected to user %s. AgendaUrlOptions5=logind=%s to restrict output to actions done by user %s. AgendaShowBirthdayEvents=Show birthday's contacts -AgendaHideBirthdayEvents=Hide birthday's contacts \ No newline at end of file +AgendaHideBirthdayEvents=Hide birthday's contacts +ExtSites=External calendars \ No newline at end of file diff --git a/htdocs/langs/es_ES/agenda.lang b/htdocs/langs/es_ES/agenda.lang index 500014c8d0f..559b8582603 100644 --- a/htdocs/langs/es_ES/agenda.lang +++ b/htdocs/langs/es_ES/agenda.lang @@ -31,6 +31,7 @@ ViewWithPredefinedFilters=Ver con los filtros predefinidos AutoActions=Inclusión automática en la agenda AgendaAutoActionDesc=Definir los eventos aquí para los que desea que Dolibarr cree automáticamente una acción en el orden del día. Si no está marcada (por defecto), se podrán crear manualmente. AgendaSetupOtherDesc=Esta página le permite configurar otros parámetros del módulo agenda. +AgendaExtSitesDesc=Esta página le permite configurar calendarios externos. ActionsEvents=Eventos para que Dolibarr cree una acción de forma automática PropalValidatedInDolibarr=Presupuesto %s validado InvoiceValidatedInDolibarr=Factura %s validada @@ -55,3 +56,4 @@ AgendaUrlOptions4=logint=%s para restringir inserciones a acciones que af AgendaUrlOptions5=logind=%s para restringir inserciones a acciones realizadas por el usuario %s. AgendaShowBirthdayEvents=Mostrar cumpleaños de los contactos AgendaHideBirthdayEvents=Ocultar cumpleaños de los contactos +ExtSites=Calendarios externos \ No newline at end of file diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index c6f852c6979..a89c5b5110c 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -31,6 +31,7 @@ ViewWithPredefinedFilters=Vues avec filtres prédéfinis AutoActions=Alimentation automatique de l'agenda AgendaAutoActionDesc=Définissez dans cet onglet les événements pour lesquels dolibarr créera automatiquement une action dans l'agenda. Si aucune case n'est cochée (par défaut), seules les actions manuelles seront incluses dans l'agenda. AgendaSetupOtherDesc=Cette page permet de configurer les autres paramètres du module agenda. +AgendaExtSitesDesc=Cette page permet de configurer les calendriers externes. ActionsEvents=Événements pour lesquels Dolibarr doit créer une action dans l'agenda en automatique. PropalValidatedInDolibarr=Proposition %s validée InvoiceValidatedInDolibarr=Facture %s validée @@ -54,4 +55,5 @@ AgendaUrlOptions3=logina=%s pour limiter l'export aux actions créées pa AgendaUrlOptions4=logint=%s pour limiter l'export aux actions affectées à l'utilisateur %s. AgendaUrlOptions5=logind=%s pour limiter l'export aux actions réalisées par l'utilisateur %s. AgendaShowBirthdayEvents=Afficher anniversaires contacts -AgendaHideBirthdayEvents=Cacher anniversaires contacts \ No newline at end of file +AgendaHideBirthdayEvents=Cacher anniversaires contacts +ExtSites=Calendriers externes \ No newline at end of file diff --git a/htdocs/lib/agenda.lib.php b/htdocs/lib/agenda.lib.php index 6fdcb4f3cb3..92765d92644 100644 --- a/htdocs/lib/agenda.lib.php +++ b/htdocs/lib/agenda.lib.php @@ -311,6 +311,12 @@ function agenda_prepare_head() $head[$h][1] = $langs->trans("Export"); $head[$h][2] = 'xcal'; $h++; + + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php"; + $head[$h][1] = $langs->trans("ExtSites"); + $head[$h][2] = 'extsites'; + $h++; + return $head; }