mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
Merge branch 'support/3.2' into develop
This commit is contained in:
@@ -6,7 +6,7 @@ class TokenValidation
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
public function isSetupTokenValid($sParamToken) : bool
|
||||
public function isSetupTokenValid($sParamToken): bool
|
||||
{
|
||||
if (!file_exists(APPROOT.'data/.setup')) {
|
||||
return false;
|
||||
@@ -16,4 +16,4 @@ class TokenValidation
|
||||
return $sParamToken === $sSetupToken;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Menu:iTopHub' => 'iTop Hub~~',
|
||||
'Menu:iTopHub:Register' => 'Připojit k iTop Hubu',
|
||||
'Menu:iTopHub:Register+' => 'Go to iTop Hub to update your '.ITOP_APPLICATION_SHORT.' instance~~',
|
||||
@@ -64,6 +65,4 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s verze: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed~~',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Verze %1$s <b>Není</b> instalována.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Menu:iTopHub' => 'iTop Hub~~',
|
||||
'Menu:iTopHub:Register' => 'Connect to iTop Hub~~',
|
||||
'Menu:iTopHub:Register+' => 'Go to iTop Hub to update your '.ITOP_APPLICATION_SHORT.' instance~~',
|
||||
@@ -64,6 +65,4 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.~~',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed~~',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NOT</b> installed.~~',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Mit dem iTop Hub verbinden',
|
||||
'Menu:iTopHub:Register+' => ITOP_APPLICATION_SHORT.'-Instanzen über den iTop Hub updaten',
|
||||
@@ -64,6 +65,4 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s Version: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installiert',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NICHT</b> installiert.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
@@ -21,7 +22,7 @@
|
||||
* along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
Dict::Add('EN US', 'English', 'English', array(
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
// Dictionary entries go here
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Connect to iTop Hub',
|
||||
@@ -82,6 +83,4 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NOT</b> installed.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
@@ -21,7 +22,7 @@
|
||||
* along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
// Dictionary entries go here
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Connect to iTop Hub',
|
||||
@@ -82,6 +83,4 @@ Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NOT</b> installed.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Spanish Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
* @author Miguel Turrubiates <miguel_tf@yahoo.com>
|
||||
* @notas Utilizar codificación UTF-8 para mostrar acentos y otros caracteres especiales
|
||||
* @notas Utilizar codificación UTF-8 para mostrar acentos y otros caracteres especiales
|
||||
*/
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Conectar a iTop Hub',
|
||||
'Menu:iTopHub:Register+' => 'Ir a iTop Hub para actualizar su instancia de '.ITOP_APPLICATION_SHORT,
|
||||
@@ -62,6 +63,4 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s versión: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Instalada',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Versión %1$s <b>NO</b> está instalada.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('FR FR', 'French', 'Français', array(
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Se connecter à iTop Hub',
|
||||
'Menu:iTopHub:Register+' => 'Connectez-vous à iTop Hub pour enregistrer cette instance d\''.ITOP_APPLICATION_SHORT,
|
||||
@@ -64,6 +65,4 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installée',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NON</b> installée.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Kapcsolódás az iTop Hub-ra',
|
||||
'Menu:iTopHub:Register+' => 'Továbblépés az iTop Hub-ra a '.ITOP_APPLICATION_SHORT.' példányának frissítéséhez',
|
||||
@@ -64,6 +65,4 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s verzió: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Telepítve',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'A %1$s verzió <b>NINCS</b> telepítve.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Connetti a iTop Hub',
|
||||
'Menu:iTopHub:Register+' => 'Vai a iTop Hub per aggiornare la tua istanza di '.ITOP_APPLICATION_SHORT,
|
||||
@@ -64,6 +65,4 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => 'Versione %1$s di %2$s installata.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installata',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Versione %1$s <b>NON</b> installata.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Menu:iTopHub' => 'iTop Hub~~',
|
||||
'Menu:iTopHub:Register' => 'Connect to iTop Hub~~',
|
||||
'Menu:iTopHub:Register+' => 'Go to iTop Hub to update your '.ITOP_APPLICATION_SHORT.' instance~~',
|
||||
@@ -64,6 +65,4 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.~~',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed~~',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NOT</b> installed.~~',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Jeffrey Bostoen <info@jeffreybostoen.be> (2018 - 2022)
|
||||
*
|
||||
*/
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Verbinding maken met iTop Hub',
|
||||
'Menu:iTopHub:Register+' => 'Ga naar de iTop Hub om je iTop bij te werken.',
|
||||
@@ -65,6 +66,4 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s versie: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Geïnstalleerd',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Versie %1$s is <b>NIET</b> geïnstalleerd.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Połącz się z iTop Hub',
|
||||
'Menu:iTopHub:Register+' => 'Przejdź do iTop Hub, aby zaktualizować swoją instancję '.ITOP_APPLICATION_SHORT,
|
||||
@@ -64,6 +65,4 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s wersja: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Zainstalowana',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Wersja %1$s <b>NIE</b> zainstalowana.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Vladimir Kunin <v.b.kunin@gmail.com>
|
||||
*
|
||||
*/
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => 'Подключение к iTop Hub',
|
||||
'Menu:iTopHub:Register+' => 'Перейдите в iTop Hub, чтобы обновить ваш экземпляр '.ITOP_APPLICATION_SHORT,
|
||||
@@ -65,6 +66,4 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.~~',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed~~',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NOT</b> installed.~~',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Menu:iTopHub' => 'iTop Hub~~',
|
||||
'Menu:iTopHub:Register' => 'Connect to iTop Hub~~',
|
||||
'Menu:iTopHub:Register+' => 'Go to iTop Hub to update your '.ITOP_APPLICATION_SHORT.' instance~~',
|
||||
@@ -64,6 +65,4 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.~~',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed~~',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NOT</b> installed.~~',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license https://opensource.org/licenses/AGPL-3.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Menu:iTopHub' => 'iTop Hub~~',
|
||||
'Menu:iTopHub:Register' => 'Connect to iTop Hub~~',
|
||||
'Menu:iTopHub:Register+' => 'Go to iTop Hub to update your '.ITOP_APPLICATION_SHORT.' instance~~',
|
||||
@@ -64,6 +65,4 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s version: %2$s.~~',
|
||||
'iTopHub:InstallationStatus:Installed' => 'Installed~~',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => 'Version %1$s <b>NOT</b> installed.~~',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Localized data
|
||||
*
|
||||
@@ -20,7 +21,7 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
// Dictionary entries go here
|
||||
'Menu:iTopHub' => 'iTop Hub',
|
||||
'Menu:iTopHub:Register' => '进入iTop Hub',
|
||||
@@ -76,6 +77,4 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'iTopHub:InstallationStatus:Installed_Version' => '%1$s 版本: %2$s.',
|
||||
'iTopHub:InstallationStatus:Installed' => '已安装',
|
||||
'iTopHub:InstallationStatus:Version_NotInstalled' => '版本 %1$s <b>未被</b> 安装.',
|
||||
));
|
||||
|
||||
|
||||
]);
|
||||
|
||||
@@ -18,11 +18,13 @@ class HubConnectorPage extends NiceWebPage
|
||||
|
||||
$sUserPrefs = appUserPreferences::GetAsJSON();
|
||||
$this->LinkScriptFromAppRoot('js/utils.js');
|
||||
$this->add_script(<<<JS
|
||||
$this->add_script(
|
||||
<<<JS
|
||||
var oUserPreferences = $sUserPrefs;
|
||||
JS
|
||||
);
|
||||
$this->add_style(<<<CSS
|
||||
$this->add_style(
|
||||
<<<CSS
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
require_once(APPROOT.'application/newsroomprovider.class.inc.php');
|
||||
|
||||
class HubNewsroomProvider extends NewsroomProviderBase
|
||||
@@ -10,24 +11,21 @@ class HubNewsroomProvider extends NewsroomProviderBase
|
||||
public function GetTTL()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 15*60; // Update every 15 minutes
|
||||
return 15 * 60; // Update every 15 minutes
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see NewsroomProviderBase::IsApplicable()
|
||||
*/
|
||||
public function IsApplicable(User $oUser = null)
|
||||
{
|
||||
if ($oUser !== null)
|
||||
{
|
||||
if ($oUser !== null) {
|
||||
return UserRights::IsAdministrator($oUser);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
@@ -37,33 +35,33 @@ class HubNewsroomProvider extends NewsroomProviderBase
|
||||
{
|
||||
return 'iTop Hub'; // No need to translate...
|
||||
}
|
||||
|
||||
|
||||
public function GetMarkAllAsReadURL()
|
||||
{
|
||||
return $this->MakeURL('route_mark_all_messages_as_read');
|
||||
}
|
||||
|
||||
|
||||
public function GetFetchURL()
|
||||
{
|
||||
return $this->MakeURL('route_fetch_unread_messages');
|
||||
}
|
||||
|
||||
|
||||
public function GetViewAllURL()
|
||||
{
|
||||
return $sBaseUrl = $this->oConfig->GetModuleSetting('itop-hub-connector', 'url').MetaModel::GetModuleSetting('itop-hub-connector', 'route_view_all_messages');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see iNewsroomProvider::GetPlaceholders()
|
||||
*/
|
||||
public function GetPlaceholders()
|
||||
{
|
||||
return array(
|
||||
'%connect_to_itop_hub%' => utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'launch.php', array('target' => 'view_dashboard')),
|
||||
);
|
||||
return [
|
||||
'%connect_to_itop_hub%' => utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'launch.php', ['target' => 'view_dashboard']),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see NewsroomProviderBase::GetPreferencesUrl()
|
||||
@@ -72,15 +70,15 @@ class HubNewsroomProvider extends NewsroomProviderBase
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private function MakeURL($sRouteCode)
|
||||
{
|
||||
$sBaseUrl = $this->oConfig->GetModuleSetting('itop-hub-connector', 'url').MetaModel::GetModuleSetting('itop-hub-connector', $sRouteCode);
|
||||
|
||||
|
||||
$sParameters = 'uuid[bdd]='.urlencode((string) trim(DBProperty::GetProperty('database_uuid', ''), '{}'));
|
||||
$sParameters .= '&uuid[file]='.urlencode((string) trim(@file_get_contents(utils::GetDataPath()."instance.txt"), "{} \n"));
|
||||
$sParameters .= '&uuid[user]='.urlencode(UserRights::GetUserId());
|
||||
|
||||
|
||||
return $sBaseUrl.'?'.$sParameters;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,16 +17,15 @@ class ItopHubMenusHandler extends ModuleHandlerAPI
|
||||
public static function OnMenuCreation()
|
||||
{
|
||||
// Add the admin menus
|
||||
if (UserRights::IsAdministrator())
|
||||
{
|
||||
if (UserRights::IsAdministrator()) {
|
||||
$sRootUrl = utils::GetAbsoluteUrlAppRoot().'pages/exec.php?exec_module=itop-hub-connector&exec_page=launch.php';
|
||||
$sMyExtensionsUrl = utils::GetAbsoluteUrlAppRoot().'pages/exec.php?exec_module=itop-hub-connector&exec_page=myextensions.php';
|
||||
|
||||
|
||||
$oHubMenu = new MenuGroup('iTopHub', 999 /* fRank */, 'fc fc-itophub-icon fc-1-5x');
|
||||
$fRank = 1;
|
||||
new WebPageMenuNode('iTopHub:Register', $sRootUrl.'&target=view_dashboard', $oHubMenu->GetIndex(), $fRank++);
|
||||
new WebPageMenuNode('iTopHub:MyExtensions', $sMyExtensionsUrl, $oHubMenu->GetIndex(), $fRank++);
|
||||
new WebPageMenuNode('iTopHub:BrowseExtensions', $sRootUrl.'&target=browse_extensions', $oHubMenu->GetIndex(), $fRank++);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
@@ -26,7 +27,6 @@ $oAppContext = new ApplicationContext();
|
||||
$oPage = new iTopWebPage(Dict::S('iTopHub:InstalledExtensions'));
|
||||
$oPage->SetBreadCrumbEntry('ui-hub-myextensions', Dict::S('Menu:iTopHub:MyExtensions'), Dict::S('Menu:iTopHub:MyExtensions+'), '', 'fas fa-puzzle-piece', iTopWebPage::ENUM_BREADCRUMB_ENTRY_ICON_TYPE_CSS_CLASSES);
|
||||
|
||||
|
||||
function GetExtensionInfoComponent(iTopExtension $oExtension): UIBlock
|
||||
{
|
||||
$sExtensionDescription = Dict::Format('UI:About:Extension_Version', $oExtension->sVersion);
|
||||
@@ -40,16 +40,12 @@ function GetExtensionInfoComponent(iTopExtension $oExtension): UIBlock
|
||||
->SetOpenedByDefault(false);
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
$oExtensionsMap = new iTopExtensionsMap();
|
||||
$oExtensionsMap->LoadChoicesFromDatabase(MetaModel::GetConfig());
|
||||
|
||||
$oPage->AddUiBlock(TitleUIBlockFactory::MakeForPage(Dict::S('iTopHub:InstalledExtensions')));
|
||||
|
||||
|
||||
|
||||
|
||||
/**------------------------------------------------------------------------------------------------------
|
||||
* Remotely deployed ext
|
||||
*/
|
||||
@@ -80,13 +76,12 @@ try {
|
||||
$oHubButtonContainer = UIContentBlockUIBlockFactory::MakeStandard()
|
||||
->AddCSSClass('hub-button');
|
||||
$oPage->AddSubBlock($oHubButtonContainer);
|
||||
$sUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'launch.php', array('target' => 'browse_extensions'));
|
||||
$sUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'launch.php', ['target' => 'browse_extensions']);
|
||||
$oHubButton = ButtonUIBlockFactory::MakeForPrimaryAction(Dict::S('iTopHub:GetMoreExtensions'), 'install-extensions-button')
|
||||
->SetOnClickJsCode("window.location.href='$sUrl'")
|
||||
->SetIconClass('fa-fw fc fc-itophub-icon fc-1-5x');
|
||||
$oHubButtonContainer->AddSubBlock($oHubButton);
|
||||
|
||||
|
||||
/**------------------------------------------------------------------------------------------------------
|
||||
* Manually deployed ext
|
||||
* Only if there are some !
|
||||
@@ -121,8 +116,7 @@ try {
|
||||
}
|
||||
CSS
|
||||
);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$oPage->p('<b>'.Dict::Format('UI:Error_Details', $e->getMessage()).'</b>');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user