From 58648d58eaaa28a13a51536e0aa04c88110785c5 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 28 Oct 2012 15:06:33 +0000 Subject: [PATCH] new config file structuring --- lam/templates/pdfedit/pdfmain.php | 13 +++++++------ lam/templates/profedit/profilemain.php | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lam/templates/pdfedit/pdfmain.php b/lam/templates/pdfedit/pdfmain.php index b41a992a..817352f6 100644 --- a/lam/templates/pdfedit/pdfmain.php +++ b/lam/templates/pdfedit/pdfmain.php @@ -197,12 +197,13 @@ include '../main_header.php'; $deleteLink->setOnClick("profileShowDeleteDialog('" . _('Delete') . "', '" . _('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', '" . 'template_' . $templateClasses[$i]['scope'] . "');"); $existingContainer->addElement($deleteLink); - $importLink = new htmlLink(null, '#', '../../graphics/import.png'); - $importLink->setTitle(_('Import PDF structures')); - $importLink->setOnClick("showDistributionDialog('" . _("Import PDF structures") . "', '" . - _('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', 'import');"); - $existingContainer->addElement($importLink); - + if (count($configProfiles) > 1) { + $importLink = new htmlLink(null, '#', '../../graphics/import.png'); + $importLink->setTitle(_('Import PDF structures')); + $importLink->setOnClick("showDistributionDialog('" . _("Import PDF structures") . "', '" . + _('Ok') . "', '" . _('Cancel') . "', '" . $templateClasses[$i]['scope'] . "', 'import');"); + $existingContainer->addElement($importLink); + } $exportLink = new htmlLink(null, '#', '../../graphics/export.png'); $exportLink->setTitle(_('Export PDF structure')); $exportLink->setOnClick("showDistributionDialog('" . _("Export PDF structure") . "', '" . diff --git a/lam/templates/profedit/profilemain.php b/lam/templates/profedit/profilemain.php index 63845cd0..c377a7dd 100644 --- a/lam/templates/profedit/profilemain.php +++ b/lam/templates/profedit/profilemain.php @@ -195,12 +195,13 @@ for ($i = 0; $i < sizeof($profileClasses); $i++) { $deleteLink->setTitle(_('Delete')); $deleteLink->setOnClick("profileShowDeleteDialog('" . _('Delete') . "', '" . _('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', '" . 'profile_' . $profileClasses[$i]['scope'] . "');"); $existingContainer->addElement($deleteLink); - $importLink = new htmlLink(null, '#', '../../graphics/import.png'); - $importLink->setTitle(_('Import profiles')); - $importLink->setOnClick("showDistributionDialog('" . _("Import profiles") . "', '" . - _('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', 'import');"); - $existingContainer->addElement($importLink); - + if (count($configProfiles) > 1) { + $importLink = new htmlLink(null, '#', '../../graphics/import.png'); + $importLink->setTitle(_('Import profiles')); + $importLink->setOnClick("showDistributionDialog('" . _("Import profiles") . "', '" . + _('Ok') . "', '" . _('Cancel') . "', '" . $profileClasses[$i]['scope'] . "', 'import');"); + $existingContainer->addElement($importLink); + } $exportLink = new htmlLink(null, '#', '../../graphics/export.png'); $exportLink->setTitle(_('Export profile')); $exportLink->setOnClick("showDistributionDialog('" . _("Export profile") . "', '" .