mirror of
https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management.git
synced 2025-06-27 21:28:42 +02:00
Correction de la structure du plugin GLPI
This commit is contained in:
@ -1,66 +0,0 @@
|
||||
<root>
|
||||
<name>SOC-Case-Management</name>
|
||||
<key>SOC-Case-Management</key>
|
||||
<!-- stable, beta, development, alpha, ... -->
|
||||
<state>beta</state>
|
||||
<logo>https://raw.githubusercontent.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/master/docs/images/logo.png</logo>
|
||||
<description>
|
||||
<short>
|
||||
<de>SOC-Case-Management GLPI-Plugin.</de>
|
||||
<en>SOC-Case-Management GLPI plugin.</en>
|
||||
<fr>Plugin GLPI SOC-Case-Management.</fr>
|
||||
<it>Plug-in GLPI "SOC-Case-Management".</it>
|
||||
<pl>Plugin SOC-Case-Management.</pl>
|
||||
<es>Plugin GLPI de SOC-Case-Management.</es>
|
||||
<pt>Plugin GLPI de SOC-Case-Management.</pt>
|
||||
</short>
|
||||
<long>
|
||||
<de>SOC-Case-Management-Integrations-GLPI-Plugin.</de>
|
||||
<en>SOC-Case-Management integration: this plugin.</en>
|
||||
<fr>SOC-Case-Management integration GLPI plugin.</fr>
|
||||
<it>Plug-in GLPI di integrazione SOC-Case-Management.</it>
|
||||
<pl>Wtyczka GLPI dla SOC-Case-Management.</pl>
|
||||
<es>Plugin de integración SOC-Case-Management para GLPI.</es>
|
||||
<pt>Plugin de integração SOC-Case-Management para GLPI.</pt>
|
||||
</long>
|
||||
</description>
|
||||
<homepage>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/</homepage>
|
||||
<download>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/releases</download>
|
||||
<issues>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/issues</issues>
|
||||
<readme>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/blob/master/README.md</readme>
|
||||
<authors>
|
||||
<author>Hubert C. / Tips-Of-Mine</author>
|
||||
</authors>
|
||||
<versions>
|
||||
<version>
|
||||
<num>0.0.1</num>
|
||||
<compatibility>~10.0</compatibility>
|
||||
<download_url>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/releases/download/0.0.1/SOC-Case-Management-0.0.1.tar.gz</download_url>
|
||||
</version>
|
||||
</versions>
|
||||
<langs>
|
||||
<lang>de_DE</lang>
|
||||
<lang>en_GB</lang>
|
||||
<lang>fr_FR</lang>
|
||||
<lang>it_IT</lang>
|
||||
<lang>pl_PL</lang>
|
||||
<lang>es_ES</lang>
|
||||
<lang>pt_PT</lang>
|
||||
</langs>
|
||||
<license>GPL V3+</license>
|
||||
<tags>
|
||||
<en>
|
||||
<tag>SOC-Case-Management</tag>
|
||||
<tag>Security</tag>
|
||||
</en>
|
||||
<fr>
|
||||
<tag>>SOC-Case-Management</tag>
|
||||
<tag>Security</tag>
|
||||
</fr>
|
||||
</tags>
|
||||
<screenshots>
|
||||
<screenshot>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/blob/main/docs/images/screenshot1.png?raw=true</screenshot>
|
||||
<screenshot>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/blob/main/docs/images/screenshot2.png?raw=true</screenshot>
|
||||
<screenshot>https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/blob/main/docs/images/screenshot3.png?raw=true</screenshot>
|
||||
</screenshots>
|
||||
</root>
|
20
front/status.php
Normal file
20
front/status.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
// This is a simple status page to indicate the plugin is installed
|
||||
// GLPI sometimes looks for this file
|
||||
|
||||
// Check if plugin is activated
|
||||
if (!Plugin::isPluginActive("soc")) {
|
||||
Html::displayNotFoundError();
|
||||
}
|
||||
|
||||
Html::header(__('SOC Case Management Status', 'soc'), '', "management", "pluginsoccase");
|
||||
|
||||
echo "<div class='center'>";
|
||||
echo "<h3>" . __('SOC Case Management Plugin Status', 'soc') . "</h3>";
|
||||
echo "<p>" . __('Plugin is installed and active.', 'soc') . "</p>";
|
||||
echo "<a href='dashboard.php' class='vsubmit'>" . __('Go to SOC Dashboard', 'soc') . "</a>";
|
||||
echo "</div>";
|
||||
|
||||
Html::footer();
|
17
plugin.php
17
plugin.php
@ -3,7 +3,7 @@
|
||||
* @version 1.0.0
|
||||
* @license GPL-3.0+
|
||||
* @brief GLPI SOC Case Management Plugin
|
||||
* @copyright 2025 Your Organization
|
||||
* @copyright 2025 Tips-Of-Mine
|
||||
*/
|
||||
|
||||
define('PLUGIN_SOC_VERSION', '1.0.0');
|
||||
@ -19,9 +19,9 @@ function plugin_version_soc() {
|
||||
return [
|
||||
'name' => 'SOC Case Management',
|
||||
'version' => PLUGIN_SOC_VERSION,
|
||||
'author' => 'Your Organization',
|
||||
'author' => 'Tips-Of-Mine',
|
||||
'license' => 'GPL-3.0+',
|
||||
'homepage' => 'https://yourorganization.com',
|
||||
'homepage' => 'https://github.com/tips-of-mine/GLPI-Plugin-SOC-Case-Management/',
|
||||
'requirements' => [
|
||||
'glpi' => [
|
||||
'min' => PLUGIN_SOC_MIN_GLPI,
|
||||
@ -69,9 +69,9 @@ function plugin_init_soc() {
|
||||
$PLUGIN_HOOKS['menu_toadd']['soc'] = ['management' => 'PluginSocCase'];
|
||||
$PLUGIN_HOOKS['javascript']['soc'] = ['/plugins/soc/js/soc.js'];
|
||||
$PLUGIN_HOOKS['add_css']['soc'] = ['/plugins/soc/css/soc.css'];
|
||||
|
||||
|
||||
// Initialize translations
|
||||
$PLUGIN_HOOKS['init_translations']['soc'] = 'initTranslations';
|
||||
$PLUGIN_HOOKS['init_translations']['soc'] = 'plugin_init_soc_translations';
|
||||
|
||||
if (Session::haveRight('plugin_soc_case', READ)) {
|
||||
$PLUGIN_HOOKS['menu_toadd']['soc'] = ['management' => 'PluginSocCase'];
|
||||
@ -90,6 +90,11 @@ function plugin_init_soc() {
|
||||
'addtabtypes' => ['Ticket']
|
||||
]);
|
||||
}
|
||||
|
||||
// Add config page
|
||||
if (Session::haveRight('config', UPDATE)) {
|
||||
$PLUGIN_HOOKS['config_page']['soc'] = 'front/config.form.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,7 +102,7 @@ function plugin_init_soc() {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function initTranslations() {
|
||||
function plugin_init_soc_translations() {
|
||||
global $CFG_GLPI;
|
||||
|
||||
$domain = 'soc';
|
||||
|
15
setup.php
15
setup.php
@ -63,6 +63,9 @@ function plugin_soc_install() {
|
||||
// Create profiles rights
|
||||
PluginSocProfile::initProfile();
|
||||
PluginSocProfile::createFirstAccess($_SESSION['glpiactiveprofile']['id']);
|
||||
|
||||
// Initialize plugin configuration
|
||||
PluginSocConfig::install();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -95,19 +98,13 @@ function plugin_soc_uninstall() {
|
||||
// Delete plugin display preferences
|
||||
$query = "DELETE FROM `glpi_displaypreferences` WHERE `itemtype` LIKE 'PluginSoc%'";
|
||||
$DB->query($query) or die("Error deleting plugin_soc display preferences");
|
||||
|
||||
// Uninstall plugin configuration
|
||||
PluginSocConfig::uninstall();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define hooks
|
||||
*/
|
||||
function plugin_init_soc() {
|
||||
global $PLUGIN_HOOKS;
|
||||
|
||||
// Add plugin hooks here
|
||||
}
|
||||
|
||||
/**
|
||||
* Define database relations
|
||||
*/
|
||||
|
Reference in New Issue
Block a user