├── typology.png ├── locales ├── cs_CZ.mo ├── de_DE.mo ├── en_GB.mo ├── en_US.mo ├── es_AR.mo ├── es_EC.mo ├── es_ES.mo ├── fr_FR.mo ├── it_IT.mo ├── pt_BR.mo ├── ro_RO.mo ├── ru_RU.mo ├── tr_TR.mo ├── glpi.pot ├── en_GB.po ├── es_ES.po ├── en_US.po ├── ro_RO.po ├── es_AR.po ├── pt_BR.po ├── it_IT.po ├── es_EC.po ├── de_DE.po ├── ru_RU.po ├── tr_TR.po ├── fr_FR.po └── cs_CZ.po ├── public └── typology.css ├── ISSUE_TEMPLATE.md ├── tools ├── update_mo.pl ├── update_po.pl └── extract_template.sh ├── .github └── workflows │ ├── updatepot.yml │ ├── generatemo.yml │ └── release.yml ├── index.php ├── ajax ├── index.php ├── dropdownAction.php ├── dropdownMassiveActionField.php └── dropdownCaseValue.php ├── front ├── index.php ├── typologycriteria.php ├── ruletypology.php ├── ruletypology.form.php ├── typology.php ├── rulesengine.test.php ├── rule.test.php ├── typologycriteria.form.php └── typology.form.php ├── report ├── index.php └── typologyreport │ ├── index.php │ ├── typologyreport.en_GB.php │ └── typologyreport.fr_FR.php ├── README.md ├── src ├── RuleTypologyCollection.php ├── RuleTypology.php ├── Profile.php └── NotificationTargetTypology.php ├── setup.php ├── sql ├── empty-1.1.0.sql ├── empty-2.5.0.sql ├── empty-3.0.0.sql ├── empty-1.2.0.sql ├── empty-4.0.0.sql └── empty-1.0.0.sql ├── typology.xml └── hook.php /typology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/typology.png -------------------------------------------------------------------------------- /locales/cs_CZ.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/cs_CZ.mo -------------------------------------------------------------------------------- /locales/de_DE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/de_DE.mo -------------------------------------------------------------------------------- /locales/en_GB.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/en_GB.mo -------------------------------------------------------------------------------- /locales/en_US.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/en_US.mo -------------------------------------------------------------------------------- /locales/es_AR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/es_AR.mo -------------------------------------------------------------------------------- /locales/es_EC.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/es_EC.mo -------------------------------------------------------------------------------- /locales/es_ES.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/es_ES.mo -------------------------------------------------------------------------------- /locales/fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/fr_FR.mo -------------------------------------------------------------------------------- /locales/it_IT.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/it_IT.mo -------------------------------------------------------------------------------- /locales/pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/pt_BR.mo -------------------------------------------------------------------------------- /locales/ro_RO.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/ro_RO.mo -------------------------------------------------------------------------------- /locales/ru_RU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/ru_RU.mo -------------------------------------------------------------------------------- /locales/tr_TR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/typology/master/locales/tr_TR.mo -------------------------------------------------------------------------------- /public/typology.css: -------------------------------------------------------------------------------- 1 | .italic { 2 | font-size:10px; 3 | font-style:italic; 4 | color:grey 5 | } 6 | .typology_font_red{ 7 | color: red; 8 | } 9 | .typology_font_red_bold{ 10 | color: red; 11 | font-weight: bold; 12 | } 13 | .typology_font_green{ 14 | color: green; 15 | } 16 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Dear GLPi user. 2 | 3 | BEFORE SUBMITTING YOUR ISSUE, please make sure to read and follow these steps : 4 | 5 | * Verify that your question has not already been asked 6 | * Please use the below template. 7 | * Delete this text before submiting your issue. 8 | 9 | The Plugin team. 10 | 11 | ------------ 12 | * Version of the plugin : 13 | 14 | 15 | * Version of your GLPI : 16 | 17 | 18 | * Steps to reproduce (which actions have you made) : 19 | 20 | 21 | * Expected result : 22 | 23 | 24 | * Actual result : 25 | 26 | 27 | * URL of the page : 28 | 29 | 30 | * Screenshot of the problem (if pertinent) : 31 | 32 | -------------------------------------------------------------------------------- /tools/update_mo.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | #!/usr/bin/perl -w 3 | 4 | if (@ARGV!=0){ 5 | print "USAGE update_mo.pl\n\n"; 6 | 7 | exit(); 8 | } 9 | 10 | 11 | opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n"; 12 | foreach (readdir(DIRHANDLE)){ 13 | if ($_ ne '..' && $_ ne '.'){ 14 | 15 | if(!(-l "$dir/$_")){ 16 | if (index($_,".po",0)==length($_)-3) { 17 | $lang=$_; 18 | $lang=~s/\.po//; 19 | 20 | `msgfmt locales/$_ -o locales/$lang.mo`; 21 | } 22 | } 23 | 24 | } 25 | } 26 | closedir DIRHANDLE; 27 | 28 | # 29 | # 30 | -------------------------------------------------------------------------------- /.github/workflows/updatepot.yml: -------------------------------------------------------------------------------- 1 | name: Update POT 2 | on: 3 | push: 4 | branches: [ master ] 5 | paths-ignore: 6 | - 'locales/**' 7 | 8 | env: 9 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 10 | jobs: 11 | run: 12 | 13 | name: Update POT 14 | 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout repo 18 | uses: actions/checkout@v4 19 | 20 | - name: install xgettext 21 | 22 | run: sudo apt-get install gettext; 23 | - name: Update POT 24 | run: sh tools/extract_template.sh; 25 | 26 | - name: Commit changes 27 | uses: EndBug/add-and-commit@v9 28 | with: 29 | message: "Update POT" 30 | 31 | - name: Push changes 32 | uses: actions-go/push@master 33 | with: 34 | commit-message: '' 35 | 36 | -------------------------------------------------------------------------------- /tools/update_po.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | #!/usr/bin/perl -w 3 | 4 | if (@ARGV!=2){ 5 | print "USAGE update_po.pl transifex_login transifex_password\n\n"; 6 | 7 | exit(); 8 | } 9 | $user = $ARGV[0]; 10 | $password = $ARGV[1]; 11 | 12 | opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n"; 13 | foreach (readdir(DIRHANDLE)){ 14 | if ($_ ne '..' && $_ ne '.'){ 15 | 16 | if(!(-l "$dir/$_")){ 17 | if (index($_,".po",0)==length($_)-3) { 18 | $lang=$_; 19 | $lang=~s/\.po//; 20 | 21 | `wget --user=$user --password=$password --output-document=locales/$_ http://www.transifex.com/api/2/project/GLPI_typology/resource/glpi/translation/$lang/?file=$_`; 22 | } 23 | } 24 | 25 | } 26 | } 27 | closedir DIRHANDLE; 28 | 29 | # 30 | # 31 | -------------------------------------------------------------------------------- /.github/workflows/generatemo.yml: -------------------------------------------------------------------------------- 1 | name: Generate MO 2 | on: 3 | push: 4 | branches: [ master ] 5 | paths: 6 | - '**.po' 7 | env: 8 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 9 | jobs: 10 | run: 11 | 12 | name: Generate mo 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout repo 16 | uses: actions/checkout@v4 17 | 18 | - name: Setup Perl environment 19 | # You may pin to the exact commit or the version. 20 | # uses: shogo82148/actions-setup-perl@8d2e3d59a9516b785ed32169d48a4888eaa9b514 21 | uses: shogo82148/actions-setup-perl@v1 22 | - name: msgfmt 23 | # You may pin to the exact commit or the version. 24 | # uses: whtsky/msgfmt-action@6b2181f051b002182d01a1e1f1aff216230c5a4d 25 | uses: whtsky/msgfmt-action@20190305 26 | - name: Generate mo 27 | run: perl tools/update_mo.pl; 28 | 29 | - name: Commit changes 30 | uses: EndBug/add-and-commit@v9 31 | with: 32 | 33 | message: "Generate mo" 34 | - name: Push changes 35 | 36 | uses: actions-go/push@master 37 | 38 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | -------------------------------------------------------------------------------- /ajax/index.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | -------------------------------------------------------------------------------- /front/index.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | -------------------------------------------------------------------------------- /report/index.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | -------------------------------------------------------------------------------- /report/typologyreport/index.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | -------------------------------------------------------------------------------- /report/typologyreport/typologyreport.en_GB.php: -------------------------------------------------------------------------------- 1 | . 26 | -------------------------------------------------------------------------- 27 | */ 28 | $LANG['plugin_typology']['typologyreport'] = "Typologies state by service"; 29 | 30 | -------------------------------------------------------------------------------- /report/typologyreport/typologyreport.fr_FR.php: -------------------------------------------------------------------------------- 1 | . 26 | -------------------------------------------------------------------------- 27 | */ 28 | $LANG['plugin_typology']['typologyreport'] = "Etat des typologies par service"; 29 | 30 | -------------------------------------------------------------------------------- /front/typologycriteria.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | use GlpiPlugin\Typology\Typology; 31 | 32 | $typo = new Typology(); 33 | $typo->redirectToList(); 34 | -------------------------------------------------------------------------------- /front/ruletypology.php: -------------------------------------------------------------------------------- 1 | . 28 | -------------------------------------------------------------------------- 29 | */ 30 | 31 | use GlpiPlugin\Typology\RuleTypologyCollection; 32 | 33 | $rulecollection = new RuleTypologyCollection($_SESSION['glpiactive_entity']); 34 | 35 | include(GLPI_ROOT . "/front/rule.common.php"); 36 | -------------------------------------------------------------------------------- /front/ruletypology.form.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | use GlpiPlugin\Typology\RuleTypologyCollection; 31 | 32 | $rulecollection = new RuleTypologyCollection($_SESSION['glpiactive_entity']); 33 | 34 | include(GLPI_ROOT . "/front/rule.common.form.php"); 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # typology 2 | Plugin typology pour GLPI 3 | 4 | Ce plugin est sur Transifex - Aidez-nous à le traduire : 5 | https://www.transifex.com/infotelGLPI/GLPI_typology/ 6 | 7 | This plugin is on Transifex - Help us to translate : 8 | https://www.transifex.com/infotelGLPI/GLPI_typology/ 9 | 10 | Ce plugin permet de définir des typologies d'usage (gestion de configurations) à partir des informations des éléments inventoriés dans GLPI. 11 | Exemple : les ordinateurs ayant tel nom doivent avoir tel lieu, tel statut, telle IP et pas tel ou tel logiciel.. 12 | 13 | * Fonctionnalités : 14 | 15 | > * Utilisation d'un moteur de règle d'affectation de typologie 16 | > * Définition de critères (Informations générales de l'ordinateur / Composants / Réseau / Logiciels) 17 | > * Alertes : Vérification des typologies respectées 18 | > * Actions automatiques : Mise à jour automatique des typologies affectées 19 | > * Rapport : Liste des typologies par service 20 | 21 | This plugin allows you to define typologies of use (configuration management) from the information items inventoried in GLPI. 22 | Example : computers which have this name must have this location and this IP and not this software. 23 | 24 | * Features : 25 | 26 | > * Use of an rule engine for typologies assignment 27 | > * Definition of criteria (General Information Computer / Components / Network / Software) 28 | > * Alerts: Checking typologies observed 29 | > * Automatic Actions: Automatic update of affected typologies 30 | > * Report : List of typologies of services 31 | -------------------------------------------------------------------------------- /front/typology.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | use Glpi\Exception\Http\AccessDeniedHttpException; 31 | use GlpiPlugin\Typology\Typology; 32 | 33 | Html::header(Typology::getTypeName(2), '', "tools", Typology::class); 34 | 35 | $typo = new Typology(); 36 | if ($typo->canView() || Session::haveRight("config", UPDATE)) { 37 | Search::show(Typology::class); 38 | } else { 39 | throw new AccessDeniedHttpException(); 40 | } 41 | 42 | Html::footer(); 43 | -------------------------------------------------------------------------------- /ajax/dropdownAction.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | use GlpiPlugin\Typology\TypologyCriteriaDefinition; 31 | 32 | if (strpos($_SERVER['PHP_SELF'], "dropdownAction.php")) { 33 | header("Content-Type: text/html; charset=UTF-8"); 34 | Html::header_nocache(); 35 | } 36 | Session::checkRight('plugin_typology', UPDATE); 37 | Session::checkLoginUser(); 38 | 39 | //Display list of logical operator depending on field 40 | TypologyCriteriaDefinition::dropdownSelect( 41 | $_POST['itemtype'], 42 | $_POST['typocrit_id'], 43 | $_POST['field'] 44 | ); 45 | -------------------------------------------------------------------------------- /ajax/dropdownMassiveActionField.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | use Glpi\Exception\Http\NotFoundHttpException; 31 | 32 | header("Content-Type: text/html; charset=UTF-8"); 33 | Html::header_nocache(); 34 | 35 | Session::checkRight('plugin_typology', UPDATE); 36 | Session::checkLoginUser(); 37 | 38 | if (!isset($_POST["field"])) { 39 | throw new NotFoundHttpException(); 40 | } 41 | 42 | if (isset($_POST["field"]) && $_POST["field"]) { 43 | Dropdown::showYesNo('is_active'); 44 | echo "
 "; 45 | echo Html::submit(_sx('button', 'Post'), ['name' => 'massiveaction', 'class' => 'btn btn-primary']); 46 | } 47 | -------------------------------------------------------------------------------- /ajax/dropdownCaseValue.php: -------------------------------------------------------------------------------- 1 | . 28 | -------------------------------------------------------------------------- 29 | */ 30 | 31 | use GlpiPlugin\Typology\TypologyCriteriaDefinition; 32 | 33 | if (strpos($_SERVER['PHP_SELF'], "dropdownCaseValue.php")) { 34 | header("Content-Type: text/html; charset=UTF-8"); 35 | Html::header_nocache(); 36 | } 37 | Session::checkRight('plugin_typology', UPDATE); 38 | 39 | Session::checkLoginUser(); 40 | 41 | if (!defined('GLPI_ROOT')) { 42 | die("Can not acces directly to this file"); 43 | } 44 | 45 | $options = ['itemtype' => $_POST['itemtype'], 46 | 'typocrit_id' => $_POST['typocrit_id'], 47 | 'field' => $_POST['field'], 48 | 'action_type' => $_POST['action_type']]; 49 | 50 | //Display list of values or text field depending on action_type 51 | TypologyCriteriaDefinition::dropdownValues($options); 52 | -------------------------------------------------------------------------------- /tools/extract_template.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | # --- Étape 1 : Extraction des chaînes PHP --- 5 | find . -name '*.php' > php_files.list 6 | 7 | xgettext --files-from=php_files.list \ 8 | --copyright-holder='Typology Development Team' \ 9 | --package-name='Typology plugin' \ 10 | -o locales/glpi.pot \ 11 | -L PHP \ 12 | --add-comments=TRANS \ 13 | --from-code=UTF-8 \ 14 | --force-po \ 15 | --sort-output \ 16 | --keyword=_n:1,2,4t \ 17 | --keyword=__s:1,2t \ 18 | --keyword=__:1,2t \ 19 | --keyword=_e:1,2t \ 20 | --keyword=_x:1c,2,3t \ 21 | --keyword=_ex:1c,2,3t \ 22 | --keyword=_nx:1c,2,3,5t \ 23 | --keyword=_sx:1c,2,3t 24 | 25 | rm php_files.list 26 | 27 | # --- Étape 2 : Extraction des chaînes Twig --- 28 | 29 | # Append locales from Twig templates 30 | SCRIPT_DIR=$(dirname $0) 31 | WORKING_DIR=$(readlink -f "$SCRIPT_DIR/..") # Script will be executed from "vendor/bin" directory 32 | # Define translate function args 33 | F_ARGS_N="1,2" 34 | F_ARGS__S="1" 35 | F_ARGS__="1" 36 | F_ARGS_X="1c,2" 37 | F_ARGS_SX="1c,2" 38 | F_ARGS_NX="1c,2,3" 39 | F_ARGS_SN="1,2" 40 | 41 | for file in $(cd $WORKING_DIR && find -regextype posix-egrep -not -regex $EXCLUDE_REGEX "$SCRIPT_DIR/.." -name "*.twig") 42 | do 43 | # 1. Convert file content to replace "{{ function(.*) }}" by "" and extract strings via std input 44 | # 2. Replace "standard input:line_no" by file location in po file comments 45 | contents=`cat $file | sed -r "s|\{\{\s*([a-z0-9_]+\(.*\))\s*\}\}||gi"` 46 | cat $file | perl -0pe "s/\{\{(.*?)\}\}//gism" | xgettext - \ 47 | -o locales/glpi.pot \ 48 | -L PHP \ 49 | --add-comments=TRANS \ 50 | --from-code=UTF-8 \ 51 | --force-po \ 52 | --join-existing \ 53 | --sort-output \ 54 | --keyword=_n:$F_ARGS_N \ 55 | --keyword=__:$F_ARGS__ \ 56 | --keyword=_x:$F_ARGS_X \ 57 | --keyword=_nx:$F_ARGS_NX 58 | sed -i -r "s|standard input:([0-9]+)|`echo $file | sed "s|./||"`:\1|g" locales/glpi.pot 59 | done 60 | -------------------------------------------------------------------------------- /front/rulesengine.test.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | Session::checkCentralAccess(); 31 | 32 | if (isset($_POST["sub_type"])) { 33 | $sub_type = $_POST["sub_type"]; 34 | } elseif (isset($_GET["sub_type"])) { 35 | $sub_type = $_GET["sub_type"]; 36 | } else { 37 | $sub_type = 0; 38 | } 39 | 40 | if (isset($_POST["condition"])) { 41 | $condition = $_POST["condition"]; 42 | } elseif (isset($_GET["condition"])) { 43 | $condition = $_GET["condition"]; 44 | } else { 45 | $condition = 0; 46 | } 47 | 48 | $rulecollection = RuleCollection::getClassByType($sub_type); 49 | if ($rulecollection->isRuleRecursive()) { 50 | $rulecollection->setEntity($_SESSION['glpiactive_entity']); 51 | } 52 | $rulecollection->checkGlobal(READ); 53 | 54 | Html::popHeader(__('Setup'), $_SERVER['PHP_SELF']); 55 | 56 | // Need for RuleEngines 57 | foreach ($_POST as $key => $val) { 58 | $_POST[$key] = stripslashes($_POST[$key]); 59 | } 60 | $input = $rulecollection->showRulesEnginePreviewCriteriasForm($_SERVER['PHP_SELF'], $_POST, $condition); 61 | 62 | if (isset($_POST["test_all_rules"])) { 63 | //Unset values that must not be processed by the rule 64 | unset($_POST["sub_type"]); 65 | unset($_POST["test_all_rules"]); 66 | 67 | echo "
"; 68 | $rulecollection->showRulesEnginePreviewResultsForm($_SERVER['PHP_SELF'], $_POST, $condition); 69 | } 70 | 71 | Html::popFooter(); 72 | -------------------------------------------------------------------------------- /src/RuleTypologyCollection.php: -------------------------------------------------------------------------------- 1 | . 28 | -------------------------------------------------------------------------- 29 | */ 30 | 31 | namespace GlpiPlugin\Typology; 32 | 33 | use RuleCollection; 34 | use Session; 35 | 36 | /** 37 | * Class RuleTypologyCollection 38 | */ 39 | class RuleTypologyCollection extends RuleCollection 40 | { 41 | // From RuleCollection 42 | public $stop_on_first_match = true; 43 | public static $rightname = 'plugin_typology'; 44 | public $menu_option = 'typologies'; 45 | 46 | /** 47 | * Get title used in list of rules 48 | * 49 | * @return string of the rule collection 50 | **/ 51 | public function getTitle() 52 | { 53 | 54 | return __('Rules for assigning a typology to a computer', 'typology'); 55 | } 56 | 57 | /** 58 | * RuleTypologyCollection constructor. 59 | * 60 | * @param int $entity 61 | */ 62 | public function __construct($entity = 0) 63 | { 64 | $this->entity = $entity; 65 | } 66 | 67 | /** 68 | * @return bool 69 | */ 70 | public function showInheritedTab() 71 | { 72 | return Session::haveRight("plugin_typology", UPDATE) 73 | && ($this->entity); 74 | } 75 | 76 | /** 77 | * @return bool 78 | */ 79 | public function showChildrensTab() 80 | { 81 | return Session::haveRight("plugin_typology", UPDATE) 82 | && (count($_SESSION['glpiactiveentities']) > 1); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /front/rule.test.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | Session::checkCentralAccess(); 31 | 32 | if (isset($_POST["sub_type"])) { 33 | $sub_type = $_POST["sub_type"]; 34 | } elseif (isset($_GET["sub_type"])) { 35 | $sub_type = $_GET["sub_type"]; 36 | } else { 37 | $sub_type = 0; 38 | } 39 | 40 | if (isset($_POST["rules_id"])) { 41 | $rules_id = $_POST["rules_id"]; 42 | } elseif (isset($_GET["rules_id"])) { 43 | $rules_id = $_GET["rules_id"]; 44 | } else { 45 | $rules_id = 0; 46 | } 47 | $dbu = new DbUtils(); 48 | if (!$rule = $dbu->getItemForItemtype($sub_type)) { 49 | exit; 50 | } 51 | $rule->checkGlobal(READ); 52 | 53 | $test_rule_output = null; 54 | 55 | Html::popHeader(__('Setup'), $_SERVER['PHP_SELF']); 56 | 57 | $rule->showRulePreviewCriteriasForm($_SERVER['PHP_SELF'], $rules_id); 58 | 59 | if (isset($_POST["test_rule"])) { 60 | $params = []; 61 | //Unset values that must not be processed by the rule 62 | unset($_POST["test_rule"]); 63 | unset($_POST["rules_id"]); 64 | unset($_POST["sub_type"]); 65 | $rule->getRuleWithCriteriasAndActions($rules_id, 1, 1); 66 | 67 | // Need for RuleEngines 68 | foreach ($_POST as $key => $val) { 69 | $_POST[$key] = stripslashes($_POST[$key]); 70 | } 71 | //Add rules specific POST fields to the param array 72 | $params = $rule->addSpecificParamsForPreview($params); 73 | 74 | $input = $rule->prepareAllInputDataForProcess($_POST, $params); 75 | //$rule->regex_results = array(); 76 | echo "
"; 77 | $rule->showRulePreviewResultsForm($_SERVER['PHP_SELF'], $input, $params); 78 | } 79 | 80 | Html::popFooter(); 81 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | 2 | on: 3 | push: 4 | # Sequence of patterns matched against refs/tags 5 | tags: 6 | - '*.*.*' # Push events to matching ex:20.15.10 7 | 8 | name: Create release with tag 9 | env: 10 | TAG_VALUE: ${GITHUB_REF/refs\/tags\//} 11 | jobs: 12 | build: 13 | name: Upload Release Asset 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout code 17 | uses: actions/checkout@v2 18 | - name: Build project # This would actually build your project, using zip for an example artifact 19 | id: build_ 20 | env: 21 | GITHUB_NAME: ${{ github.event.repository.name }} 22 | 23 | 24 | run: sudo apt-get install libxml-xpath-perl;echo $(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml);echo ::set-output name=version_glpi::$(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml); rm -rf $GITHUB_NAME.xml tools wiki screenshots test .git .github ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png;cd ..; tar jcvf glpi-$GITHUB_NAME-${GITHUB_REF/refs\/tags\//}.tar.bz2 $GITHUB_NAME;ls -al;echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//};echo ${{ steps.getxml.outputs.info }}; 25 | # run: rm -rf $GITHUB_NAME.xml tools wiki screenshots test ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png; tar -zcvf glpi-$GITHUB_NAME-$GITHUB_TAG.tar.gz $GITHUB_NAME 26 | - name: Create Release 27 | id: create_release 28 | uses: actions/create-release@v1 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | with: 32 | tag_name: ${{ github.ref }} 33 | release_name: | 34 | GLPI ${{ steps.build_.outputs.version_glpi }} : Version ${{ github.ref }} disponible / available 35 | body : Version ${{ steps.build_.outputs.tag }} released for GLPI ${{ steps.build_.outputs.version_glpi }} 36 | draft: false 37 | prerelease: true 38 | - name: Upload Release Asset 39 | id: upload-release-asset 40 | uses: actions/upload-release-asset@v1 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 43 | GITHUB_NAME: ${{ github.event.repository.name }} 44 | with: 45 | upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps 46 | asset_path: /home/runner/work/${{ github.event.repository.name }}/glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2 47 | asset_name: glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2 48 | asset_content_type: application/zip 49 | 50 | -------------------------------------------------------------------------------- /front/typologycriteria.form.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | global $CFG_GLPI; 31 | 32 | use GlpiPlugin\Typology\Typology; 33 | use GlpiPlugin\Typology\TypologyCriteria; 34 | use GlpiPlugin\Typology\TypologyCriteriaDefinition; 35 | 36 | $typo = new Typology(); 37 | $criteria = new TypologyCriteria(); 38 | 39 | if (isset($_POST["update"])) { 40 | $criteria->check($_POST['id'], UPDATE); 41 | $criteria->update($_POST); 42 | Html::back(); 43 | } elseif (isset($_POST["add"])) { 44 | if (isset($_POST["itemtype"]) 45 | && !empty($_POST["itemtype"])) { 46 | $criteria->check(-1, CREATE, $_POST); 47 | $newID = $criteria->add($_POST); 48 | Html::redirect(PLUGIN_TYPOLOGY_WEBDIR . "/front/typologycriteria.form.php?id=$newID"); 49 | } else { 50 | Session::addMessageAfterRedirect(__('No element to be tested'), false, ERROR); 51 | Html::back(); 52 | } 53 | } elseif (isset($_POST["purge"])) { 54 | $criteria->check($_POST['id'], PURGE); 55 | $criteria->delete($_POST); 56 | $criteria->redirectToList(); 57 | } elseif (isset($_POST["add_action"])) { 58 | $criteria->check($_POST['plugin_typology_typologycriterias_id'], UPDATE); 59 | $definition = new TypologyCriteriaDefinition(); 60 | $definition->add($_POST); 61 | 62 | // Mise à jour de l'heure de modification pour le critère 63 | $criteria->update(['id' => $_POST['plugin_typology_typologycriterias_id'], 64 | 'date_mod' => $_SESSION['glpi_currenttime']]); 65 | Html::back(); 66 | } elseif (isset($_POST["delete_action"])) { 67 | $definition = new TypologyCriteriaDefinition(); 68 | 69 | if (isset($_POST["item"]) && count($_POST["item"])) { 70 | foreach ($_POST["item"] as $key => $val) { 71 | if ($val == 1) { 72 | if ($definition->can($key, UPDATE)) { 73 | $definition->delete(['id' => $key]); 74 | } 75 | } 76 | } 77 | } elseif (isset($_POST['id'])) { 78 | $definition->check($_POST['id'], UPDATE); 79 | $definition->delete($_POST); 80 | } 81 | 82 | $criteria->check($_POST['plugin_typology_typologycriterias_id'], UPDATE); 83 | 84 | // Can't do this in RuleAction, so do it here 85 | $criteria->update(['id' => $_POST['plugin_typology_typologycriterias_id'], 86 | 'date_mod' => $_SESSION['glpi_currenttime']]); 87 | Html::back(); 88 | } else { 89 | $typo->checkGlobal(READ); 90 | Html::header(Typology::getTypeName(2), '', "tools", Typology::class); 91 | 92 | $criteria->display($_GET); 93 | Html::footer(); 94 | } 95 | -------------------------------------------------------------------------------- /setup.php: -------------------------------------------------------------------------------- 1 | . 28 | -------------------------------------------------------------------------- 29 | */ 30 | 31 | global $CFG_GLPI; 32 | 33 | use Glpi\Plugin\Hooks; 34 | use GlpiPlugin\Behaviors\Common; 35 | use GlpiPlugin\Behaviors\Rule; 36 | use GlpiPlugin\Typology\Profile; 37 | use GlpiPlugin\Typology\RuleTypology; 38 | use GlpiPlugin\Typology\RuleTypologyCollection; 39 | use GlpiPlugin\Typology\Typology; 40 | 41 | define('PLUGIN_TYPOLOGY_VERSION', '4.0.0'); 42 | 43 | if (!defined("PLUGIN_TYPOLOGY_DIR")) { 44 | define("PLUGIN_TYPOLOGY_DIR", Plugin::getPhpDir("typology")); 45 | $root = $CFG_GLPI['root_doc'] . '/plugins/typology'; 46 | define("PLUGIN_TYPOLOGY_WEBDIR", $root); 47 | } 48 | 49 | // Init the hooks of the plugins -Needed 50 | function plugin_init_typology() 51 | { 52 | global $PLUGIN_HOOKS; 53 | 54 | $PLUGIN_HOOKS[Hooks::ADD_CSS]['typology'] = 'typology.css'; 55 | $PLUGIN_HOOKS['csrf_compliant']['typology'] = true; 56 | $PLUGIN_HOOKS['change_profile']['typology'] = [Profile::class,'initProfile']; 57 | 58 | if (Session::getLoginUserID()) { 59 | Plugin::registerClass( 60 | Profile::class, 61 | ['addtabon' => 'Profile'] 62 | ); 63 | 64 | Plugin::registerClass(Typology::class, [ 65 | 'notificationtemplates_types' => true, 66 | ]); 67 | // Display a menu entry ? 68 | if (Session::haveRight("plugin_typology", READ)) { 69 | // menu entry 70 | $PLUGIN_HOOKS['menu_toadd']['typology'] = ['tools' => Typology::class]; 71 | } 72 | 73 | if (Session::haveRight("plugin_typology", UPDATE)) { 74 | //use massiveaction in the plugin 75 | $PLUGIN_HOOKS['use_massive_action']['typology'] = 1; 76 | $PLUGIN_HOOKS['redirect_page']['typology'] = PLUGIN_TYPOLOGY_WEBDIR . '/front/typology.form.php'; 77 | } 78 | 79 | Plugin::registerClass(RuleTypologyCollection::class, [ 80 | 'rulecollections_types' => true, 81 | ]); 82 | 83 | if (class_exists(Common::class)) { 84 | Common::addCloneType(RuleTypology::class, Rule::class); 85 | } 86 | 87 | $PLUGIN_HOOKS['post_init']['typology'] = 'plugin_typology_postinit'; 88 | } 89 | } 90 | 91 | // Get the name and the version of the plugin - Needed 92 | /** 93 | * @return array 94 | */ 95 | function plugin_version_typology() 96 | { 97 | 98 | return [ 99 | 'name' => _n('Typology', 'Typologies', 2, 'typology'), 100 | 'version' => PLUGIN_TYPOLOGY_VERSION, 101 | 'author' => "Infotel", 102 | 'license' => 'GPLv2+', 103 | 'homepage' => 'https://github.com/InfotelGLPI/typology', 104 | 'requirements' => [ 105 | 'glpi' => [ 106 | 'min' => '11.0', 107 | 'max' => '12.0', 108 | 'dev' => false, 109 | ], 110 | ], 111 | ]; 112 | } 113 | -------------------------------------------------------------------------------- /sql/empty-1.1.0.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Plugin Typology 3 | -- 4 | -- -------------------------------------------------------- 5 | -- 6 | -- Structure de la table 'glpi_plugin_typology_typologies' 7 | -- Liste des profils d'usage � cr�er lors de la configuration 8 | -- 9 | 10 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies`; 11 | CREATE TABLE `glpi_plugin_typology_typologies` ( 12 | `id` int(11) NOT NULL AUTO_INCREMENT, -- id du profil d'usage 13 | `entities_id` int(11) NOT NULL default '0', -- � laisser pour l'utilisation des entit�s 14 | `is_recursive` tinyint(1) NOT NULL default '0', -- � laisser pour l'utilisation de la r�cursivit� 15 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du profil ex: Poste M�decin, ... 16 | `comment` text COLLATE utf8_unicode_ci, -- commentaires si n�cessaire 17 | `is_deleted` tinyint(1) NOT NULL default '0', -- pour placer les profils dans la corbeille avant purge d�finitive ou restoration 18 | `date_mod` datetime NULL default NULL, -- date de derni�re modif du profil (quand il y a modification de la liste de mat�riels li�s � ce type de profil d'usage) 19 | PRIMARY KEY (`id`), -- index 20 | KEY `name` (`name`), -- index 21 | KEY `entities_id` (`entities_id`), -- index 22 | KEY `is_recursive` (`is_recursive`), -- index 23 | KEY `is_deleted` (`is_deleted`) -- index 24 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 25 | 26 | 27 | -- -------------------------------------------------------- 28 | -- 29 | -- Structure de la table 'glpi_plugin_typology_typologycriterias' 30 | -- Liste des crit�res pour chaque profils (mat�riels li�s) (cf glpi_slalevels) 31 | -- 32 | 33 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriterias`; 34 | CREATE TABLE `glpi_plugin_typology_typologycriterias` ( 35 | `id` int(11) NOT NULL auto_increment, -- id ... 36 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du crit�re, ex: type d'�cran 37 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 38 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, p�riph�rique ...) 39 | `link` tinyint(1) NOT NULL default '0',-- AND ou OR entre les définitions d'un critère 40 | `entities_id` int(11) NOT NULL default '0', -- � laisser pour l'utilisation des entit�s 41 | `is_recursive` tinyint(1) NOT NULL default '0', -- � laisser pour l'utilisation de la r�cursivit� 42 | `date_mod` datetime default NULL, 43 | `is_active` tinyint(1) NOT NULL default '0', 44 | PRIMARY KEY (`id`), -- index 45 | KEY `name` (`name`), -- index 46 | KEY `plugin_typology_typologies_id` (`plugin_typology_typologies_id`) -- index 47 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 48 | 49 | 50 | -- -------------------------------------------------------- 51 | -- 52 | -- Structure de la table 'glpi_plugin_typology_typologycriteriadefinitions' 53 | -- D�finition des crit�res pour chaque profils (champ et valeur) (cf glpi_slalevelactions) 54 | -- 55 | 56 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriteriadefinitions`; 57 | CREATE TABLE `glpi_plugin_typology_typologycriteriadefinitions` ( 58 | `id` int(11) NOT NULL auto_increment, -- id ... 59 | `plugin_typology_typologycriterias_id` int(11) NOT NULL default '0', -- lien avec le crit�re du profil d'usage 60 | `field` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- info suppl sur l'objet taille (�cran), Nom (logiciel) ... 61 | `action_type` varchar(100) collate utf8_unicode_ci NOT NULL,-- action de type contient, est ... 62 | `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- valeur attendue pour chaque crit�re (field) 63 | `entities_id` int(11) NOT NULL default '0', -- � laisser pour l'utilisation des entit�s 64 | `is_recursive` tinyint(1) NOT NULL default '0', -- � laisser pour l'utilisation de la r�cursivit� 65 | PRIMARY KEY (`id`), -- index 66 | KEY `plugin_typology_typologycriterias_id` (`plugin_typology_typologycriterias_id`) -- index 67 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 68 | 69 | -- -------------------------------------------------------- 70 | -- 71 | -- Structure de la table 'glpi_plugin_typology_items' 72 | -- Affectation de la typologie aux mat�riels 73 | -- 74 | 75 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies_items`; 76 | CREATE TABLE `glpi_plugin_typology_typologies_items` ( 77 | `id` int(11) NOT NULL auto_increment, -- id 78 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 79 | `items_id` int(11) NOT NULL default '0' COMMENT 'RELATION to various tables, according to itemtype (id)',-- nom sp�cifique de l'objet (ex: bloc note 90 pages, ...), nom 80 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, p�riph�rique ...) 81 | `is_validated` tinyint(1) DEFAULT NULL, -- result from consolemanagement 82 | `error` longtext collate utf8_unicode_ci DEFAULT NULL, 83 | PRIMARY KEY (`id`), -- index 84 | UNIQUE KEY `unicity` (`plugin_typology_typologies_id`,`itemtype`,`items_id`), -- cl� unique pour cet ensemble 85 | KEY `itemtype` (`itemtype`), -- index 86 | KEY `items_id` (`items_id`) -- index 87 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 88 | 89 | INSERT INTO `glpi_notificationtemplates` VALUES(NULL, 'Alert no validated typology', 'PluginTypologyTypology', '2012-11-19 15:20:46','',NULL); -------------------------------------------------------------------------------- /sql/empty-2.5.0.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Plugin Typology 3 | -- 4 | -- -------------------------------------------------------- 5 | -- 6 | -- Structure de la table 'glpi_plugin_typology_typologies' 7 | -- Liste des profils d'usage e creer lors de la configuration 8 | -- 9 | 10 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies`; 11 | CREATE TABLE `glpi_plugin_typology_typologies` ( 12 | `id` int(11) NOT NULL AUTO_INCREMENT, -- id du profil d'usage 13 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 14 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 15 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du profil ex: Poste Medecin, ... 16 | `comment` text COLLATE utf8_unicode_ci, -- commentaires si necessaire 17 | `is_deleted` tinyint(1) NOT NULL default '0', -- pour placer les profils dans la corbeille avant purge definitive ou restoration 18 | `date_mod` datetime NULL default NULL, -- date de derniere modif du profil (quand il y a modification de la liste de materiels lies a ce type de profil d'usage) 19 | PRIMARY KEY (`id`), -- index 20 | KEY `name` (`name`), -- index 21 | KEY `entities_id` (`entities_id`), -- index 22 | KEY `is_recursive` (`is_recursive`), -- index 23 | KEY `is_deleted` (`is_deleted`) -- index 24 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 25 | 26 | 27 | -- -------------------------------------------------------- 28 | -- 29 | -- Structure de la table 'glpi_plugin_typology_typologycriterias' 30 | -- Liste des criteres pour chaque profils (materiels lies) (cf glpi_slalevels) 31 | -- 32 | 33 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriterias`; 34 | CREATE TABLE `glpi_plugin_typology_typologycriterias` ( 35 | `id` int(11) NOT NULL auto_increment, -- id ... 36 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du critere, ex: type d'ecran 37 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 38 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 39 | `link` tinyint(1) NOT NULL default '0',-- AND ou OR entre les définitions d'un critère 40 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 41 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 42 | `date_mod` datetime default NULL, 43 | `is_active` tinyint(1) NOT NULL default '0', 44 | PRIMARY KEY (`id`), -- index 45 | KEY `name` (`name`), -- index 46 | KEY `plugin_typology_typologies_id` (`plugin_typology_typologies_id`) -- index 47 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 48 | 49 | 50 | -- -------------------------------------------------------- 51 | -- 52 | -- Structure de la table 'glpi_plugin_typology_typologycriteriadefinitions' 53 | -- Definition des criteres pour chaque profils (champ et valeur) (cf glpi_slalevelactions) 54 | -- 55 | 56 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriteriadefinitions`; 57 | CREATE TABLE `glpi_plugin_typology_typologycriteriadefinitions` ( 58 | `id` int(11) NOT NULL auto_increment, -- id ... 59 | `plugin_typology_typologycriterias_id` int(11) NOT NULL default '0', -- lien avec le critere du profil d'usage 60 | `field` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- info suppl sur l'objet taille (ecran), Nom (logiciel) ... 61 | `action_type` varchar(100) collate utf8_unicode_ci NOT NULL,-- action de type contient, est ... 62 | `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- valeur attendue pour chaque critere (field) 63 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 64 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 65 | PRIMARY KEY (`id`), -- index 66 | KEY `plugin_typology_typologycriterias_id` (`plugin_typology_typologycriterias_id`) -- index 67 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 68 | 69 | -- -------------------------------------------------------- 70 | -- 71 | -- Structure de la table 'glpi_plugin_typology_items' 72 | -- Affectation de la typologie aux materiels 73 | -- 74 | 75 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies_items`; 76 | CREATE TABLE `glpi_plugin_typology_typologies_items` ( 77 | `id` int(11) NOT NULL auto_increment, -- id 78 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 79 | `items_id` int(11) NOT NULL default '0' COMMENT 'RELATION to various tables, according to itemtype (id)',-- nom specifique de l'objet (ex: bloc note 90 pages, ...), nom 80 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 81 | `is_validated` tinyint(1) DEFAULT NULL, -- result from consolemanagement 82 | `error` longtext collate utf8_unicode_ci DEFAULT NULL, 83 | PRIMARY KEY (`id`), -- index 84 | UNIQUE KEY `unicity` (`plugin_typology_typologies_id`,`itemtype`,`items_id`), -- cle unique pour cet ensemble 85 | KEY `itemtype` (`itemtype`), -- index 86 | KEY `items_id` (`items_id`) -- index 87 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 88 | 89 | INSERT INTO `glpi_notificationtemplates` VALUES(NULL, 'Alert no validated typology', 'PluginTypologyTypology', '2012-11-19 15:20:46','',NULL, '2012-11-19 15:20:46'); -------------------------------------------------------------------------------- /sql/empty-3.0.0.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Plugin Typology 3 | -- 4 | -- -------------------------------------------------------- 5 | -- 6 | -- Structure de la table 'glpi_plugin_typology_typologies' 7 | -- Liste des profils d'usage e creer lors de la configuration 8 | -- 9 | 10 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies`; 11 | CREATE TABLE `glpi_plugin_typology_typologies` ( 12 | `id` int(11) NOT NULL AUTO_INCREMENT, -- id du profil d'usage 13 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 14 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 15 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du profil ex: Poste Medecin, ... 16 | `comment` text COLLATE utf8_unicode_ci, -- commentaires si necessaire 17 | `is_deleted` tinyint(1) NOT NULL default '0', -- pour placer les profils dans la corbeille avant purge definitive ou restoration 18 | `date_mod` TIMESTAMP NULL DEFAULT NULL, -- date de derniere modif du profil (quand il y a modification de la liste de materiels lies a ce type de profil d'usage) 19 | PRIMARY KEY (`id`), -- index 20 | KEY `name` (`name`), -- index 21 | KEY `entities_id` (`entities_id`), -- index 22 | KEY `is_recursive` (`is_recursive`), -- index 23 | KEY `is_deleted` (`is_deleted`) -- index 24 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 25 | 26 | 27 | -- -------------------------------------------------------- 28 | -- 29 | -- Structure de la table 'glpi_plugin_typology_typologycriterias' 30 | -- Liste des criteres pour chaque profils (materiels lies) (cf glpi_slalevels) 31 | -- 32 | 33 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriterias`; 34 | CREATE TABLE `glpi_plugin_typology_typologycriterias` ( 35 | `id` int(11) NOT NULL auto_increment, -- id ... 36 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du critere, ex: type d'ecran 37 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 38 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 39 | `link` tinyint(1) NOT NULL default '0',-- AND ou OR entre les définitions d'un critère 40 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 41 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 42 | `date_mod` TIMESTAMP NULL DEFAULT NULL, 43 | `is_active` tinyint(1) NOT NULL default '0', 44 | PRIMARY KEY (`id`), -- index 45 | KEY `name` (`name`), -- index 46 | KEY `plugin_typology_typologies_id` (`plugin_typology_typologies_id`) -- index 47 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 48 | 49 | 50 | -- -------------------------------------------------------- 51 | -- 52 | -- Structure de la table 'glpi_plugin_typology_typologycriteriadefinitions' 53 | -- Definition des criteres pour chaque profils (champ et valeur) (cf glpi_slalevelactions) 54 | -- 55 | 56 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriteriadefinitions`; 57 | CREATE TABLE `glpi_plugin_typology_typologycriteriadefinitions` ( 58 | `id` int(11) NOT NULL auto_increment, -- id ... 59 | `plugin_typology_typologycriterias_id` int(11) NOT NULL default '0', -- lien avec le critere du profil d'usage 60 | `field` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- info suppl sur l'objet taille (ecran), Nom (logiciel) ... 61 | `action_type` varchar(100) collate utf8_unicode_ci NOT NULL,-- action de type contient, est ... 62 | `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- valeur attendue pour chaque critere (field) 63 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 64 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 65 | PRIMARY KEY (`id`), -- index 66 | KEY `plugin_typology_typologycriterias_id` (`plugin_typology_typologycriterias_id`) -- index 67 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 68 | 69 | -- -------------------------------------------------------- 70 | -- 71 | -- Structure de la table 'glpi_plugin_typology_items' 72 | -- Affectation de la typologie aux materiels 73 | -- 74 | 75 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies_items`; 76 | CREATE TABLE `glpi_plugin_typology_typologies_items` ( 77 | `id` int(11) NOT NULL auto_increment, -- id 78 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 79 | `items_id` int(11) NOT NULL default '0' COMMENT 'RELATION to various tables, according to itemtype (id)',-- nom specifique de l'objet (ex: bloc note 90 pages, ...), nom 80 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 81 | `is_validated` tinyint(1) DEFAULT NULL, -- result from consolemanagement 82 | `error` longtext collate utf8_unicode_ci DEFAULT NULL, 83 | PRIMARY KEY (`id`), -- index 84 | UNIQUE KEY `unicity` (`plugin_typology_typologies_id`,`itemtype`,`items_id`), -- cle unique pour cet ensemble 85 | KEY `itemtype` (`itemtype`), -- index 86 | KEY `items_id` (`items_id`) -- index 87 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 88 | 89 | INSERT INTO `glpi_notificationtemplates` VALUES(NULL, 'Alert no validated typology', 'PluginTypologyTypology', '2012-11-19 15:20:46','',NULL, '2012-11-19 15:20:46'); -------------------------------------------------------------------------------- /sql/empty-1.2.0.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Plugin Typology 3 | -- 4 | -- -------------------------------------------------------- 5 | -- 6 | -- Structure de la table 'glpi_plugin_typology_typologies' 7 | -- Liste des profils d'usage e creer lors de la configuration 8 | -- 9 | 10 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies`; 11 | CREATE TABLE `glpi_plugin_typology_typologies` ( 12 | `id` int(11) NOT NULL AUTO_INCREMENT, -- id du profil d'usage 13 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 14 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 15 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du profil ex: Poste Medecin, ... 16 | `comment` text COLLATE utf8_unicode_ci, -- commentaires si necessaire 17 | `is_deleted` tinyint(1) NOT NULL default '0', -- pour placer les profils dans la corbeille avant purge definitive ou restoration 18 | `date_mod` datetime NULL default NULL, -- date de derniere modif du profil (quand il y a modification de la liste de materiels lies a ce type de profil d'usage) 19 | PRIMARY KEY (`id`), -- index 20 | KEY `name` (`name`), -- index 21 | KEY `entities_id` (`entities_id`), -- index 22 | KEY `is_recursive` (`is_recursive`), -- index 23 | KEY `is_deleted` (`is_deleted`) -- index 24 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 25 | 26 | 27 | -- -------------------------------------------------------- 28 | -- 29 | -- Structure de la table 'glpi_plugin_typology_typologycriterias' 30 | -- Liste des criteres pour chaque profils (materiels lies) (cf glpi_slalevels) 31 | -- 32 | 33 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriterias`; 34 | CREATE TABLE `glpi_plugin_typology_typologycriterias` ( 35 | `id` int(11) NOT NULL auto_increment, -- id ... 36 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du critere, ex: type d'ecran 37 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 38 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 39 | `link` tinyint(1) NOT NULL default '0',-- AND ou OR entre les définitions d'un critère 40 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 41 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 42 | `date_mod` datetime default NULL, 43 | `is_active` tinyint(1) NOT NULL default '0', 44 | PRIMARY KEY (`id`), -- index 45 | KEY `name` (`name`), -- index 46 | KEY `plugin_typology_typologies_id` (`plugin_typology_typologies_id`) -- index 47 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 48 | 49 | 50 | -- -------------------------------------------------------- 51 | -- 52 | -- Structure de la table 'glpi_plugin_typology_typologycriteriadefinitions' 53 | -- Definition des criteres pour chaque profils (champ et valeur) (cf glpi_slalevelactions) 54 | -- 55 | 56 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriteriadefinitions`; 57 | CREATE TABLE `glpi_plugin_typology_typologycriteriadefinitions` ( 58 | `id` int(11) NOT NULL auto_increment, -- id ... 59 | `plugin_typology_typologycriterias_id` int(11) NOT NULL default '0', -- lien avec le critere du profil d'usage 60 | `field` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- info suppl sur l'objet taille (ecran), Nom (logiciel) ... 61 | `action_type` varchar(100) collate utf8_unicode_ci NOT NULL,-- action de type contient, est ... 62 | `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- valeur attendue pour chaque critere (field) 63 | `entities_id` int(11) NOT NULL default '0', -- laisser pour l'utilisation des entites 64 | `is_recursive` tinyint(1) NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 65 | PRIMARY KEY (`id`), -- index 66 | KEY `plugin_typology_typologycriterias_id` (`plugin_typology_typologycriterias_id`) -- index 67 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 68 | 69 | -- -------------------------------------------------------- 70 | -- 71 | -- Structure de la table 'glpi_plugin_typology_items' 72 | -- Affectation de la typologie aux materiels 73 | -- 74 | 75 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies_items`; 76 | CREATE TABLE `glpi_plugin_typology_typologies_items` ( 77 | `id` int(11) NOT NULL auto_increment, -- id 78 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 79 | `items_id` int(11) NOT NULL default '0' COMMENT 'RELATION to various tables, according to itemtype (id)',-- nom specifique de l'objet (ex: bloc note 90 pages, ...), nom 80 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 81 | `is_validated` tinyint(1) DEFAULT NULL, -- result from consolemanagement 82 | `error` longtext collate utf8_unicode_ci DEFAULT NULL, 83 | PRIMARY KEY (`id`), -- index 84 | UNIQUE KEY `unicity` (`plugin_typology_typologies_id`,`itemtype`,`items_id`), -- cle unique pour cet ensemble 85 | KEY `itemtype` (`itemtype`), -- index 86 | KEY `items_id` (`items_id`) -- index 87 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 88 | 89 | INSERT INTO `glpi_notificationtemplates` VALUES(NULL, 'Alert no validated typology', 'PluginTypologyTypology', '2012-11-19 15:20:46','',NULL, '2012-11-19 15:20:46'); -------------------------------------------------------------------------------- /sql/empty-4.0.0.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Plugin Typology 3 | -- 4 | -- -------------------------------------------------------- 5 | -- 6 | -- Structure de la table 'glpi_plugin_typology_typologies' 7 | -- Liste des profils d'usage e creer lors de la configuration 8 | -- 9 | 10 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies`; 11 | CREATE TABLE `glpi_plugin_typology_typologies` ( 12 | `id` int unsigned NOT NULL AUTO_INCREMENT, -- id du profil d'usage 13 | `entities_id` int unsigned NOT NULL default '0', -- laisser pour l'utilisation des entites 14 | `is_recursive` tinyint NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 15 | `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- nom du profil ex: Poste Medecin, ... 16 | `comment` text COLLATE utf8mb4_unicode_ci, -- commentaires si necessaire 17 | `is_deleted` tinyint NOT NULL default '0', -- pour placer les profils dans la corbeille avant purge definitive ou restoration 18 | `date_mod` TIMESTAMP NULL DEFAULT NULL, -- date de derniere modif du profil (quand il y a modification de la liste de materiels lies a ce type de profil d'usage) 19 | PRIMARY KEY (`id`), -- index 20 | KEY `name` (`name`), -- index 21 | KEY `entities_id` (`entities_id`), -- index 22 | KEY `is_recursive` (`is_recursive`), -- index 23 | KEY `is_deleted` (`is_deleted`) -- index 24 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; 25 | 26 | 27 | -- -------------------------------------------------------- 28 | -- 29 | -- Structure de la table 'glpi_plugin_typology_typologycriterias' 30 | -- Liste des criteres pour chaque profils (materiels lies) (cf glpi_slalevels) 31 | -- 32 | 33 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriterias`; 34 | CREATE TABLE `glpi_plugin_typology_typologycriterias` ( 35 | `id` int unsigned NOT NULL auto_increment, -- id ... 36 | `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- nom du critere, ex: type d'ecran 37 | `plugin_typology_typologies_id` int unsigned NOT NULL default '0', -- lien avec le profil d'usage 38 | `itemtype` varchar(100) collate utf8mb4_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 39 | `link` tinyint NOT NULL default '0',-- AND ou OR entre les définitions d'un critère 40 | `entities_id` int unsigned NOT NULL default '0', -- laisser pour l'utilisation des entites 41 | `is_recursive` tinyint NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 42 | `date_mod` TIMESTAMP NULL DEFAULT NULL, 43 | `is_active` tinyint NOT NULL default '0', 44 | PRIMARY KEY (`id`), -- index 45 | KEY `name` (`name`), -- index 46 | KEY `plugin_typology_typologies_id` (`plugin_typology_typologies_id`) -- index 47 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; 48 | 49 | 50 | -- -------------------------------------------------------- 51 | -- 52 | -- Structure de la table 'glpi_plugin_typology_typologycriteriadefinitions' 53 | -- Definition des criteres pour chaque profils (champ et valeur) (cf glpi_slalevelactions) 54 | -- 55 | 56 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriteriadefinitions`; 57 | CREATE TABLE `glpi_plugin_typology_typologycriteriadefinitions` ( 58 | `id` int unsigned NOT NULL auto_increment, -- id ... 59 | `plugin_typology_typologycriterias_id` int unsigned NOT NULL default '0', -- lien avec le critere du profil d'usage 60 | `field` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,-- info suppl sur l'objet taille (ecran), Nom (logiciel) ... 61 | `action_type` varchar(100) collate utf8mb4_unicode_ci NOT NULL,-- action de type contient, est ... 62 | `value` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,-- valeur attendue pour chaque critere (field) 63 | `entities_id` int unsigned NOT NULL default '0', -- laisser pour l'utilisation des entites 64 | `is_recursive` tinyint NOT NULL default '0', -- laisser pour l'utilisation de la recursivite 65 | PRIMARY KEY (`id`), -- index 66 | KEY `plugin_typology_typologycriterias_id` (`plugin_typology_typologycriterias_id`) -- index 67 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; 68 | 69 | -- -------------------------------------------------------- 70 | -- 71 | -- Structure de la table 'glpi_plugin_typology_items' 72 | -- Affectation de la typologie aux materiels 73 | -- 74 | 75 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies_items`; 76 | CREATE TABLE `glpi_plugin_typology_typologies_items` ( 77 | `id` int unsigned NOT NULL auto_increment, -- id 78 | `plugin_typology_typologies_id` int unsigned NOT NULL default '0', -- lien avec le profil d'usage 79 | `items_id` int unsigned NOT NULL default '0' COMMENT 'RELATION to various tables, according to itemtype (id)',-- nom specifique de l'objet (ex: bloc note 90 pages, ...), nom 80 | `itemtype` varchar(100) collate utf8mb4_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, peripherique ...) 81 | `is_validated` tinyint DEFAULT NULL, -- result from consolemanagement 82 | `error` longtext collate utf8mb4_unicode_ci DEFAULT NULL, 83 | PRIMARY KEY (`id`), -- index 84 | UNIQUE KEY `unicity` (`plugin_typology_typologies_id`,`itemtype`,`items_id`), -- cle unique pour cet ensemble 85 | KEY `itemtype` (`itemtype`), -- index 86 | KEY `items_id` (`items_id`) -- index 87 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; 88 | 89 | INSERT INTO `glpi_notificationtemplates` VALUES(NULL, 'Alert no validated typology', 'GlpiPlugin\\Typology\\Typology', '2012-11-19 15:20:46','',NULL, '2012-11-19 15:20:46'); 90 | -------------------------------------------------------------------------------- /front/typology.form.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | use GlpiPlugin\Typology\RuleTypologyCollection; 31 | use GlpiPlugin\Typology\Typology; 32 | use GlpiPlugin\Typology\Typology_Item; 33 | 34 | if (!isset($_GET["id"])) { 35 | $_GET["id"] = ""; 36 | } 37 | 38 | $typo = new Typology(); 39 | $typo_item = new Typology_Item(); 40 | 41 | if (isset($_POST["add"])) { 42 | $typo->check(-1, CREATE, $_POST); 43 | $newID = $typo->add($_POST); 44 | 45 | Html::back(); 46 | 47 | } else if (isset($_POST["delete"])) { 48 | $typo->check($_POST['id'], DELETE); 49 | $typo->delete($_POST); 50 | 51 | $typo->redirectToList(); 52 | 53 | } else if (isset($_POST["update"])) { 54 | $typo->check($_POST['id'], UPDATE); 55 | $typo->update($_POST); 56 | 57 | Html::back(); 58 | 59 | } else if (isset($_POST["purge"])) { 60 | $typo->check($_POST['id'], PURGE); 61 | $typo->delete($_POST, 1); 62 | $typo->redirectToList(); 63 | 64 | } else if (isset($_POST["restore"])) { 65 | $typo->check($_POST['id'], PURGE); 66 | $typo->restore($_POST); 67 | $typo->redirectToList(); 68 | 69 | } else if (isset($_POST["add_item"])) { 70 | 71 | if (!empty($_POST['itemtype'])) { 72 | 73 | $input = ['plugin_typology_typologies_id' => $_POST['plugin_typology_typologies_id'], 74 | 'items_id' => $_POST['items_id'], 75 | 'itemtype' => $_POST['itemtype']]; 76 | $item = new $_POST['itemtype'](); 77 | if ($item->getFromDB($_POST['items_id'])) { 78 | $ruleCollection = new RuleTypologyCollection($item->fields['entities_id']); 79 | $fields= []; 80 | $item->input = $_POST['plugin_typology_typologies_id']; 81 | $fields=$ruleCollection->processAllRules($item->fields, $fields, []); 82 | //Store rule that matched 83 | 84 | if (isset($fields['_ruleid'])) { 85 | if ($input['plugin_typology_typologies_id'] != $fields['plugin_typology_typologies_id']) { 86 | $message = __('Element not match with the rule for assigning the typology:', 'typology')." ". 87 | Dropdown::getDropdownName('glpi_plugin_typology_typologies', $input['plugin_typology_typologies_id']); 88 | Session::addMessageAfterRedirect($message, ERROR, true); 89 | } else { 90 | $typo_item->check(-1, UPDATE, $input); 91 | $typo_item->add($input); 92 | 93 | $values = ['plugin_typology_typologies_id' => $input['plugin_typology_typologies_id'], 94 | 'items_id' => $input['items_id'], 95 | 'itemtype' => $input['itemtype']]; 96 | 97 | Typology_Item::addLog($values, Typology_Item::LOG_ADD); 98 | 99 | } 100 | } else { 101 | $message = __('Element not match with rules for assigning a typology', 'typology'); 102 | Session::addMessageAfterRedirect($message, ERROR, true); 103 | } 104 | } 105 | } 106 | Html::back(); 107 | 108 | } else if (isset($_POST["update_item"])) { 109 | 110 | if (!empty($_POST['itemtype'])) { 111 | 112 | $input=Typology_Item::checkValidated($_POST); 113 | $typo_item->check($input['id'], UPDATE); 114 | $typo_item->update($input); 115 | 116 | $values = ['plugin_typology_typologies_id' => $input['plugin_typology_typologies_id'], 117 | 'items_id' => $input['items_id'], 118 | 'itemtype' => $input['itemtype']]; 119 | 120 | Typology_Item::addLog($values, Typology_Item::LOG_UPDATE); 121 | 122 | } 123 | Html::back(); 124 | 125 | } else if (isset($_POST["delete_item"])) { 126 | 127 | if (!empty($_POST['itemtype'])) { 128 | 129 | $typo_item->delete($_POST); 130 | 131 | $values = ['plugin_typology_typologies_id' => $_POST['plugin_typology_typologies_id'], 132 | 'items_id' => $_POST['items_id'], 133 | 'itemtype' => $_POST['itemtype']]; 134 | 135 | Typology_Item::addLog($values, Typology_Item::LOG_DELETE); 136 | 137 | } else { 138 | foreach ($_POST["item"] as $key => $val) { 139 | if ($val==1) { 140 | $typo_item->check($key, UPDATE); 141 | $typo_item->delete(['id'=>$key]); 142 | } 143 | } 144 | } 145 | Html::back(); 146 | 147 | } else { 148 | $typo->checkGlobal(READ); 149 | Html::header(Typology::getTypeName(2), '', "tools", Typology::class); 150 | 151 | $typo->display($_GET); 152 | Html::footer(); 153 | } 154 | -------------------------------------------------------------------------------- /locales/glpi.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the Typology plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: Typology plugin\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2025-10-31 18:00+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 20 | 21 | #: src/Typology_Item.php:540 22 | msgid "Actions" 23 | msgstr "" 24 | 25 | #: src/TypologyCriteria.php:209 26 | msgid "Add a criterion" 27 | msgstr "" 28 | 29 | #: src/Typology_Item.php:180 30 | msgid "Add element to the typology" 31 | msgstr "" 32 | 33 | #: hook.php:221 src/Typology_Item.php:604 34 | msgid "Assign a typology to this material" 35 | msgstr "" 36 | 37 | #: src/Typology_Item.php:988 38 | msgid "Comparison" 39 | msgstr "" 40 | 41 | #: src/TypologyCriteria.php:254 42 | msgid "Criteria's list" 43 | msgstr "" 44 | 45 | #: src/TypologyCriteriaDefinition.php:66 46 | msgid "Definition" 47 | msgid_plural "Definitions" 48 | msgstr[0] "" 49 | msgstr[1] "" 50 | 51 | #: hook.php:222 52 | msgid "Delete the typology of this material" 53 | msgstr "" 54 | 55 | #: report/typologyreport/typologyreport.php:235 56 | #: report/typologyreport/typologyreport.php:237 57 | msgid "Detail (workstation concerned)" 58 | msgstr "" 59 | 60 | #: src/Typology_Item.php:989 src/TypologyCriteria.php:277 61 | msgid "Detail of the assigned typology" 62 | msgstr "" 63 | 64 | #: src/Typology_Item.php:990 65 | msgid "Detail of the encountered configuration" 66 | msgstr "" 67 | 68 | #: src/Typology_Item.php:73 69 | msgid "Element" 70 | msgid_plural "Elements" 71 | msgstr[0] "" 72 | msgstr[1] "" 73 | 74 | #: front/typology.form.php:101 src/Typology_Item.php:1122 75 | #: src/Typology_Item.php:1138 76 | msgid "Element not match with rules for assigning a typology" 77 | msgstr "" 78 | 79 | #: front/typology.form.php:86 80 | msgid "Element not match with the rule for assigning the typology:" 81 | msgstr "" 82 | 83 | #: src/Typology_Item.php:184 84 | msgid "Element out of the typology" 85 | msgstr "" 86 | 87 | #: src/Typology.php:370 src/Typology.php:533 88 | #: src/NotificationTargetTypology.php:56 src/NotificationTargetTypology.php:80 89 | msgid "Elements not match with the typology" 90 | msgstr "" 91 | 92 | #: src/TypologyCriteriaDefinition.php:602 93 | #: src/TypologyCriteriaDefinition.php:608 94 | #: src/TypologyCriteriaDefinition.php:849 95 | msgid "Less than" 96 | msgstr "" 97 | 98 | #: src/NotificationTargetTypology.php:87 src/NotificationTargetTypology.php:127 99 | msgid "Link to the element" 100 | msgstr "" 101 | 102 | #: src/NotificationTargetTypology.php:86 src/NotificationTargetTypology.php:126 103 | msgid "Link to the typology" 104 | msgstr "" 105 | 106 | #: src/Typology_Item.php:711 src/Typology_Item.php:756 107 | msgid "Linked elements" 108 | msgstr "" 109 | 110 | #: src/Typology_Item.php:981 111 | msgid "Management console" 112 | msgstr "" 113 | 114 | #: src/TypologyCriteriaDefinition.php:603 115 | #: src/TypologyCriteriaDefinition.php:609 116 | #: src/TypologyCriteriaDefinition.php:851 117 | msgid "More than" 118 | msgstr "" 119 | 120 | #: src/Typology_Item.php:754 121 | msgid "No linked element" 122 | msgstr "" 123 | 124 | #: report/typologyreport/typologyreport.php:320 125 | msgid "Not responding" 126 | msgstr "" 127 | 128 | #: report/typologyreport/typologyreport.php:180 129 | msgid "Number" 130 | msgstr "" 131 | 132 | #: src/Typology_Item.php:997 133 | msgid "Real value" 134 | msgstr "" 135 | 136 | #: hook.php:223 src/Typology.php:367 137 | msgid "Recalculate typology for the elements" 138 | msgstr "" 139 | 140 | #: report/typologyreport/typologyreport.php:318 141 | msgid "Responding" 142 | msgstr "" 143 | 144 | #: hook.php:264 report/typologyreport/typologyreport.php:250 145 | #: report/typologyreport/typologyreport.php:254 src/Typology_Item.php:538 146 | #: src/Typology_Item.php:772 147 | msgid "Responding to typology's criteria" 148 | msgstr "" 149 | 150 | #: src/RuleTypologyCollection.php:54 151 | msgid "Rules for assigning a typology to a computer" 152 | msgstr "" 153 | 154 | #: src/Typology_Item.php:733 155 | msgid "Select a type" 156 | msgstr "" 157 | 158 | #: report/typologyreport/typologyreport.php:39 159 | msgid "Typologies list by service with materials list" 160 | msgstr "" 161 | 162 | #: setup.php:99 src/Profile.php:196 src/Typology.php:84 163 | msgid "Typology" 164 | msgid_plural "Typologies" 165 | msgstr[0] "" 166 | msgstr[1] "" 167 | 168 | #: src/Typology_Item.php:532 169 | msgid "Typology assigned to this material" 170 | msgstr "" 171 | 172 | #: src/Typology.php:459 173 | msgid "Typology of the linked elements is updated." 174 | msgstr "" 175 | 176 | #: hook.php:250 177 | msgid "Typology's name" 178 | msgstr "" 179 | 180 | #: src/Typology_Item.php:182 181 | msgid "Update element to the typology" 182 | msgstr "" 183 | 184 | #: src/Typology_Item.php:996 185 | msgid "Waiting value" 186 | msgstr "" 187 | 188 | #: src/Typology_Item.php:275 189 | msgid "" 190 | "You cannot assign this typology to this material as he has already a " 191 | "typology : " 192 | msgstr "" 193 | 194 | #: src/TypologyCriteriaDefinition.php:127 195 | msgid "" 196 | "You don't have right to create a definition for this criteria. Thank to " 197 | "contact a person having this right." 198 | msgstr "" 199 | 200 | #: report/typologyreport/typologyreport.php:296 src/Typology_Item.php:575 201 | #: src/Typology_Item.php:830 202 | msgid "for the criteria" 203 | msgstr "" 204 | -------------------------------------------------------------------------------- /src/RuleTypology.php: -------------------------------------------------------------------------------- 1 | . 28 | -------------------------------------------------------------------------- 29 | */ 30 | 31 | namespace GlpiPlugin\Typology; 32 | 33 | use Html; 34 | use Rule; 35 | 36 | /** 37 | * Rule class store all informations about a GLPI rule : 38 | * - description 39 | * - criterias 40 | * - actions 41 | * 42 | **/ 43 | class RuleTypology extends Rule 44 | { 45 | // From Rule 46 | public static $rightname = "plugin_typology"; 47 | public $can_sort = true; 48 | 49 | /** 50 | * Get title used in rule 51 | * 52 | * @return 53 | **/ 54 | public function getTitle() 55 | { 56 | 57 | return Typology::getTypeName(1); 58 | } 59 | 60 | /** 61 | * @return bool 62 | */ 63 | public function maybeRecursive() 64 | { 65 | return true; 66 | } 67 | 68 | /** 69 | * @return bool 70 | */ 71 | public function isEntityAssign() 72 | { 73 | return true; 74 | } 75 | 76 | /** 77 | * Can I change recursive flag to false 78 | * check if there is "linked" object in another entity 79 | * 80 | * May be overloaded if needed 81 | * 82 | * @return true 83 | **/ 84 | public function canUnrecurs() 85 | { 86 | return true; 87 | } 88 | 89 | /*function maxCriteriasCount() { 90 | return 2; 91 | }*/ 92 | 93 | /** 94 | * Get maximum number of Actions of the Rule (0 = unlimited) 95 | * 96 | * @return int maximum number of actions 97 | **/ 98 | public function maxActionsCount() 99 | { 100 | return count($this->getActions()); 101 | } 102 | 103 | /** 104 | * Function used to add specific params before rule processing 105 | * 106 | * @param $params 107 | **/ 108 | public function addSpecificParamsForPreview($params) 109 | { 110 | 111 | if (!isset($params["entities_id"])) { 112 | $params["entities_id"] = $_SESSION["glpiactive_entity"]; 113 | } 114 | return $params; 115 | } 116 | 117 | /** 118 | * Function used to display type specific criterias during rule's preview 119 | * 120 | * @param $fields 121 | **/ 122 | public function showSpecificCriteriasForPreview($fields) 123 | { 124 | 125 | $entity_as_criteria = false; 126 | foreach ($this->criterias as $criteria) { 127 | if ($criteria->fields['criteria'] == 'entities_id') { 128 | $entity_as_criteria = true; 129 | break; 130 | } 131 | } 132 | if (!$entity_as_criteria) { 133 | echo Html::hidden('entities_id', ['value' => $_SESSION["glpiactive_entity"]]); 134 | } 135 | } 136 | 137 | /** 138 | * @return array 139 | */ 140 | public function getCriterias() 141 | { 142 | 143 | $criterias = []; 144 | 145 | $criterias['name']['table'] = 'glpi_computers'; 146 | $criterias['name']['field'] = 'name'; 147 | $criterias['name']['name'] = __('Computer\'s name'); 148 | 149 | $criterias['states_id']['table'] = 'glpi_states'; 150 | $criterias['states_id']['field'] = 'name'; 151 | $criterias['states_id']['name'] = __('Status'); 152 | $criterias['states_id']['linkfield'] = 'states_id'; 153 | $criterias['states_id']['type'] = 'dropdown'; 154 | 155 | $criterias['computertypes_id']['table'] = 'glpi_computertypes'; 156 | $criterias['computertypes_id']['field'] = 'name'; 157 | $criterias['computertypes_id']['name'] = __('Type'); 158 | $criterias['computertypes_id']['linkfield'] = 'computertypes_id'; 159 | $criterias['computertypes_id']['type'] = 'dropdown'; 160 | 161 | $criterias['operatingsystems_id']['table'] = 'glpi_operatingsystems'; 162 | $criterias['operatingsystems_id']['field'] = 'name'; 163 | $criterias['operatingsystems_id']['name'] = __('Operating system'); 164 | $criterias['operatingsystems_id']['linkfield'] = 'operatingsystems_id'; 165 | $criterias['operatingsystems_id']['type'] = 'dropdown'; 166 | 167 | return $criterias; 168 | } 169 | 170 | 171 | /** 172 | * @return array 173 | */ 174 | public function getActions() 175 | { 176 | $actions = []; 177 | 178 | $actions['plugin_typology_typologies_id']['name'] = Typology::getTypeName(1); 179 | $actions['plugin_typology_typologies_id']['table'] = "glpi_plugin_typology_typologies"; 180 | $actions['plugin_typology_typologies_id']['type'] = "dropdown"; 181 | $actions['plugin_typology_typologies_id']['force_actions'] = ['assign']; 182 | 183 | return $actions; 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /sql/empty-1.0.0.sql: -------------------------------------------------------------------------------- 1 | -- 2 | -- Plugin Typology 3 | -- 4 | 5 | -- ------------------------------------------------------------------------------------------------- 6 | -- 7 | -- Structure de la table 'glpi_plugin_typology_profiles' 8 | -- gestion des droits pour le plugin 9 | -- 10 | 11 | DROP TABLE IF EXISTS `glpi_plugin_typology_profiles`; 12 | CREATE TABLE `glpi_plugin_typology_profiles` ( 13 | `id` int(11) NOT NULL auto_increment, -- id du profil 14 | `profiles_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_profiles (id)', -- lien avec profiles de glpi 15 | `typology` char(1) collate utf8_unicode_ci default NULL, -- $right: r (can view), w (can update) 16 | PRIMARY KEY (`id`), 17 | KEY `profiles_id` (`profiles_id`) 18 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 19 | 20 | -- -------------------------------------------------------- 21 | -- 22 | -- Structure de la table 'glpi_plugin_typology_typologies' 23 | -- Liste des profils d'usage � cr�er lors de la configuration 24 | -- 25 | 26 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies`; 27 | CREATE TABLE `glpi_plugin_typology_typologies` ( 28 | `id` int(11) NOT NULL AUTO_INCREMENT, -- id du profil d'usage 29 | `entities_id` int(11) NOT NULL default '0', -- � laisser pour l'utilisation des entit�s 30 | `is_recursive` tinyint(1) NOT NULL default '0', -- � laisser pour l'utilisation de la r�cursivit� 31 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du profil ex: Poste M�decin, ... 32 | `comment` text COLLATE utf8_unicode_ci, -- commentaires si n�cessaire 33 | `notepad` longtext collate utf8_unicode_ci, 34 | `is_deleted` tinyint(1) NOT NULL default '0', -- pour placer les profils dans la corbeille avant purge d�finitive ou restoration 35 | `date_mod` datetime NULL default NULL, -- date de derni�re modif du profil (quand il y a modification de la liste de mat�riels li�s � ce type de profil d'usage) 36 | PRIMARY KEY (`id`), -- index 37 | KEY `name` (`name`), -- index 38 | KEY `entities_id` (`entities_id`), -- index 39 | KEY `is_recursive` (`is_recursive`), -- index 40 | KEY `is_deleted` (`is_deleted`) -- index 41 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 42 | 43 | 44 | -- -------------------------------------------------------- 45 | -- 46 | -- Structure de la table 'glpi_plugin_typology_typologycriterias' 47 | -- Liste des crit�res pour chaque profils (mat�riels li�s) (cf glpi_slalevels) 48 | -- 49 | 50 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriterias`; 51 | CREATE TABLE `glpi_plugin_typology_typologycriterias` ( 52 | `id` int(11) NOT NULL auto_increment, -- id ... 53 | `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, -- nom du crit�re, ex: type d'�cran 54 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 55 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, p�riph�rique ...) 56 | `link` tinyint(1) NOT NULL default '0',-- AND ou OR entre les définitions d'un critère 57 | `entities_id` int(11) NOT NULL default '0', -- � laisser pour l'utilisation des entit�s 58 | `is_recursive` tinyint(1) NOT NULL default '0', -- � laisser pour l'utilisation de la r�cursivit� 59 | `date_mod` datetime default NULL, 60 | `is_active` tinyint(1) NOT NULL default '0', 61 | PRIMARY KEY (`id`), -- index 62 | KEY `name` (`name`), -- index 63 | KEY `plugin_typology_typologies_id` (`plugin_typology_typologies_id`) -- index 64 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 65 | 66 | 67 | -- -------------------------------------------------------- 68 | -- 69 | -- Structure de la table 'glpi_plugin_typology_typologycriteriadefinitions' 70 | -- D�finition des crit�res pour chaque profils (champ et valeur) (cf glpi_slalevelactions) 71 | -- 72 | 73 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologycriteriadefinitions`; 74 | CREATE TABLE `glpi_plugin_typology_typologycriteriadefinitions` ( 75 | `id` int(11) NOT NULL auto_increment, -- id ... 76 | `plugin_typology_typologycriterias_id` int(11) NOT NULL default '0', -- lien avec le crit�re du profil d'usage 77 | `field` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- info suppl sur l'objet taille (�cran), Nom (logiciel) ... 78 | `action_type` varchar(100) collate utf8_unicode_ci NOT NULL,-- action de type contient, est ... 79 | `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,-- valeur attendue pour chaque crit�re (field) 80 | `entities_id` int(11) NOT NULL default '0', -- � laisser pour l'utilisation des entit�s 81 | `is_recursive` tinyint(1) NOT NULL default '0', -- � laisser pour l'utilisation de la r�cursivit� 82 | PRIMARY KEY (`id`), -- index 83 | KEY `plugin_typology_typologycriterias_id` (`plugin_typology_typologycriterias_id`) -- index 84 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 85 | 86 | -- -------------------------------------------------------- 87 | -- 88 | -- Structure de la table 'glpi_plugin_typology_items' 89 | -- Affectation de la typologie aux mat�riels 90 | -- 91 | 92 | DROP TABLE IF EXISTS `glpi_plugin_typology_typologies_items`; 93 | CREATE TABLE `glpi_plugin_typology_typologies_items` ( 94 | `id` int(11) NOT NULL auto_increment, -- id 95 | `plugin_typology_typologies_id` int(11) NOT NULL default '0', -- lien avec le profil d'usage 96 | `items_id` int(11) NOT NULL default '0' COMMENT 'RELATION to various tables, according to itemtype (id)',-- nom sp�cifique de l'objet (ex: bloc note 90 pages, ...), nom 97 | `itemtype` varchar(100) collate utf8_unicode_ci NOT NULL COMMENT 'see .class.php file',-- lien avec la classe de l'objet (ex : ordi, moniteur, p�riph�rique ...) 98 | `is_validated` tinyint(1) DEFAULT NULL, -- result from consolemanagement 99 | `error` longtext collate utf8_unicode_ci DEFAULT NULL, 100 | PRIMARY KEY (`id`), -- index 101 | UNIQUE KEY `unicity` (`plugin_typology_typologies_id`,`itemtype`,`items_id`), -- cl� unique pour cet ensemble 102 | KEY `itemtype` (`itemtype`), -- index 103 | KEY `items_id` (`items_id`) -- index 104 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 105 | 106 | INSERT INTO `glpi_notificationtemplates` VALUES(NULL, 'Alert no validated typology', 'PluginTypologyTypology', '2012-11-19 15:20:46','',NULL); -------------------------------------------------------------------------------- /locales/en_GB.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # 5 | # Translators: 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: GLPI Project - typology plugin\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2018-08-13 11:49+0200\n" 11 | "PO-Revision-Date: 2017-10-10 13:03+0000\n" 12 | "Last-Translator: Amandine Manceau\n" 13 | "Language-Team: English (United Kingdom) (http://www.transifex.com/tsmr/GLPI_typology/language/en_GB/)\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Language: en_GB\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: hook.php:207 inc/typology_item.class.php:577 21 | msgid "Assign a typology to this material" 22 | msgstr "Assign a typology to this material" 23 | 24 | #: hook.php:208 25 | msgid "Delete the typology of this material" 26 | msgstr "Delete the typology of this material" 27 | 28 | #: hook.php:209 inc/typology.class.php:337 29 | msgid "Recalculate typology for the elements" 30 | msgstr "Recalculate typology for the elements" 31 | 32 | #: hook.php:235 33 | msgid "Typology's name" 34 | msgstr "Typology's name" 35 | 36 | #: hook.php:249 inc/typology_item.class.php:504 37 | #: inc/typology_item.class.php:746 38 | msgid "Responding to typology's criteria" 39 | msgstr "Responding to typology's criteria" 40 | 41 | #: setup.php:77 inc/menu.class.php:44 inc/profile.class.php:166 42 | #: inc/typology.class.php:69 43 | msgid "Typology" 44 | msgid_plural "Typologies" 45 | msgstr[0] "Typology" 46 | msgstr[1] "Typologies" 47 | 48 | #: front/typology.form.php:84 49 | msgid "Element not match with the rule for assigning the typology:" 50 | msgstr "Element not match with the rule for assigning the typology:" 51 | 52 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 53 | #: inc/typology_item.class.php:1086 54 | msgid "Element not match with rules for assigning a typology" 55 | msgstr "Element not match with rules for assigning a typology" 56 | 57 | #: inc/notificationtargettypology.class.php:49 58 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 59 | #: inc/typology.class.php:488 60 | msgid "Elements not match with the typology" 61 | msgstr "Elements not match with the typology" 62 | 63 | #: inc/notificationtargettypology.class.php:77 64 | #: inc/notificationtargettypology.class.php:114 65 | msgid "Link to the typology" 66 | msgstr "Link to the typology" 67 | 68 | #: inc/notificationtargettypology.class.php:78 69 | #: inc/notificationtargettypology.class.php:115 70 | msgid "Link to the element" 71 | msgstr "Link to the element" 72 | 73 | #: inc/ruletypologycollection.class.php:51 74 | msgid "Rules for assigning a typology to a computer" 75 | msgstr "Rules for assigning a typology to a computer" 76 | 77 | #: inc/typology.class.php:419 78 | msgid "Typology of the linked elements is updated." 79 | msgstr "Typology of the linked elements is updated." 80 | 81 | #: inc/typologycriteria.class.php:184 82 | msgid "Add a criterion" 83 | msgstr "Add a criterion" 84 | 85 | #: inc/typologycriteria.class.php:229 86 | msgid "Criteria's list" 87 | msgstr "Criteria's list" 88 | 89 | #: inc/typologycriteria.class.php:253 inc/typology_item.class.php:937 90 | msgid "Detail of the assigned typology" 91 | msgstr "Detail of the assigned typology" 92 | 93 | #: inc/typologycriteriadefinition.class.php:54 94 | msgid "Definition" 95 | msgid_plural "Definitions" 96 | msgstr[0] "Definition" 97 | msgstr[1] "Definitions" 98 | 99 | #: inc/typologycriteriadefinition.class.php:102 100 | msgid "" 101 | "You don't have right to create a definition for this criteria. Thank to " 102 | "contact a person having this right." 103 | msgstr "You don't have right to create a definition for this criteria. Thank to contact a person having this right." 104 | 105 | #: inc/typologycriteriadefinition.class.php:566 106 | #: inc/typologycriteriadefinition.class.php:572 107 | #: inc/typologycriteriadefinition.class.php:807 108 | msgid "Less than" 109 | msgstr "Less than" 110 | 111 | #: inc/typologycriteriadefinition.class.php:567 112 | #: inc/typologycriteriadefinition.class.php:573 113 | #: inc/typologycriteriadefinition.class.php:809 114 | msgid "More than" 115 | msgstr "More than" 116 | 117 | #: inc/typology_item.class.php:60 118 | msgid "Element" 119 | msgid_plural "Elements" 120 | msgstr[0] "Element" 121 | msgstr[1] "Elements" 122 | 123 | #: inc/typology_item.class.php:149 124 | msgid "Add element to the typology" 125 | msgstr "Add element to the typology" 126 | 127 | #: inc/typology_item.class.php:151 128 | msgid "Update element to the typology" 129 | msgstr "Update element to the typology" 130 | 131 | #: inc/typology_item.class.php:153 132 | msgid "Element out of the typology" 133 | msgstr "Element out of the typology" 134 | 135 | #: inc/typology_item.class.php:236 136 | msgid "" 137 | "You cannot assign this typology to this material as he has already a " 138 | "typology : " 139 | msgstr "You cannot assign this typology to this material as he has already a typology : " 140 | 141 | #: inc/typology_item.class.php:498 142 | msgid "Typology assigned to this material" 143 | msgstr "Typology assigned to this material" 144 | 145 | #: inc/typology_item.class.php:506 146 | msgid "Actions" 147 | msgstr "Actions" 148 | 149 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 150 | msgid "for the criteria" 151 | msgstr "for the criteria" 152 | 153 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 154 | msgid "Linked elements" 155 | msgstr "Linked elements" 156 | 157 | #: inc/typology_item.class.php:705 158 | msgid "Select a type" 159 | msgstr "Select a type" 160 | 161 | #: inc/typology_item.class.php:728 162 | msgid "No linked element" 163 | msgstr "No linked element" 164 | 165 | #: inc/typology_item.class.php:929 166 | msgid "Management console" 167 | msgstr "Management console" 168 | 169 | #: inc/typology_item.class.php:936 170 | msgid "Comparison" 171 | msgstr "Comparison" 172 | 173 | #: inc/typology_item.class.php:938 174 | msgid "Detail of the encountered configuration" 175 | msgstr "Detail of the encountered configuration" 176 | 177 | #: inc/typology_item.class.php:944 178 | msgid "Waiting value" 179 | msgstr "Waiting value" 180 | 181 | #: inc/typology_item.class.php:945 182 | msgid "Real value" 183 | msgstr "Real value" 184 | -------------------------------------------------------------------------------- /typology.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Typology 4 | typology 5 | stable 6 | https://raw.githubusercontent.com/InfotelGLPI/typology/master/typology.png 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Fonctionnalités :
- Utilisation d'un moteur de règle d'affectation de typologie
- Définition de critères (Informations générales de l'ordinateur / Composants / Réseau / Logiciels)
- Alertes : Vérification des typologies respectées
- Actions automatiques : Mise à jour automatique des typologies affectées
- Rapport : Liste des typologies par service]]>
15 | Features :
- Use of an rule engine for typologies assignment
- Definition of criteria (General Information Computer / Components / Network / Software)
- Alerts: Checking typologies observed
- Automatic Actions: Automatic update typologies affected
- Report : List of typologies of services]]>
16 | Funkce:
- Použití engine pravidel pro přiřazení typologií
- Definice kritérií (obecný počítač / komponenty / síť / software)
- Výstrahy: Kontrola zpozorovaných technologií
- Automatické akce: automatická aktualizace typologií, kterých se týká
- Výkaz: seznam typologií služeb]]>
17 |
18 |
19 | https://github.com/InfotelGLPI/typology 20 | https://github.com/InfotelGLPI/typology/releases 21 | https://github.com/InfotelGLPI/typology/issues 22 | https://raw.githubusercontent.com/InfotelGLPI/typology/master/README.md 23 | 24 | Xavier Caillaud 25 | Infotel 26 | 27 | 28 | 29 | 4.0.0 30 | ~11.0 31 | https://github.com/InfotelGLPI/typology/releases/download/4.0.0/glpi-typology-4.0.0.tar.bz2 32 | 33 | 34 | 3.0.0 35 | ~10.0 36 | https://github.com/InfotelGLPI/typology/releases/download/3.0.0/glpi-typology-3.0.0.tar.bz2 37 | 38 | 39 | 3.0.0-rc1 40 | ~10.0 41 | https://github.com/InfotelGLPI/typology/releases/download/3.0.0-rc1/glpi-typology-3.0.0-rc1.tar.bz2 42 | 43 | 44 | 2.7.2 45 | ~9.5 46 | https://github.com/InfotelGLPI/typology/releases/download/2.7.2/glpi-typology-2.7.2.tar.gz 47 | 48 | 49 | 2.7.1 50 | ~9.5 51 | https://github.com/InfotelGLPI/typology/releases/download/2.7.1/glpi-typology-2.7.1.tar.gz 52 | 53 | 54 | 2.7.0 55 | ~9.5 56 | 57 | 58 | 2.6.0 59 | 9.4 60 | 61 | 62 | 2.5.1 63 | 9.3 64 | 65 | 66 | 2.5.0 67 | 9.3 68 | 69 | 70 | 2.4.0 71 | 9.2 72 | 73 | 74 | 2.3.1 75 | 9.1 76 | 77 | 78 | 2.3.0 79 | 9.1 80 | 81 | 82 | 2.2.1 83 | 0.90 84 | 85 | 86 | 2.2.0 87 | 0.90 88 | 89 | 90 | 2.1.0 91 | 0.85 92 | 93 | 94 | 2.0.0 95 | 0.84 96 | 97 | 98 | 1.0.0 99 | 0.83.3 100 | 101 | 102 | 103 | cs_CZ 104 | de_DE 105 | en_GB 106 | en_US 107 | es_ES 108 | es_AR 109 | fr_FR 110 | it_IT 111 | pt_BR 112 | ro_RO 113 | tr_TR 114 | 115 | 116 | 117 | 118 | Configuration 119 | Inventaire 120 | Gestion 121 | 122 | 123 | Setup 124 | Inventory 125 | Management 126 | 127 | 128 | Nastavení 129 | Inventář 130 | Správa 131 | 132 | 133 |
134 | -------------------------------------------------------------------------------- /locales/es_ES.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # 5 | # Translators: 6 | # Le Rohellec Benoit , 2015 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GLPI Project - typology plugin\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-08-13 11:49+0200\n" 12 | "PO-Revision-Date: 2017-10-10 13:03+0000\n" 13 | "Last-Translator: Amandine Manceau\n" 14 | "Language-Team: Spanish (Spain) (http://www.transifex.com/tsmr/GLPI_typology/language/es_ES/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Language: es_ES\n" 19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 | 21 | #: hook.php:207 inc/typology_item.class.php:577 22 | msgid "Assign a typology to this material" 23 | msgstr "Asignar una tipología a este equipo" 24 | 25 | #: hook.php:208 26 | msgid "Delete the typology of this material" 27 | msgstr "" 28 | 29 | #: hook.php:209 inc/typology.class.php:337 30 | msgid "Recalculate typology for the elements" 31 | msgstr "Recalcular la tipología de los elementos" 32 | 33 | #: hook.php:235 34 | msgid "Typology's name" 35 | msgstr "Nombre de tipología" 36 | 37 | #: hook.php:249 inc/typology_item.class.php:504 38 | #: inc/typology_item.class.php:746 39 | msgid "Responding to typology's criteria" 40 | msgstr "Verifica los criterios de la tipología" 41 | 42 | #: setup.php:77 inc/menu.class.php:44 inc/profile.class.php:166 43 | #: inc/typology.class.php:69 44 | msgid "Typology" 45 | msgid_plural "Typologies" 46 | msgstr[0] "Tipología" 47 | msgstr[1] "Tipologías" 48 | 49 | #: front/typology.form.php:84 50 | msgid "Element not match with the rule for assigning the typology:" 51 | msgstr "El elemento no verifica las reglas para asignar esta tipología : " 52 | 53 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 54 | #: inc/typology_item.class.php:1086 55 | msgid "Element not match with rules for assigning a typology" 56 | msgstr "El elemento no verifica las reglas para asignar una tipología" 57 | 58 | #: inc/notificationtargettypology.class.php:49 59 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 60 | #: inc/typology.class.php:488 61 | msgid "Elements not match with the typology" 62 | msgstr "Elementos que no verifican la tipología" 63 | 64 | #: inc/notificationtargettypology.class.php:77 65 | #: inc/notificationtargettypology.class.php:114 66 | msgid "Link to the typology" 67 | msgstr "Tipología : URL" 68 | 69 | #: inc/notificationtargettypology.class.php:78 70 | #: inc/notificationtargettypology.class.php:115 71 | msgid "Link to the element" 72 | msgstr "Elemento : URL" 73 | 74 | #: inc/ruletypologycollection.class.php:51 75 | msgid "Rules for assigning a typology to a computer" 76 | msgstr "Reglas para asignar una tipología a un equipo" 77 | 78 | #: inc/typology.class.php:419 79 | msgid "Typology of the linked elements is updated." 80 | msgstr "La tipología de los elementos asignados ha sido actualizada" 81 | 82 | #: inc/typologycriteria.class.php:184 83 | msgid "Add a criterion" 84 | msgstr "Añadir un criterio" 85 | 86 | #: inc/typologycriteria.class.php:229 87 | msgid "Criteria's list" 88 | msgstr "Lista de criterios" 89 | 90 | #: inc/typologycriteria.class.php:253 inc/typology_item.class.php:937 91 | msgid "Detail of the assigned typology" 92 | msgstr "Detalle de la tipología asignada" 93 | 94 | #: inc/typologycriteriadefinition.class.php:54 95 | msgid "Definition" 96 | msgid_plural "Definitions" 97 | msgstr[0] "Definición" 98 | msgstr[1] "Definiciones" 99 | 100 | #: inc/typologycriteriadefinition.class.php:102 101 | msgid "" 102 | "You don't have right to create a definition for this criteria. Thank to " 103 | "contact a person having this right." 104 | msgstr "No tiene permiso para crear una definición por este criterio. Contacta a una persona que tenga este permiso" 105 | 106 | #: inc/typologycriteriadefinition.class.php:566 107 | #: inc/typologycriteriadefinition.class.php:572 108 | #: inc/typologycriteriadefinition.class.php:807 109 | msgid "Less than" 110 | msgstr "Menor que" 111 | 112 | #: inc/typologycriteriadefinition.class.php:567 113 | #: inc/typologycriteriadefinition.class.php:573 114 | #: inc/typologycriteriadefinition.class.php:809 115 | msgid "More than" 116 | msgstr "Más que" 117 | 118 | #: inc/typology_item.class.php:60 119 | msgid "Element" 120 | msgid_plural "Elements" 121 | msgstr[0] "Elemento" 122 | msgstr[1] "Elementos" 123 | 124 | #: inc/typology_item.class.php:149 125 | msgid "Add element to the typology" 126 | msgstr "Añadir un elemento" 127 | 128 | #: inc/typology_item.class.php:151 129 | msgid "Update element to the typology" 130 | msgstr "Actualiza la asignación del elemento a la tipología" 131 | 132 | #: inc/typology_item.class.php:153 133 | msgid "Element out of the typology" 134 | msgstr "Elemento desasignado de la tipología" 135 | 136 | #: inc/typology_item.class.php:236 137 | msgid "" 138 | "You cannot assign this typology to this material as he has already a " 139 | "typology : " 140 | msgstr "No se puede asignar esta tipología a este equipo porque ya tiene una tipología : " 141 | 142 | #: inc/typology_item.class.php:498 143 | msgid "Typology assigned to this material" 144 | msgstr "Tipología asignada al equipo" 145 | 146 | #: inc/typology_item.class.php:506 147 | msgid "Actions" 148 | msgstr "Acciónes" 149 | 150 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 151 | msgid "for the criteria" 152 | msgstr "para el criterio" 153 | 154 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 155 | msgid "Linked elements" 156 | msgstr "Elementos asignados" 157 | 158 | #: inc/typology_item.class.php:705 159 | msgid "Select a type" 160 | msgstr "" 161 | 162 | #: inc/typology_item.class.php:728 163 | msgid "No linked element" 164 | msgstr "Ningún elemento asignado" 165 | 166 | #: inc/typology_item.class.php:929 167 | msgid "Management console" 168 | msgstr "Consola de gestion" 169 | 170 | #: inc/typology_item.class.php:936 171 | msgid "Comparison" 172 | msgstr "Comparación" 173 | 174 | #: inc/typology_item.class.php:938 175 | msgid "Detail of the encountered configuration" 176 | msgstr "Detalle de la configuración actual" 177 | 178 | #: inc/typology_item.class.php:944 179 | msgid "Waiting value" 180 | msgstr "Valor esperado" 181 | 182 | #: inc/typology_item.class.php:945 183 | msgid "Real value" 184 | msgstr "Valor real" 185 | -------------------------------------------------------------------------------- /locales/en_US.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Xavier CAILLAUD , 2020 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: GLPI - Typology plugin 2.4.0\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2019-02-25 09:46+0100\n" 15 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 16 | "Last-Translator: Xavier CAILLAUD , 2020\n" 17 | "Language-Team: English (United States) (https://www.transifex.com/infotelGLPI/teams/12374/en_US/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: en_US\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: hook.php:210 inc/typology_item.class.php:577 25 | msgid "Assign a typology to this material" 26 | msgstr "Assign a typology to this material" 27 | 28 | #: hook.php:211 29 | msgid "Delete the typology of this material" 30 | msgstr "Delete the typology of this material" 31 | 32 | #: hook.php:212 inc/typology.class.php:337 33 | msgid "Recalculate typology for the elements" 34 | msgstr "Recalculate typology for the elements" 35 | 36 | #: hook.php:239 37 | msgid "Typology's name" 38 | msgstr "Typology's name" 39 | 40 | #: hook.php:253 inc/typology_item.class.php:504 41 | #: inc/typology_item.class.php:746 42 | msgid "Responding to typology's criteria" 43 | msgstr "Responding to typology's criteria" 44 | 45 | #: setup.php:79 inc/menu.class.php:44 inc/profile.class.php:166 46 | #: inc/typology.class.php:69 47 | msgid "Typology" 48 | msgid_plural "Typologies" 49 | msgstr[0] "Typology" 50 | msgstr[1] "Typologies" 51 | 52 | #: front/typology.form.php:84 53 | msgid "Element not match with the rule for assigning the typology:" 54 | msgstr "Element not match with the rule for assigning the typology:" 55 | 56 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 57 | #: inc/typology_item.class.php:1086 58 | msgid "Element not match with rules for assigning a typology" 59 | msgstr "Element not match with rules for assigning a typology" 60 | 61 | #: inc/notificationtargettypology.class.php:49 62 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 63 | #: inc/typology.class.php:490 64 | msgid "Elements not match with the typology" 65 | msgstr "Elements not match with the typology" 66 | 67 | #: inc/notificationtargettypology.class.php:77 68 | #: inc/notificationtargettypology.class.php:114 69 | msgid "Link to the typology" 70 | msgstr "Link to the typology" 71 | 72 | #: inc/notificationtargettypology.class.php:78 73 | #: inc/notificationtargettypology.class.php:115 74 | msgid "Link to the element" 75 | msgstr "Link to the element" 76 | 77 | #: inc/ruletypologycollection.class.php:51 78 | msgid "Rules for assigning a typology to a computer" 79 | msgstr "Rules for assigning a typology to a computer" 80 | 81 | #: inc/typology.class.php:419 82 | msgid "Typology of the linked elements is updated." 83 | msgstr "Typology of the linked elements is updated." 84 | 85 | #: inc/typologycriteria.class.php:184 86 | msgid "Add a criterion" 87 | msgstr "Add a criterion" 88 | 89 | #: inc/typologycriteria.class.php:229 90 | msgid "Criteria's list" 91 | msgstr "Criteria's list" 92 | 93 | #: inc/typologycriteria.class.php:253 inc/typology_item.class.php:937 94 | msgid "Detail of the assigned typology" 95 | msgstr "Detail of the assigned typology" 96 | 97 | #: inc/typologycriteriadefinition.class.php:54 98 | msgid "Definition" 99 | msgid_plural "Definitions" 100 | msgstr[0] "Definition" 101 | msgstr[1] "Definitions" 102 | 103 | #: inc/typologycriteriadefinition.class.php:102 104 | msgid "" 105 | "You don't have right to create a definition for this criteria. Thank to " 106 | "contact a person having this right." 107 | msgstr "" 108 | "You don't have right to create a definition for this criteria. Thank to " 109 | "contact a person having this right." 110 | 111 | #: inc/typologycriteriadefinition.class.php:566 112 | #: inc/typologycriteriadefinition.class.php:572 113 | #: inc/typologycriteriadefinition.class.php:807 114 | msgid "Less than" 115 | msgstr "Less than" 116 | 117 | #: inc/typologycriteriadefinition.class.php:567 118 | #: inc/typologycriteriadefinition.class.php:573 119 | #: inc/typologycriteriadefinition.class.php:809 120 | msgid "More than" 121 | msgstr "More than" 122 | 123 | #: inc/typology_item.class.php:60 124 | msgid "Element" 125 | msgid_plural "Elements" 126 | msgstr[0] "Element" 127 | msgstr[1] "Elements" 128 | 129 | #: inc/typology_item.class.php:149 130 | msgid "Add element to the typology" 131 | msgstr "Add element to the typology" 132 | 133 | #: inc/typology_item.class.php:151 134 | msgid "Update element to the typology" 135 | msgstr "Update element to the typology" 136 | 137 | #: inc/typology_item.class.php:153 138 | msgid "Element out of the typology" 139 | msgstr "Element out of the typology" 140 | 141 | #: inc/typology_item.class.php:236 142 | msgid "" 143 | "You cannot assign this typology to this material as he has already a " 144 | "typology : " 145 | msgstr "" 146 | "You cannot assign this typology to this material as he has already a " 147 | "typology : " 148 | 149 | #: inc/typology_item.class.php:498 150 | msgid "Typology assigned to this material" 151 | msgstr "Typology assigned to this material" 152 | 153 | #: inc/typology_item.class.php:506 154 | msgid "Actions" 155 | msgstr "Actions" 156 | 157 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 158 | msgid "for the criteria" 159 | msgstr "for the criteria" 160 | 161 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 162 | msgid "Linked elements" 163 | msgstr "Linked elements" 164 | 165 | #: inc/typology_item.class.php:705 166 | msgid "Select a type" 167 | msgstr "Select a type" 168 | 169 | #: inc/typology_item.class.php:728 170 | msgid "No linked element" 171 | msgstr "No linked element" 172 | 173 | #: inc/typology_item.class.php:929 174 | msgid "Management console" 175 | msgstr "Management console" 176 | 177 | #: inc/typology_item.class.php:936 178 | msgid "Comparison" 179 | msgstr "Comparison" 180 | 181 | #: inc/typology_item.class.php:938 182 | msgid "Detail of the encountered configuration" 183 | msgstr "Detail of the encountered configuration" 184 | 185 | #: inc/typology_item.class.php:944 186 | msgid "Waiting value" 187 | msgstr "Waiting value" 188 | 189 | #: inc/typology_item.class.php:945 190 | msgid "Real value" 191 | msgstr "Real value" 192 | -------------------------------------------------------------------------------- /locales/ro_RO.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # 5 | # Translators: 6 | # Doru DEACONU , 2013 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: GLPI Project - typology plugin\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2018-08-13 11:49+0200\n" 12 | "PO-Revision-Date: 2017-10-10 13:03+0000\n" 13 | "Last-Translator: Amandine Manceau\n" 14 | "Language-Team: Romanian (Romania) (http://www.transifex.com/tsmr/GLPI_typology/language/ro_RO/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Language: ro_RO\n" 19 | "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" 20 | 21 | #: hook.php:207 inc/typology_item.class.php:577 22 | msgid "Assign a typology to this material" 23 | msgstr "Atribuie o tipologie la acest material" 24 | 25 | #: hook.php:208 26 | msgid "Delete the typology of this material" 27 | msgstr "" 28 | 29 | #: hook.php:209 inc/typology.class.php:337 30 | msgid "Recalculate typology for the elements" 31 | msgstr "Recalculează tipologia pentru elementele" 32 | 33 | #: hook.php:235 34 | msgid "Typology's name" 35 | msgstr "Nume Tipologie" 36 | 37 | #: hook.php:249 inc/typology_item.class.php:504 38 | #: inc/typology_item.class.php:746 39 | msgid "Responding to typology's criteria" 40 | msgstr "Răspunzând la criteriile tipologiei" 41 | 42 | #: setup.php:77 inc/menu.class.php:44 inc/profile.class.php:166 43 | #: inc/typology.class.php:69 44 | msgid "Typology" 45 | msgid_plural "Typologies" 46 | msgstr[0] "Tipologie" 47 | msgstr[1] "Tipologii" 48 | msgstr[2] "Tipologii" 49 | 50 | #: front/typology.form.php:84 51 | msgid "Element not match with the rule for assigning the typology:" 52 | msgstr "Element necorespunzător cu regula privind atribuirea tipologiei:" 53 | 54 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 55 | #: inc/typology_item.class.php:1086 56 | msgid "Element not match with rules for assigning a typology" 57 | msgstr "Element necorespunzător cu regulile privind atribuirea tipologiei" 58 | 59 | #: inc/notificationtargettypology.class.php:49 60 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 61 | #: inc/typology.class.php:488 62 | msgid "Elements not match with the typology" 63 | msgstr "Elemente necorespunzătoare cu tipologia " 64 | 65 | #: inc/notificationtargettypology.class.php:77 66 | #: inc/notificationtargettypology.class.php:114 67 | msgid "Link to the typology" 68 | msgstr "Link către tipologia" 69 | 70 | #: inc/notificationtargettypology.class.php:78 71 | #: inc/notificationtargettypology.class.php:115 72 | msgid "Link to the element" 73 | msgstr "Legătură către elementul" 74 | 75 | #: inc/ruletypologycollection.class.php:51 76 | msgid "Rules for assigning a typology to a computer" 77 | msgstr "Reguli pentru atribuirea unei tipologii la un calculator" 78 | 79 | #: inc/typology.class.php:419 80 | msgid "Typology of the linked elements is updated." 81 | msgstr "Tipologia elemetelor legate este actualizată" 82 | 83 | #: inc/typologycriteria.class.php:184 84 | msgid "Add a criterion" 85 | msgstr "Adaugă un criteriu" 86 | 87 | #: inc/typologycriteria.class.php:229 88 | msgid "Criteria's list" 89 | msgstr "Listă criterii" 90 | 91 | #: inc/typologycriteria.class.php:253 inc/typology_item.class.php:937 92 | msgid "Detail of the assigned typology" 93 | msgstr "Detaliu al tipologiei atribuite" 94 | 95 | #: inc/typologycriteriadefinition.class.php:54 96 | msgid "Definition" 97 | msgid_plural "Definitions" 98 | msgstr[0] "Definiţie" 99 | msgstr[1] "Definiţii" 100 | msgstr[2] "Definiţii" 101 | 102 | #: inc/typologycriteriadefinition.class.php:102 103 | msgid "" 104 | "You don't have right to create a definition for this criteria. Thank to " 105 | "contact a person having this right." 106 | msgstr "Nu aveţi drepturi de a crea definţii pentru acest criteriu. Contactaţi o persoană cu aceste drepturi." 107 | 108 | #: inc/typologycriteriadefinition.class.php:566 109 | #: inc/typologycriteriadefinition.class.php:572 110 | #: inc/typologycriteriadefinition.class.php:807 111 | msgid "Less than" 112 | msgstr "Mai mic de" 113 | 114 | #: inc/typologycriteriadefinition.class.php:567 115 | #: inc/typologycriteriadefinition.class.php:573 116 | #: inc/typologycriteriadefinition.class.php:809 117 | msgid "More than" 118 | msgstr "Mai mult de" 119 | 120 | #: inc/typology_item.class.php:60 121 | msgid "Element" 122 | msgid_plural "Elements" 123 | msgstr[0] "Element" 124 | msgstr[1] "Elemente" 125 | msgstr[2] "Elemente" 126 | 127 | #: inc/typology_item.class.php:149 128 | msgid "Add element to the typology" 129 | msgstr "Adaugă element la topologia" 130 | 131 | #: inc/typology_item.class.php:151 132 | msgid "Update element to the typology" 133 | msgstr "Actualizează element la topologie" 134 | 135 | #: inc/typology_item.class.php:153 136 | msgid "Element out of the typology" 137 | msgstr "Element ieşit din topologia" 138 | 139 | #: inc/typology_item.class.php:236 140 | msgid "" 141 | "You cannot assign this typology to this material as he has already a " 142 | "typology : " 143 | msgstr "Nu puteţi atribui această tipologie la acest material seoarece el are deja o tipologie :" 144 | 145 | #: inc/typology_item.class.php:498 146 | msgid "Typology assigned to this material" 147 | msgstr "Tipologie atribuită la acest material" 148 | 149 | #: inc/typology_item.class.php:506 150 | msgid "Actions" 151 | msgstr "Actiuni" 152 | 153 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 154 | msgid "for the criteria" 155 | msgstr "pentru criteriu" 156 | 157 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 158 | msgid "Linked elements" 159 | msgstr "Elemente legate" 160 | 161 | #: inc/typology_item.class.php:705 162 | msgid "Select a type" 163 | msgstr "" 164 | 165 | #: inc/typology_item.class.php:728 166 | msgid "No linked element" 167 | msgstr "Niciun element legat" 168 | 169 | #: inc/typology_item.class.php:929 170 | msgid "Management console" 171 | msgstr "Consolă management" 172 | 173 | #: inc/typology_item.class.php:936 174 | msgid "Comparison" 175 | msgstr "Comparare" 176 | 177 | #: inc/typology_item.class.php:938 178 | msgid "Detail of the encountered configuration" 179 | msgstr "Detaliu al configuraţiei intâlnite" 180 | 181 | #: inc/typology_item.class.php:944 182 | msgid "Waiting value" 183 | msgstr "Valoarea aşteptată" 184 | 185 | #: inc/typology_item.class.php:945 186 | msgid "Real value" 187 | msgstr "Valoarea reală" 188 | -------------------------------------------------------------------------------- /locales/es_AR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # 5 | # Translators: 6 | # Christian Ruggeri , 2013 7 | # Cristian S. Celescinco , 2013 8 | msgid "" 9 | msgstr "" 10 | "Project-Id-Version: GLPI Project - typology plugin\n" 11 | "Report-Msgid-Bugs-To: \n" 12 | "POT-Creation-Date: 2018-08-13 11:49+0200\n" 13 | "PO-Revision-Date: 2017-10-10 13:03+0000\n" 14 | "Last-Translator: Amandine Manceau\n" 15 | "Language-Team: Spanish (Argentina) (http://www.transifex.com/tsmr/GLPI_typology/language/es_AR/)\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Language: es_AR\n" 20 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 21 | 22 | #: hook.php:207 inc/typology_item.class.php:577 23 | msgid "Assign a typology to this material" 24 | msgstr "Asignar una tipología para este componente" 25 | 26 | #: hook.php:208 27 | msgid "Delete the typology of this material" 28 | msgstr "" 29 | 30 | #: hook.php:209 inc/typology.class.php:337 31 | msgid "Recalculate typology for the elements" 32 | msgstr "Recalcular tipología para los elementos" 33 | 34 | #: hook.php:235 35 | msgid "Typology's name" 36 | msgstr "Nombre de la tipología" 37 | 38 | #: hook.php:249 inc/typology_item.class.php:504 39 | #: inc/typology_item.class.php:746 40 | msgid "Responding to typology's criteria" 41 | msgstr "Respondiendo a los criterios de tipologías" 42 | 43 | #: setup.php:77 inc/menu.class.php:44 inc/profile.class.php:166 44 | #: inc/typology.class.php:69 45 | msgid "Typology" 46 | msgid_plural "Typologies" 47 | msgstr[0] "Tipología" 48 | msgstr[1] "Tipologías" 49 | 50 | #: front/typology.form.php:84 51 | msgid "Element not match with the rule for assigning the typology:" 52 | msgstr "El elemento no coincide con la regla asignada a la tipología" 53 | 54 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 55 | #: inc/typology_item.class.php:1086 56 | msgid "Element not match with rules for assigning a typology" 57 | msgstr "Los elementos no coinciden con las reglas asignadas a la tipología" 58 | 59 | #: inc/notificationtargettypology.class.php:49 60 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 61 | #: inc/typology.class.php:488 62 | msgid "Elements not match with the typology" 63 | msgstr "Los elementos no coinciden con la tipología" 64 | 65 | #: inc/notificationtargettypology.class.php:77 66 | #: inc/notificationtargettypology.class.php:114 67 | msgid "Link to the typology" 68 | msgstr "Vincular a una tipología" 69 | 70 | #: inc/notificationtargettypology.class.php:78 71 | #: inc/notificationtargettypology.class.php:115 72 | msgid "Link to the element" 73 | msgstr "Vincular a un elemento" 74 | 75 | #: inc/ruletypologycollection.class.php:51 76 | msgid "Rules for assigning a typology to a computer" 77 | msgstr "Reglas de asignación de tipología para una computadora" 78 | 79 | #: inc/typology.class.php:419 80 | msgid "Typology of the linked elements is updated." 81 | msgstr "La tipología de los elementos vinculados está actualizada" 82 | 83 | #: inc/typologycriteria.class.php:184 84 | msgid "Add a criterion" 85 | msgstr "Agregar un criterio" 86 | 87 | #: inc/typologycriteria.class.php:229 88 | msgid "Criteria's list" 89 | msgstr "Lista de criterios" 90 | 91 | #: inc/typologycriteria.class.php:253 inc/typology_item.class.php:937 92 | msgid "Detail of the assigned typology" 93 | msgstr "Detalle de las tipologías asignadas" 94 | 95 | #: inc/typologycriteriadefinition.class.php:54 96 | msgid "Definition" 97 | msgid_plural "Definitions" 98 | msgstr[0] "Definición" 99 | msgstr[1] "Definiciones" 100 | 101 | #: inc/typologycriteriadefinition.class.php:102 102 | msgid "" 103 | "You don't have right to create a definition for this criteria. Thank to " 104 | "contact a person having this right." 105 | msgstr "Usted no está autorizado a crear una definición para estos criterios. Por favor contacte a una persona autorizada." 106 | 107 | #: inc/typologycriteriadefinition.class.php:566 108 | #: inc/typologycriteriadefinition.class.php:572 109 | #: inc/typologycriteriadefinition.class.php:807 110 | msgid "Less than" 111 | msgstr "Menor que" 112 | 113 | #: inc/typologycriteriadefinition.class.php:567 114 | #: inc/typologycriteriadefinition.class.php:573 115 | #: inc/typologycriteriadefinition.class.php:809 116 | msgid "More than" 117 | msgstr "Mayor que" 118 | 119 | #: inc/typology_item.class.php:60 120 | msgid "Element" 121 | msgid_plural "Elements" 122 | msgstr[0] "Elemento" 123 | msgstr[1] "Elementos" 124 | 125 | #: inc/typology_item.class.php:149 126 | msgid "Add element to the typology" 127 | msgstr "Añadir elemento a la tipología" 128 | 129 | #: inc/typology_item.class.php:151 130 | msgid "Update element to the typology" 131 | msgstr "Actualizar elemento a la tipología" 132 | 133 | #: inc/typology_item.class.php:153 134 | msgid "Element out of the typology" 135 | msgstr "Elemento de la tipología" 136 | 137 | #: inc/typology_item.class.php:236 138 | msgid "" 139 | "You cannot assign this typology to this material as he has already a " 140 | "typology : " 141 | msgstr "No se puede asignar esta tipología a este material porque ya tiene una:" 142 | 143 | #: inc/typology_item.class.php:498 144 | msgid "Typology assigned to this material" 145 | msgstr "Tipología asignada a este material" 146 | 147 | #: inc/typology_item.class.php:506 148 | msgid "Actions" 149 | msgstr "Acciones" 150 | 151 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 152 | msgid "for the criteria" 153 | msgstr "para los criterios" 154 | 155 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 156 | msgid "Linked elements" 157 | msgstr "Elementos vinculados" 158 | 159 | #: inc/typology_item.class.php:705 160 | msgid "Select a type" 161 | msgstr "" 162 | 163 | #: inc/typology_item.class.php:728 164 | msgid "No linked element" 165 | msgstr "Elemento no vinculado" 166 | 167 | #: inc/typology_item.class.php:929 168 | msgid "Management console" 169 | msgstr "Consola de administración" 170 | 171 | #: inc/typology_item.class.php:936 172 | msgid "Comparison" 173 | msgstr "Comparación" 174 | 175 | #: inc/typology_item.class.php:938 176 | msgid "Detail of the encountered configuration" 177 | msgstr "Detalle de la configuración encontrada" 178 | 179 | #: inc/typology_item.class.php:944 180 | msgid "Waiting value" 181 | msgstr "Esperando valor" 182 | 183 | #: inc/typology_item.class.php:945 184 | msgid "Real value" 185 | msgstr "Valor real" 186 | -------------------------------------------------------------------------------- /locales/pt_BR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Xavier CAILLAUD , 2020 8 | # Carlos Pinto Jr., 2021 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: GLPI - Typology plugin\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2021-01-07 10:35+0000\n" 16 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 17 | "Last-Translator: Carlos Pinto Jr., 2021\n" 18 | "Language-Team: Portuguese (Brazil) (https://www.transifex.com/infotelGLPI/teams/12374/pt_BR/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: pt_BR\n" 23 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 24 | 25 | #: hook.php:209 inc/typology_item.class.php:577 26 | msgid "Assign a typology to this material" 27 | msgstr "Atribuir uma tipologia a este material" 28 | 29 | #: hook.php:210 30 | msgid "Delete the typology of this material" 31 | msgstr "Apague a tipologia deste material" 32 | 33 | #: hook.php:211 inc/typology.class.php:337 34 | msgid "Recalculate typology for the elements" 35 | msgstr "Recalcular tipologia para os elementos" 36 | 37 | #: hook.php:238 38 | msgid "Typology's name" 39 | msgstr "Nome da tipologia" 40 | 41 | #: hook.php:252 inc/typology_item.class.php:504 42 | #: inc/typology_item.class.php:746 43 | msgid "Responding to typology's criteria" 44 | msgstr "Respondendo a critérios da tipologia" 45 | 46 | #: setup.php:82 inc/menu.class.php:44 inc/profile.class.php:166 47 | #: inc/typology.class.php:69 48 | msgid "Typology" 49 | msgid_plural "Typologies" 50 | msgstr[0] "Tipologia" 51 | msgstr[1] "Tipologias" 52 | 53 | #: front/typology.form.php:84 54 | msgid "Element not match with the rule for assigning the typology:" 55 | msgstr "Elemento não corresponde à regra para atribuição da tipologia:" 56 | 57 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 58 | #: inc/typology_item.class.php:1086 59 | msgid "Element not match with rules for assigning a typology" 60 | msgstr "Elemento não corresponde a regras para atribuição de uma tipologia" 61 | 62 | #: inc/notificationtargettypology.class.php:49 63 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 64 | #: inc/typology.class.php:490 65 | msgid "Elements not match with the typology" 66 | msgstr "Elementos não correspondem à tipologia" 67 | 68 | #: inc/notificationtargettypology.class.php:77 69 | #: inc/notificationtargettypology.class.php:114 70 | msgid "Link to the typology" 71 | msgstr "Vínculo para o tipologia" 72 | 73 | #: inc/notificationtargettypology.class.php:78 74 | #: inc/notificationtargettypology.class.php:115 75 | msgid "Link to the element" 76 | msgstr "Vínculo para o elemento" 77 | 78 | #: inc/ruletypologycollection.class.php:51 79 | msgid "Rules for assigning a typology to a computer" 80 | msgstr "Regras para atribuição de uma tipologia a um computador" 81 | 82 | #: inc/typology.class.php:419 83 | msgid "Typology of the linked elements is updated." 84 | msgstr "Tipologia dos elementos vinculados está atualizada." 85 | 86 | #: inc/typology_item.class.php:60 87 | msgid "Element" 88 | msgid_plural "Elements" 89 | msgstr[0] "Elemento" 90 | msgstr[1] "Elementos" 91 | 92 | #: inc/typology_item.class.php:149 93 | msgid "Add element to the typology" 94 | msgstr "Adicionar elemento à tipologia" 95 | 96 | #: inc/typology_item.class.php:151 97 | msgid "Update element to the typology" 98 | msgstr "Atualizar elemento à tipologia" 99 | 100 | #: inc/typology_item.class.php:153 101 | msgid "Element out of the typology" 102 | msgstr "Elemento fora da tipologia" 103 | 104 | #: inc/typology_item.class.php:236 105 | msgid "" 106 | "You cannot assign this typology to this material as he has already a " 107 | "typology : " 108 | msgstr "" 109 | "Você não pode atribuir esta tipologia a este material, pois ele já possui " 110 | "uma tipologia:" 111 | 112 | #: inc/typology_item.class.php:498 113 | msgid "Typology assigned to this material" 114 | msgstr "Tipologia atribuída a este material" 115 | 116 | #: inc/typology_item.class.php:506 117 | msgid "Actions" 118 | msgstr "Ações" 119 | 120 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 121 | msgid "for the criteria" 122 | msgstr "para o critério" 123 | 124 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 125 | msgid "Linked elements" 126 | msgstr "Elementos vinculados" 127 | 128 | #: inc/typology_item.class.php:705 129 | msgid "Select a type" 130 | msgstr "Selecione um tipo" 131 | 132 | #: inc/typology_item.class.php:728 133 | msgid "No linked element" 134 | msgstr "Nenhum elemento vinculado" 135 | 136 | #: inc/typology_item.class.php:929 137 | msgid "Management console" 138 | msgstr "Console de gerenciamento" 139 | 140 | #: inc/typology_item.class.php:936 141 | msgid "Comparison" 142 | msgstr "Comparação" 143 | 144 | #: inc/typology_item.class.php:937 inc/typologycriteria.class.php:253 145 | msgid "Detail of the assigned typology" 146 | msgstr "Detalhe da tipologia atribuída" 147 | 148 | #: inc/typology_item.class.php:938 149 | msgid "Detail of the encountered configuration" 150 | msgstr "Detalhe da configuração encontrada" 151 | 152 | #: inc/typology_item.class.php:944 153 | msgid "Waiting value" 154 | msgstr "Valor esperado" 155 | 156 | #: inc/typology_item.class.php:945 157 | msgid "Real value" 158 | msgstr "Valor real" 159 | 160 | #: inc/typologycriteria.class.php:184 161 | msgid "Add a criterion" 162 | msgstr "Adicionar um critério" 163 | 164 | #: inc/typologycriteria.class.php:229 165 | msgid "Criteria's list" 166 | msgstr "Lista de critérios" 167 | 168 | #: inc/typologycriteriadefinition.class.php:54 169 | msgid "Definition" 170 | msgid_plural "Definitions" 171 | msgstr[0] "Definição" 172 | msgstr[1] "Definições" 173 | 174 | #: inc/typologycriteriadefinition.class.php:102 175 | msgid "" 176 | "You don't have right to create a definition for this criteria. Thank to " 177 | "contact a person having this right." 178 | msgstr "" 179 | "Você não tem permissão para criar uma definição para este critério. Obrigado" 180 | " por contatar uma pessoa que tenha esta permissão." 181 | 182 | #: inc/typologycriteriadefinition.class.php:566 183 | #: inc/typologycriteriadefinition.class.php:572 184 | #: inc/typologycriteriadefinition.class.php:807 185 | msgid "Less than" 186 | msgstr "Menos de" 187 | 188 | #: inc/typologycriteriadefinition.class.php:567 189 | #: inc/typologycriteriadefinition.class.php:573 190 | #: inc/typologycriteriadefinition.class.php:809 191 | msgid "More than" 192 | msgstr "Mais de" 193 | -------------------------------------------------------------------------------- /locales/it_IT.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Xavier CAILLAUD , 2020 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: GLPI - Typology plugin 2.4.0\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2019-02-25 09:46+0100\n" 15 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 16 | "Last-Translator: Xavier CAILLAUD , 2020\n" 17 | "Language-Team: Italian (Italy) (https://www.transifex.com/infotelGLPI/teams/12374/it_IT/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: it_IT\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: hook.php:210 inc/typology_item.class.php:577 25 | msgid "Assign a typology to this material" 26 | msgstr "Assegnare una tipologia a questo materiale" 27 | 28 | #: hook.php:211 29 | msgid "Delete the typology of this material" 30 | msgstr "Eliminare la tipologia di questo materiale" 31 | 32 | #: hook.php:212 inc/typology.class.php:337 33 | msgid "Recalculate typology for the elements" 34 | msgstr "Ricalcolare tipologia per gli elementi" 35 | 36 | #: hook.php:239 37 | msgid "Typology's name" 38 | msgstr "Il nome della tipologia" 39 | 40 | #: hook.php:253 inc/typology_item.class.php:504 41 | #: inc/typology_item.class.php:746 42 | msgid "Responding to typology's criteria" 43 | msgstr "Rispondendo ai criteri della tipologia" 44 | 45 | #: setup.php:79 inc/menu.class.php:44 inc/profile.class.php:166 46 | #: inc/typology.class.php:69 47 | msgid "Typology" 48 | msgid_plural "Typologies" 49 | msgstr[0] "Tipologia" 50 | msgstr[1] "Tipologie" 51 | 52 | #: front/typology.form.php:84 53 | msgid "Element not match with the rule for assigning the typology:" 54 | msgstr "" 55 | "Elemento non corrisponde a la regola dell'assegnazione della tipologia:" 56 | 57 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 58 | #: inc/typology_item.class.php:1086 59 | msgid "Element not match with rules for assigning a typology" 60 | msgstr "Elemento non corrisponde con le regole per assegnare una tipologia" 61 | 62 | #: inc/notificationtargettypology.class.php:49 63 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 64 | #: inc/typology.class.php:490 65 | msgid "Elements not match with the typology" 66 | msgstr "Gli elementi non corrispondono a la tipologia" 67 | 68 | #: inc/notificationtargettypology.class.php:77 69 | #: inc/notificationtargettypology.class.php:114 70 | msgid "Link to the typology" 71 | msgstr "Collegamento alla tipologia" 72 | 73 | #: inc/notificationtargettypology.class.php:78 74 | #: inc/notificationtargettypology.class.php:115 75 | msgid "Link to the element" 76 | msgstr "Collegamento al elemento" 77 | 78 | #: inc/ruletypologycollection.class.php:51 79 | msgid "Rules for assigning a typology to a computer" 80 | msgstr "Regole per l'assegnazione di una tipologia ad un computer" 81 | 82 | #: inc/typology.class.php:419 83 | msgid "Typology of the linked elements is updated." 84 | msgstr "Tipologia degli elementi connessi e aggiornata." 85 | 86 | #: inc/typologycriteria.class.php:184 87 | msgid "Add a criterion" 88 | msgstr "Aggiungere un criterio" 89 | 90 | #: inc/typologycriteria.class.php:229 91 | msgid "Criteria's list" 92 | msgstr "La lista di criteri" 93 | 94 | #: inc/typologycriteria.class.php:253 inc/typology_item.class.php:937 95 | msgid "Detail of the assigned typology" 96 | msgstr "Dettaglio della tipologia assegnata" 97 | 98 | #: inc/typologycriteriadefinition.class.php:54 99 | msgid "Definition" 100 | msgid_plural "Definitions" 101 | msgstr[0] "Definizione" 102 | msgstr[1] "Definizioni" 103 | 104 | #: inc/typologycriteriadefinition.class.php:102 105 | msgid "" 106 | "You don't have right to create a definition for this criteria. Thank to " 107 | "contact a person having this right." 108 | msgstr "" 109 | "Non avete diritto di creare una definizione per questo criterio. Si prega di" 110 | " contattare una persona che ha questo diritto." 111 | 112 | #: inc/typologycriteriadefinition.class.php:566 113 | #: inc/typologycriteriadefinition.class.php:572 114 | #: inc/typologycriteriadefinition.class.php:807 115 | msgid "Less than" 116 | msgstr "Meno di" 117 | 118 | #: inc/typologycriteriadefinition.class.php:567 119 | #: inc/typologycriteriadefinition.class.php:573 120 | #: inc/typologycriteriadefinition.class.php:809 121 | msgid "More than" 122 | msgstr "Più di" 123 | 124 | #: inc/typology_item.class.php:60 125 | msgid "Element" 126 | msgid_plural "Elements" 127 | msgstr[0] "Elemento" 128 | msgstr[1] "Elementi" 129 | 130 | #: inc/typology_item.class.php:149 131 | msgid "Add element to the typology" 132 | msgstr "Aggiungere elemento alla tipologia" 133 | 134 | #: inc/typology_item.class.php:151 135 | msgid "Update element to the typology" 136 | msgstr "Aggiornare l'elemento alla tipologia" 137 | 138 | #: inc/typology_item.class.php:153 139 | msgid "Element out of the typology" 140 | msgstr "Elemento fuori dalla tipologia" 141 | 142 | #: inc/typology_item.class.php:236 143 | msgid "" 144 | "You cannot assign this typology to this material as he has already a " 145 | "typology : " 146 | msgstr "" 147 | "Non è possibile assegnare questa tipologia a questo materiale perché ha già " 148 | "una tipologia:" 149 | 150 | #: inc/typology_item.class.php:498 151 | msgid "Typology assigned to this material" 152 | msgstr "Tipologia assegnata a questo materiale" 153 | 154 | #: inc/typology_item.class.php:506 155 | msgid "Actions" 156 | msgstr "Azioni" 157 | 158 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 159 | msgid "for the criteria" 160 | msgstr "per i criteri" 161 | 162 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 163 | msgid "Linked elements" 164 | msgstr "Elementi collegati" 165 | 166 | #: inc/typology_item.class.php:705 167 | msgid "Select a type" 168 | msgstr "Selezionare il tipo" 169 | 170 | #: inc/typology_item.class.php:728 171 | msgid "No linked element" 172 | msgstr "Nessun elemento collegato" 173 | 174 | #: inc/typology_item.class.php:929 175 | msgid "Management console" 176 | msgstr "Console di gestione" 177 | 178 | #: inc/typology_item.class.php:936 179 | msgid "Comparison" 180 | msgstr "Confronto" 181 | 182 | #: inc/typology_item.class.php:938 183 | msgid "Detail of the encountered configuration" 184 | msgstr "Dettaglio della configurazione incontrata" 185 | 186 | #: inc/typology_item.class.php:944 187 | msgid "Waiting value" 188 | msgstr "Valore di attesa" 189 | 190 | #: inc/typology_item.class.php:945 191 | msgid "Real value" 192 | msgstr "Valore reale" 193 | -------------------------------------------------------------------------------- /locales/es_EC.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Soporte Infraestructura Standby, 2023 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: GLPI - Typology plugin\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2022-07-26 14:04+0000\n" 15 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 16 | "Last-Translator: Soporte Infraestructura Standby, 2023\n" 17 | "Language-Team: Spanish (Ecuador) (https://app.transifex.com/infotelGLPI/teams/12374/es_EC/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: es_EC\n" 22 | "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" 23 | 24 | #: hook.php:206 inc/typology_item.class.php:573 25 | msgid "Assign a typology to this material" 26 | msgstr "Asignar una tipología a este material" 27 | 28 | #: hook.php:207 29 | msgid "Delete the typology of this material" 30 | msgstr "Eliminar la tipología de este material" 31 | 32 | #: hook.php:208 inc/typology.class.php:345 33 | msgid "Recalculate typology for the elements" 34 | msgstr "Recalcular la tipología de los elementos" 35 | 36 | #: hook.php:234 37 | msgid "Typology's name" 38 | msgstr "Denominación de la tipología" 39 | 40 | #: hook.php:248 inc/typology_item.class.php:504 41 | #: inc/typology_item.class.php:742 42 | msgid "Responding to typology's criteria" 43 | msgstr "Responder a los criterios de la tipología" 44 | 45 | #: setup.php:85 inc/profile.class.php:166 inc/typology.class.php:73 46 | msgid "Typology" 47 | msgid_plural "Typologies" 48 | msgstr[0] "Typologies" 49 | msgstr[1] "Typologies" 50 | msgstr[2] "Typologies" 51 | 52 | #: front/typology.form.php:84 53 | msgid "Element not match with the rule for assigning the typology:" 54 | msgstr "Elemento no coincidente con la regla de asignación de la tipología:" 55 | 56 | #: front/typology.form.php:99 inc/typology_item.class.php:1062 57 | #: inc/typology_item.class.php:1078 58 | msgid "Element not match with rules for assigning a typology" 59 | msgstr "Elemento no coincidente con las reglas de asignación de una tipología" 60 | 61 | #: inc/notificationtargettypology.class.php:49 62 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:349 63 | #: inc/typology.class.php:498 64 | msgid "Elements not match with the typology" 65 | msgstr "Elementos que no coinciden con la tipología" 66 | 67 | #: inc/notificationtargettypology.class.php:77 68 | #: inc/notificationtargettypology.class.php:114 69 | msgid "Link to the typology" 70 | msgstr "Enlace a la tipología" 71 | 72 | #: inc/notificationtargettypology.class.php:78 73 | #: inc/notificationtargettypology.class.php:115 74 | msgid "Link to the element" 75 | msgstr "Enlace al elemento" 76 | 77 | #: inc/ruletypologycollection.class.php:51 78 | msgid "Rules for assigning a typology to a computer" 79 | msgstr "Reglas para asignar una tipología a un ordenador" 80 | 81 | #: inc/typology.class.php:427 82 | msgid "Typology of the linked elements is updated." 83 | msgstr "Se actualiza la tipología de los elementos vinculados." 84 | 85 | #: inc/typology_item.class.php:61 86 | msgid "Element" 87 | msgid_plural "Elements" 88 | msgstr[0] "Elementos" 89 | msgstr[1] "Elementos" 90 | msgstr[2] "Elementos" 91 | 92 | #: inc/typology_item.class.php:153 93 | msgid "Add element to the typology" 94 | msgstr "Agregar elemento a la tipología" 95 | 96 | #: inc/typology_item.class.php:155 97 | msgid "Update element to the typology" 98 | msgstr "Actualizar el elemento de la tipología" 99 | 100 | #: inc/typology_item.class.php:157 101 | msgid "Element out of the typology" 102 | msgstr "Elemento fuera de la tipología" 103 | 104 | #: inc/typology_item.class.php:240 105 | msgid "" 106 | "You cannot assign this typology to this material as he has already a " 107 | "typology : " 108 | msgstr "" 109 | "No se puede asignar esta tipología a este material como él ya tiene una " 110 | "tipología :" 111 | 112 | #: inc/typology_item.class.php:498 113 | msgid "Typology assigned to this material" 114 | msgstr "Tipología asignada a este material" 115 | 116 | #: inc/typology_item.class.php:506 117 | msgid "Actions" 118 | msgstr "Acciones" 119 | 120 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:801 121 | msgid "for the criteria" 122 | msgstr "para los criterios" 123 | 124 | #: inc/typology_item.class.php:679 inc/typology_item.class.php:726 125 | msgid "Linked elements" 126 | msgstr "Elementos vinculados" 127 | 128 | #: inc/typology_item.class.php:701 129 | msgid "Select a type" 130 | msgstr "Seleccione un tipo" 131 | 132 | #: inc/typology_item.class.php:724 133 | msgid "No linked element" 134 | msgstr "Ningún elemento vinculado" 135 | 136 | #: inc/typology_item.class.php:924 137 | msgid "Management console" 138 | msgstr "Consola de administración" 139 | 140 | #: inc/typology_item.class.php:931 141 | msgid "Comparison" 142 | msgstr "Comparación" 143 | 144 | #: inc/typology_item.class.php:932 inc/typologycriteria.class.php:254 145 | msgid "Detail of the assigned typology" 146 | msgstr "Detalle de la tipología asignada" 147 | 148 | #: inc/typology_item.class.php:933 149 | msgid "Detail of the encountered configuration" 150 | msgstr "Detalle de la configuración encontrada" 151 | 152 | #: inc/typology_item.class.php:939 153 | msgid "Waiting value" 154 | msgstr "Valor en espera" 155 | 156 | #: inc/typology_item.class.php:940 157 | msgid "Real value" 158 | msgstr "Valor real" 159 | 160 | #: inc/typologycriteria.class.php:184 161 | msgid "Add a criterion" 162 | msgstr "Añadir un criterio" 163 | 164 | #: inc/typologycriteria.class.php:230 165 | msgid "Criteria's list" 166 | msgstr "Lista de criterios" 167 | 168 | #: inc/typologycriteriadefinition.class.php:54 169 | msgid "Definition" 170 | msgid_plural "Definitions" 171 | msgstr[0] "Definición" 172 | msgstr[1] "Definición" 173 | msgstr[2] "Definición" 174 | 175 | #: inc/typologycriteriadefinition.class.php:107 176 | msgid "" 177 | "You don't have right to create a definition for this criteria. Thank to " 178 | "contact a person having this right." 179 | msgstr "" 180 | "No tiene derecho a crear una definición para este criterio. Gracias por " 181 | "contactar a una persona que tenga este derecho." 182 | 183 | #: inc/typologycriteriadefinition.class.php:577 184 | #: inc/typologycriteriadefinition.class.php:583 185 | #: inc/typologycriteriadefinition.class.php:817 186 | msgid "Less than" 187 | msgstr "Menos de" 188 | 189 | #: inc/typologycriteriadefinition.class.php:578 190 | #: inc/typologycriteriadefinition.class.php:584 191 | #: inc/typologycriteriadefinition.class.php:819 192 | msgid "More than" 193 | msgstr "Más de" 194 | -------------------------------------------------------------------------------- /locales/de_DE.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Xavier CAILLAUD , 2020 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: GLPI - Typology plugin 2.4.0\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2019-02-25 09:46+0100\n" 15 | "PO-Revision-Date: 2020-11-02 13:02+0000\n" 16 | "Last-Translator: Xavier CAILLAUD , 2020\n" 17 | "Language-Team: German (Germany) (https://www.transifex.com/infotelGLPI/teams/12374/de_DE/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: de_DE\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: hook.php:210 inc/typology_item.class.php:577 25 | msgid "Assign a typology to this material" 26 | msgstr "Weisen Sie diesem Material eine Typologie zu" 27 | 28 | #: hook.php:211 29 | msgid "Delete the typology of this material" 30 | msgstr "Löschen Sie die Typologie dieses Materials" 31 | 32 | #: hook.php:212 inc/typology.class.php:337 33 | msgid "Recalculate typology for the elements" 34 | msgstr "Typologie für die Elemente Neu berechnen" 35 | 36 | #: hook.php:239 37 | msgid "Typology's name" 38 | msgstr "Name der Typologie" 39 | 40 | #: hook.php:253 inc/typology_item.class.php:504 41 | #: inc/typology_item.class.php:746 42 | msgid "Responding to typology's criteria" 43 | msgstr "Auf Typologie Kriterien gehorchen" 44 | 45 | #: setup.php:79 inc/menu.class.php:44 inc/profile.class.php:166 46 | #: inc/typology.class.php:69 47 | msgid "Typology" 48 | msgid_plural "Typologies" 49 | msgstr[0] "Typologie" 50 | msgstr[1] "Typologien" 51 | 52 | #: front/typology.form.php:84 53 | msgid "Element not match with the rule for assigning the typology:" 54 | msgstr "" 55 | "Das Element stimmt nicht mit der Regel für die Zuweisung der Typologie " 56 | "überein:" 57 | 58 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 59 | #: inc/typology_item.class.php:1086 60 | msgid "Element not match with rules for assigning a typology" 61 | msgstr "" 62 | "Element stimmt nicht mit Regeln für die Zuweisung einer Typologie überein" 63 | 64 | #: inc/notificationtargettypology.class.php:49 65 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 66 | #: inc/typology.class.php:490 67 | msgid "Elements not match with the typology" 68 | msgstr "Elemente stimmen nicht mit der Typologie überein" 69 | 70 | #: inc/notificationtargettypology.class.php:77 71 | #: inc/notificationtargettypology.class.php:114 72 | msgid "Link to the typology" 73 | msgstr "Verbindung zur Typologie" 74 | 75 | #: inc/notificationtargettypology.class.php:78 76 | #: inc/notificationtargettypology.class.php:115 77 | msgid "Link to the element" 78 | msgstr "Verbindung zum Element" 79 | 80 | #: inc/ruletypologycollection.class.php:51 81 | msgid "Rules for assigning a typology to a computer" 82 | msgstr "Regeln für die Zuordnung einer Typologie zu einem Computer" 83 | 84 | #: inc/typology.class.php:419 85 | msgid "Typology of the linked elements is updated." 86 | msgstr "Die Typologie der verknüpften Elemente wird aktualisiert" 87 | 88 | #: inc/typologycriteria.class.php:184 89 | msgid "Add a criterion" 90 | msgstr "Fügen Sie ein Kriterium" 91 | 92 | #: inc/typologycriteria.class.php:229 93 | msgid "Criteria's list" 94 | msgstr "Liste der Kriterien" 95 | 96 | #: inc/typologycriteria.class.php:253 inc/typology_item.class.php:937 97 | msgid "Detail of the assigned typology" 98 | msgstr "Detail der zugeordneten Typologie" 99 | 100 | #: inc/typologycriteriadefinition.class.php:54 101 | msgid "Definition" 102 | msgid_plural "Definitions" 103 | msgstr[0] "Definition" 104 | msgstr[1] "Definitionen" 105 | 106 | #: inc/typologycriteriadefinition.class.php:102 107 | msgid "" 108 | "You don't have right to create a definition for this criteria. Thank to " 109 | "contact a person having this right." 110 | msgstr "" 111 | "Sie haben nicht das Recht, eine Definition für diese Kriterien zu erstellen." 112 | " Bitte kontaktieren Sie eine Person mit diesem Recht." 113 | 114 | #: inc/typologycriteriadefinition.class.php:566 115 | #: inc/typologycriteriadefinition.class.php:572 116 | #: inc/typologycriteriadefinition.class.php:807 117 | msgid "Less than" 118 | msgstr "Weniger als" 119 | 120 | #: inc/typologycriteriadefinition.class.php:567 121 | #: inc/typologycriteriadefinition.class.php:573 122 | #: inc/typologycriteriadefinition.class.php:809 123 | msgid "More than" 124 | msgstr "Mehr als" 125 | 126 | #: inc/typology_item.class.php:60 127 | msgid "Element" 128 | msgid_plural "Elements" 129 | msgstr[0] "Element" 130 | msgstr[1] "Elementen" 131 | 132 | #: inc/typology_item.class.php:149 133 | msgid "Add element to the typology" 134 | msgstr "Element zur Typologie hinzufügen" 135 | 136 | #: inc/typology_item.class.php:151 137 | msgid "Update element to the typology" 138 | msgstr "Element zur Typologie aktualisieren" 139 | 140 | #: inc/typology_item.class.php:153 141 | msgid "Element out of the typology" 142 | msgstr "Element aussen der Typologie" 143 | 144 | #: inc/typology_item.class.php:236 145 | msgid "" 146 | "You cannot assign this typology to this material as he has already a " 147 | "typology : " 148 | msgstr "" 149 | "Diese Typologie können Sie diesem Material nicht zuordnen, da es bereits " 150 | "eine Typologie aufweist, weil es bereits eine Typologie hat" 151 | 152 | #: inc/typology_item.class.php:498 153 | msgid "Typology assigned to this material" 154 | msgstr "Typologie diesem Material zugewiesen" 155 | 156 | #: inc/typology_item.class.php:506 157 | msgid "Actions" 158 | msgstr "Massnahmen" 159 | 160 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 161 | msgid "for the criteria" 162 | msgstr "für die Kriterien" 163 | 164 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 165 | msgid "Linked elements" 166 | msgstr "Verknüpfte Elemente" 167 | 168 | #: inc/typology_item.class.php:705 169 | msgid "Select a type" 170 | msgstr "Den Typ auswählen" 171 | 172 | #: inc/typology_item.class.php:728 173 | msgid "No linked element" 174 | msgstr "Kein verknüpftes Element" 175 | 176 | #: inc/typology_item.class.php:929 177 | msgid "Management console" 178 | msgstr "Verwaltungskonsole" 179 | 180 | #: inc/typology_item.class.php:936 181 | msgid "Comparison" 182 | msgstr "Vergleich" 183 | 184 | #: inc/typology_item.class.php:938 185 | msgid "Detail of the encountered configuration" 186 | msgstr "Detail der angetroffenen Konfiguration" 187 | 188 | #: inc/typology_item.class.php:944 189 | msgid "Waiting value" 190 | msgstr "Wartenwert" 191 | 192 | #: inc/typology_item.class.php:945 193 | msgid "Real value" 194 | msgstr "Sachwert" 195 | -------------------------------------------------------------------------------- /locales/ru_RU.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Typology Development Team 3 | # This file is distributed under the same license as the GLPI - Typology plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Vitalii Uvarov , 2020 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: GLPI - Typology plugin\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-11-03 13:12+0000\n" 15 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 16 | "Last-Translator: Vitalii Uvarov , 2020\n" 17 | "Language-Team: Russian (Russia) (https://www.transifex.com/infotelGLPI/teams/12374/ru_RU/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: ru_RU\n" 22 | "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" 23 | 24 | #: hook.php:209 inc/typology_item.class.php:577 25 | msgid "Assign a typology to this material" 26 | msgstr "Присвоить типологию этому материалу" 27 | 28 | #: hook.php:210 29 | msgid "Delete the typology of this material" 30 | msgstr "Удалить типологию из этого материала" 31 | 32 | #: hook.php:211 inc/typology.class.php:337 33 | msgid "Recalculate typology for the elements" 34 | msgstr "Пересчитать типологию для этих элементов " 35 | 36 | #: hook.php:238 37 | msgid "Typology's name" 38 | msgstr "Имя типологии" 39 | 40 | #: hook.php:252 inc/typology_item.class.php:504 41 | #: inc/typology_item.class.php:746 42 | msgid "Responding to typology's criteria" 43 | msgstr "Реагирование на критерии типологии" 44 | 45 | #: setup.php:82 inc/menu.class.php:44 inc/profile.class.php:166 46 | #: inc/typology.class.php:69 47 | msgid "Typology" 48 | msgid_plural "Typologies" 49 | msgstr[0] "Типология" 50 | msgstr[1] "Типологий" 51 | msgstr[2] "Типологий" 52 | msgstr[3] "Типологии" 53 | 54 | #: front/typology.form.php:84 55 | msgid "Element not match with the rule for assigning the typology:" 56 | msgstr "Элемент не соответствует правилу присвоения типологии:" 57 | 58 | #: front/typology.form.php:99 inc/typology_item.class.php:1070 59 | #: inc/typology_item.class.php:1086 60 | msgid "Element not match with rules for assigning a typology" 61 | msgstr "Элемент не соответствует правилам присвоения типологии" 62 | 63 | #: inc/notificationtargettypology.class.php:49 64 | #: inc/notificationtargettypology.class.php:71 inc/typology.class.php:341 65 | #: inc/typology.class.php:490 66 | msgid "Elements not match with the typology" 67 | msgstr "Элементы не совпадают с типологией" 68 | 69 | #: inc/notificationtargettypology.class.php:77 70 | #: inc/notificationtargettypology.class.php:114 71 | msgid "Link to the typology" 72 | msgstr "Ссылка на типологию" 73 | 74 | #: inc/notificationtargettypology.class.php:78 75 | #: inc/notificationtargettypology.class.php:115 76 | msgid "Link to the element" 77 | msgstr "Ссылка на элемент" 78 | 79 | #: inc/ruletypologycollection.class.php:51 80 | msgid "Rules for assigning a typology to a computer" 81 | msgstr "Правила присвоения типологии компьютеру" 82 | 83 | #: inc/typology.class.php:419 84 | msgid "Typology of the linked elements is updated." 85 | msgstr "Обновление типологии связанных элементов." 86 | 87 | #: inc/typology_item.class.php:60 88 | msgid "Element" 89 | msgid_plural "Elements" 90 | msgstr[0] "Элемент" 91 | msgstr[1] "Элементов" 92 | msgstr[2] "Элементов" 93 | msgstr[3] "Элементы" 94 | 95 | #: inc/typology_item.class.php:149 96 | msgid "Add element to the typology" 97 | msgstr "Добавить элемент в типологию" 98 | 99 | #: inc/typology_item.class.php:151 100 | msgid "Update element to the typology" 101 | msgstr "Обновить элемент в типологии" 102 | 103 | #: inc/typology_item.class.php:153 104 | msgid "Element out of the typology" 105 | msgstr "Элементы без типологии" 106 | 107 | #: inc/typology_item.class.php:236 108 | msgid "" 109 | "You cannot assign this typology to this material as he has already a " 110 | "typology : " 111 | msgstr "" 112 | "Данному материалу нельзя присвоить эту типологию, потому что он уже имеет " 113 | "типологию:" 114 | 115 | #: inc/typology_item.class.php:498 116 | msgid "Typology assigned to this material" 117 | msgstr "Типология данного материала" 118 | 119 | #: inc/typology_item.class.php:506 120 | msgid "Actions" 121 | msgstr "Действия" 122 | 123 | #: inc/typology_item.class.php:541 inc/typology_item.class.php:806 124 | msgid "for the criteria" 125 | msgstr "для критериев " 126 | 127 | #: inc/typology_item.class.php:683 inc/typology_item.class.php:730 128 | msgid "Linked elements" 129 | msgstr "Связанные элементы" 130 | 131 | #: inc/typology_item.class.php:705 132 | msgid "Select a type" 133 | msgstr "Выбрать тип" 134 | 135 | #: inc/typology_item.class.php:728 136 | msgid "No linked element" 137 | msgstr "Несвязанный элемент" 138 | 139 | #: inc/typology_item.class.php:929 140 | msgid "Management console" 141 | msgstr "Консоль управления" 142 | 143 | #: inc/typology_item.class.php:936 144 | msgid "Comparison" 145 | msgstr "Сравнение" 146 | 147 | #: inc/typology_item.class.php:937 inc/typologycriteria.class.php:253 148 | msgid "Detail of the assigned typology" 149 | msgstr "Детали присвоенной типологии" 150 | 151 | #: inc/typology_item.class.php:938 152 | msgid "Detail of the encountered configuration" 153 | msgstr "Детали обнаруженной конфигурации" 154 | 155 | #: inc/typology_item.class.php:944 156 | msgid "Waiting value" 157 | msgstr "Ожидается значение" 158 | 159 | #: inc/typology_item.class.php:945 160 | msgid "Real value" 161 | msgstr "Действительное значение" 162 | 163 | #: inc/typologycriteria.class.php:184 164 | msgid "Add a criterion" 165 | msgstr "Добавить критерий" 166 | 167 | #: inc/typologycriteria.class.php:229 168 | msgid "Criteria's list" 169 | msgstr "Список критериев" 170 | 171 | #: inc/typologycriteriadefinition.class.php:54 172 | msgid "Definition" 173 | msgid_plural "Definitions" 174 | msgstr[0] "Определение" 175 | msgstr[1] "Определений" 176 | msgstr[2] "Определений" 177 | msgstr[3] "Определения" 178 | 179 | #: inc/typologycriteriadefinition.class.php:102 180 | msgid "" 181 | "You don't have right to create a definition for this criteria. Thank to " 182 | "contact a person having this right." 183 | msgstr "" 184 | "У вас нет прав создавать определения для этого критерия. Мы будем " 185 | "благодарны, если вы свяжитесь с человеком, который имеет подобные права." 186 | 187 | #: inc/typologycriteriadefinition.class.php:566 188 | #: inc/typologycriteriadefinition.class.php:572 189 | #: inc/typologycriteriadefinition.class.php:807 190 | msgid "Less than" 191 | msgstr "Меньше чем" 192 | 193 | #: inc/typologycriteriadefinition.class.php:567 194 | #: inc/typologycriteriadefinition.class.php:573 195 | #: inc/typologycriteriadefinition.class.php:809 196 | msgid "More than" 197 | msgstr "Больше чем" 198 | -------------------------------------------------------------------------------- /locales/tr_TR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Behaviors Development Team 3 | # This file is distributed under the same license as the Behaviors - Accounts plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Xavier CAILLAUD , 2020 8 | # Kaya Zeren , 2025 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: Behaviors - Accounts plugin\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2025-10-11 12:11+0000\n" 16 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 17 | "Last-Translator: Kaya Zeren , 2025\n" 18 | "Language-Team: Turkish (Turkey) (https://app.transifex.com/infotelGLPI/teams/12374/tr_TR/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: tr_TR\n" 23 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 24 | 25 | #: src/Typology_Item.php:540 26 | msgid "Actions" 27 | msgstr "İşlemler" 28 | 29 | #: src/TypologyCriteria.php:209 30 | msgid "Add a criterion" 31 | msgstr "Ölçüt ekle" 32 | 33 | #: src/Typology_Item.php:180 34 | msgid "Add element to the typology" 35 | msgstr "Sınıflamaya bileşen ekle" 36 | 37 | #: hook.php:221 src/Typology_Item.php:604 38 | msgid "Assign a typology to this material" 39 | msgstr "Bu malzemeye bir sınıflama ata" 40 | 41 | #: src/Typology_Item.php:988 42 | msgid "Comparison" 43 | msgstr "Karşılaştırma" 44 | 45 | #: src/TypologyCriteria.php:254 46 | msgid "Criteria's list" 47 | msgstr "Ölçütün listesi" 48 | 49 | #: src/TypologyCriteriaDefinition.php:66 50 | msgid "Definition" 51 | msgid_plural "Definitions" 52 | msgstr[0] "Tanımlama" 53 | msgstr[1] "Tanımlamalar" 54 | 55 | #: hook.php:222 56 | msgid "Delete the typology of this material" 57 | msgstr "Bu malzemenin sınıflamasını sil" 58 | 59 | #: report/typologyreport/typologyreport.php:235 60 | #: report/typologyreport/typologyreport.php:237 61 | msgid "Detail (workstation concerned)" 62 | msgstr "Ayrıntı (ilgili iş istasyonu)" 63 | 64 | #: src/Typology_Item.php:989 src/TypologyCriteria.php:277 65 | msgid "Detail of the assigned typology" 66 | msgstr "Atanan sınıflamanın ayrıntıları" 67 | 68 | #: src/Typology_Item.php:990 69 | msgid "Detail of the encountered configuration" 70 | msgstr "Karşılaşılan yapılandırmanın ayrıntısı" 71 | 72 | #: src/Typology_Item.php:73 73 | msgid "Element" 74 | msgid_plural "Elements" 75 | msgstr[0] "Bileşen" 76 | msgstr[1] "Bileşenler" 77 | 78 | #: front/typology.form.php:101 src/Typology_Item.php:1122 79 | #: src/Typology_Item.php:1138 80 | msgid "Element not match with rules for assigning a typology" 81 | msgstr "Bileşen, atanan sınıflama kurallarına uygun değil:" 82 | 83 | #: front/typology.form.php:86 84 | msgid "Element not match with the rule for assigning the typology:" 85 | msgstr "Bileşen, atanan sınıflama kuralına uygun değil:" 86 | 87 | #: src/Typology_Item.php:184 88 | msgid "Element out of the typology" 89 | msgstr "Bileşeni sınıflamadan çıkar" 90 | 91 | #: src/Typology.php:370 src/Typology.php:533 92 | #: src/NotificationTargetTypology.php:56 src/NotificationTargetTypology.php:80 93 | msgid "Elements not match with the typology" 94 | msgstr "Sınıflamaya uymayan bileşenler" 95 | 96 | #: src/TypologyCriteriaDefinition.php:602 97 | #: src/TypologyCriteriaDefinition.php:608 98 | #: src/TypologyCriteriaDefinition.php:849 99 | msgid "Less than" 100 | msgstr "Şundan az" 101 | 102 | #: src/NotificationTargetTypology.php:87 103 | #: src/NotificationTargetTypology.php:127 104 | msgid "Link to the element" 105 | msgstr "Bileşen bağlantısı" 106 | 107 | #: src/NotificationTargetTypology.php:86 108 | #: src/NotificationTargetTypology.php:126 109 | msgid "Link to the typology" 110 | msgstr "Sınıflama bağlantısı" 111 | 112 | #: src/Typology_Item.php:711 src/Typology_Item.php:756 113 | msgid "Linked elements" 114 | msgstr "Bağlanmış bileşenler" 115 | 116 | #: src/Typology_Item.php:981 117 | msgid "Management console" 118 | msgstr "Yönetim" 119 | 120 | #: src/TypologyCriteriaDefinition.php:603 121 | #: src/TypologyCriteriaDefinition.php:609 122 | #: src/TypologyCriteriaDefinition.php:851 123 | msgid "More than" 124 | msgstr "Şundan çok" 125 | 126 | #: src/Typology_Item.php:754 127 | msgid "No linked element" 128 | msgstr "Bağlanmış bir bileşen yok" 129 | 130 | #: report/typologyreport/typologyreport.php:320 131 | msgid "Not responding" 132 | msgstr "Yanıt vermiyor" 133 | 134 | #: report/typologyreport/typologyreport.php:180 135 | msgid "Number" 136 | msgstr "Sayı" 137 | 138 | #: src/Typology_Item.php:997 139 | msgid "Real value" 140 | msgstr "Gerçek değer" 141 | 142 | #: hook.php:223 src/Typology.php:367 143 | msgid "Recalculate typology for the elements" 144 | msgstr "Bileşenlerin sınıflamasını yeniden hesapla" 145 | 146 | #: report/typologyreport/typologyreport.php:318 147 | msgid "Responding" 148 | msgstr "Yanıt veriyor" 149 | 150 | #: hook.php:264 report/typologyreport/typologyreport.php:250 151 | #: report/typologyreport/typologyreport.php:254 src/Typology_Item.php:538 152 | #: src/Typology_Item.php:772 153 | msgid "Responding to typology's criteria" 154 | msgstr "Sınıflama ölçütüne yanıt" 155 | 156 | #: src/RuleTypologyCollection.php:54 157 | msgid "Rules for assigning a typology to a computer" 158 | msgstr "Bir bilgisayara bir sınıflama atama kuralları" 159 | 160 | #: src/Typology_Item.php:733 161 | msgid "Select a type" 162 | msgstr "Bir tür seçin" 163 | 164 | #: report/typologyreport/typologyreport.php:39 165 | msgid "Typologies list by service with materials list" 166 | msgstr "Malzeme listesiyle, hizmete göre sınıflama listesi" 167 | 168 | #: setup.php:99 src/Profile.php:196 src/Typology.php:84 169 | msgid "Typology" 170 | msgid_plural "Typologies" 171 | msgstr[0] "Sınıflama" 172 | msgstr[1] "Sınıflamalar" 173 | 174 | #: src/Typology_Item.php:532 175 | msgid "Typology assigned to this material" 176 | msgstr "Bu malzemeye atanmış sınıflama" 177 | 178 | #: src/Typology.php:459 179 | msgid "Typology of the linked elements is updated." 180 | msgstr "Bağlantılı bileşenlerin sınıflaması güncellendi" 181 | 182 | #: hook.php:250 183 | msgid "Typology's name" 184 | msgstr "Sınıflama adı" 185 | 186 | #: src/Typology_Item.php:182 187 | msgid "Update element to the typology" 188 | msgstr "Sınıflama bileşenini güncelle" 189 | 190 | #: src/Typology_Item.php:996 191 | msgid "Waiting value" 192 | msgstr "Beklenen değer" 193 | 194 | #: src/Typology_Item.php:275 195 | msgid "" 196 | "You cannot assign this typology to this material as he has already a " 197 | "typology : " 198 | msgstr "" 199 | "Zaten bir sınıflaması olduğundan, bu sınıflamayı bu malzeme ile " 200 | "ilişkilendiremezsiniz :" 201 | 202 | #: src/TypologyCriteriaDefinition.php:127 203 | msgid "" 204 | "You don't have right to create a definition for this criteria. Thank to " 205 | "contact a person having this right." 206 | msgstr "" 207 | "Bu ölçüt için bir tanım oluşturma izniniz yok. Bu izne sahip olan bir " 208 | "kişiyle görüşün." 209 | 210 | #: report/typologyreport/typologyreport.php:296 src/Typology_Item.php:575 211 | #: src/Typology_Item.php:830 212 | msgid "for the criteria" 213 | msgstr "ölçüt için" 214 | -------------------------------------------------------------------------------- /locales/fr_FR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Behaviors Development Team 3 | # This file is distributed under the same license as the Behaviors - Accounts plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Xavier CAILLAUD , 2025 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: Behaviors - Accounts plugin\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2025-10-11 12:11+0000\n" 15 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 16 | "Last-Translator: Xavier CAILLAUD , 2025\n" 17 | "Language-Team: French (France) (https://app.transifex.com/infotelGLPI/teams/12374/fr_FR/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: fr_FR\n" 22 | "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" 23 | 24 | #: src/Typology_Item.php:540 25 | msgid "Actions" 26 | msgstr "Actions" 27 | 28 | #: src/TypologyCriteria.php:209 29 | msgid "Add a criterion" 30 | msgstr "Ajouter un critère" 31 | 32 | #: src/Typology_Item.php:180 33 | msgid "Add element to the typology" 34 | msgstr "ajout de l'élément à la typologie" 35 | 36 | #: hook.php:221 src/Typology_Item.php:604 37 | msgid "Assign a typology to this material" 38 | msgstr "Attribuer une typologie à ce matériel" 39 | 40 | #: src/Typology_Item.php:988 41 | msgid "Comparison" 42 | msgstr "Comparaison" 43 | 44 | #: src/TypologyCriteria.php:254 45 | msgid "Criteria's list" 46 | msgstr "Liste des critères" 47 | 48 | #: src/TypologyCriteriaDefinition.php:66 49 | msgid "Definition" 50 | msgid_plural "Definitions" 51 | msgstr[0] "Définition" 52 | msgstr[1] "Définitions" 53 | msgstr[2] "Définitions" 54 | 55 | #: hook.php:222 56 | msgid "Delete the typology of this material" 57 | msgstr "Supprimer la typologie du matériel" 58 | 59 | #: report/typologyreport/typologyreport.php:235 60 | #: report/typologyreport/typologyreport.php:237 61 | msgid "Detail (workstation concerned)" 62 | msgstr "Détail (Objet concerné)" 63 | 64 | #: src/Typology_Item.php:989 src/TypologyCriteria.php:277 65 | msgid "Detail of the assigned typology" 66 | msgstr "Détail de la typologie attribuée" 67 | 68 | #: src/Typology_Item.php:990 69 | msgid "Detail of the encountered configuration" 70 | msgstr "Détail de la configuration rencontrée" 71 | 72 | #: src/Typology_Item.php:73 73 | msgid "Element" 74 | msgid_plural "Elements" 75 | msgstr[0] "Elément" 76 | msgstr[1] "Eléments" 77 | msgstr[2] "Eléments" 78 | 79 | #: front/typology.form.php:101 src/Typology_Item.php:1122 80 | #: src/Typology_Item.php:1138 81 | msgid "Element not match with rules for assigning a typology" 82 | msgstr "L'élément ne verifie pas de règle d'affectation de typologie" 83 | 84 | #: front/typology.form.php:86 85 | msgid "Element not match with the rule for assigning the typology:" 86 | msgstr "L'élément ne verifie pas la règle d'affectation de la typologie :" 87 | 88 | #: src/Typology_Item.php:184 89 | msgid "Element out of the typology" 90 | msgstr "sortie de l'élément de la typologie" 91 | 92 | #: src/Typology.php:370 src/Typology.php:533 93 | #: src/NotificationTargetTypology.php:56 src/NotificationTargetTypology.php:80 94 | msgid "Elements not match with the typology" 95 | msgstr "Eléments ne verifiant pas la typologie" 96 | 97 | #: src/TypologyCriteriaDefinition.php:602 98 | #: src/TypologyCriteriaDefinition.php:608 99 | #: src/TypologyCriteriaDefinition.php:849 100 | msgid "Less than" 101 | msgstr "Moins de" 102 | 103 | #: src/NotificationTargetTypology.php:87 104 | #: src/NotificationTargetTypology.php:127 105 | msgid "Link to the element" 106 | msgstr "Lien vers l'élément" 107 | 108 | #: src/NotificationTargetTypology.php:86 109 | #: src/NotificationTargetTypology.php:126 110 | msgid "Link to the typology" 111 | msgstr "Lien vers la typologie" 112 | 113 | #: src/Typology_Item.php:711 src/Typology_Item.php:756 114 | msgid "Linked elements" 115 | msgstr "Eléments liés" 116 | 117 | #: src/Typology_Item.php:981 118 | msgid "Management console" 119 | msgstr "Console de gestion" 120 | 121 | #: src/TypologyCriteriaDefinition.php:603 122 | #: src/TypologyCriteriaDefinition.php:609 123 | #: src/TypologyCriteriaDefinition.php:851 124 | msgid "More than" 125 | msgstr "Plus de" 126 | 127 | #: src/Typology_Item.php:754 128 | msgid "No linked element" 129 | msgstr "Aucun élément lié" 130 | 131 | #: report/typologyreport/typologyreport.php:320 132 | msgid "Not responding" 133 | msgstr "Ne réponds pas" 134 | 135 | #: report/typologyreport/typologyreport.php:180 136 | msgid "Number" 137 | msgstr "Nombre" 138 | 139 | #: src/Typology_Item.php:997 140 | msgid "Real value" 141 | msgstr "Valeur réelle" 142 | 143 | #: hook.php:223 src/Typology.php:367 144 | msgid "Recalculate typology for the elements" 145 | msgstr "Recalculer la typologie sur les éléments" 146 | 147 | #: report/typologyreport/typologyreport.php:318 148 | msgid "Responding" 149 | msgstr "Réponds" 150 | 151 | #: hook.php:264 report/typologyreport/typologyreport.php:250 152 | #: report/typologyreport/typologyreport.php:254 src/Typology_Item.php:538 153 | #: src/Typology_Item.php:772 154 | msgid "Responding to typology's criteria" 155 | msgstr "Répondant aux critères de la typologie" 156 | 157 | #: src/RuleTypologyCollection.php:54 158 | msgid "Rules for assigning a typology to a computer" 159 | msgstr "Règle d'affectation des typologies" 160 | 161 | #: src/Typology_Item.php:733 162 | msgid "Select a type" 163 | msgstr "Sélectionner un type" 164 | 165 | #: report/typologyreport/typologyreport.php:39 166 | msgid "Typologies list by service with materials list" 167 | msgstr "Liste des typologies par service avec liste des matériels" 168 | 169 | #: setup.php:99 src/Profile.php:196 src/Typology.php:84 170 | msgid "Typology" 171 | msgid_plural "Typologies" 172 | msgstr[0] "Typologie" 173 | msgstr[1] "Typologies" 174 | msgstr[2] "Typologies" 175 | 176 | #: src/Typology_Item.php:532 177 | msgid "Typology assigned to this material" 178 | msgstr "Typologie attribuée à ce matériel" 179 | 180 | #: src/Typology.php:459 181 | msgid "Typology of the linked elements is updated." 182 | msgstr "La typologie des éléments liés est actualisée." 183 | 184 | #: hook.php:250 185 | msgid "Typology's name" 186 | msgstr "Nom de la typologie" 187 | 188 | #: src/Typology_Item.php:182 189 | msgid "Update element to the typology" 190 | msgstr "actualisation de l'élément à la typologie" 191 | 192 | #: src/Typology_Item.php:996 193 | msgid "Waiting value" 194 | msgstr "Valeur attendue" 195 | 196 | #: src/Typology_Item.php:275 197 | msgid "" 198 | "You cannot assign this typology to this material as he has already a " 199 | "typology : " 200 | msgstr "" 201 | "Vous ne pouvez attribuer cette typologie à ce matériel car il a déjà la " 202 | "typologie : " 203 | 204 | #: src/TypologyCriteriaDefinition.php:127 205 | msgid "" 206 | "You don't have right to create a definition for this criteria. Thank to " 207 | "contact a person having this right." 208 | msgstr "" 209 | "Vous n'avez pas les droits nécessaires pour créer une définition à ce " 210 | "critère. Merci de contacter une personne ayant ce droit." 211 | 212 | #: report/typologyreport/typologyreport.php:296 src/Typology_Item.php:575 213 | #: src/Typology_Item.php:830 214 | msgid "for the criteria" 215 | msgstr "pour le critère" 216 | -------------------------------------------------------------------------------- /locales/cs_CZ.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR Behaviors Development Team 3 | # This file is distributed under the same license as the Behaviors - Accounts plugin package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Xavier CAILLAUD , 2020 8 | # David Stepan , 2025 9 | # 10 | #, fuzzy 11 | msgid "" 12 | msgstr "" 13 | "Project-Id-Version: Behaviors - Accounts plugin\n" 14 | "Report-Msgid-Bugs-To: \n" 15 | "POT-Creation-Date: 2025-10-11 12:11+0000\n" 16 | "PO-Revision-Date: 2020-11-02 16:29+0000\n" 17 | "Last-Translator: David Stepan , 2025\n" 18 | "Language-Team: Czech (Czech Republic) (https://app.transifex.com/infotelGLPI/teams/12374/cs_CZ/)\n" 19 | "MIME-Version: 1.0\n" 20 | "Content-Type: text/plain; charset=UTF-8\n" 21 | "Content-Transfer-Encoding: 8bit\n" 22 | "Language: cs_CZ\n" 23 | "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" 24 | 25 | #: src/Typology_Item.php:540 26 | msgid "Actions" 27 | msgstr "Akce" 28 | 29 | #: src/TypologyCriteria.php:209 30 | msgid "Add a criterion" 31 | msgstr "Přidat kritérium" 32 | 33 | #: src/Typology_Item.php:180 34 | msgid "Add element to the typology" 35 | msgstr "Přidat prvek k typologii" 36 | 37 | #: hook.php:221 src/Typology_Item.php:604 38 | msgid "Assign a typology to this material" 39 | msgstr "Přiřadit typologii k tomuto materiálu" 40 | 41 | #: src/Typology_Item.php:988 42 | msgid "Comparison" 43 | msgstr "Porovnání" 44 | 45 | #: src/TypologyCriteria.php:254 46 | msgid "Criteria's list" 47 | msgstr "Seznam kritérií" 48 | 49 | #: src/TypologyCriteriaDefinition.php:66 50 | msgid "Definition" 51 | msgid_plural "Definitions" 52 | msgstr[0] "Definice" 53 | msgstr[1] "Definice" 54 | msgstr[2] "Definic" 55 | msgstr[3] "Definice" 56 | 57 | #: hook.php:222 58 | msgid "Delete the typology of this material" 59 | msgstr "Smazat typologii tohoto materiálu" 60 | 61 | #: report/typologyreport/typologyreport.php:235 62 | #: report/typologyreport/typologyreport.php:237 63 | msgid "Detail (workstation concerned)" 64 | msgstr "Detail (dotčená pracovní stanice)" 65 | 66 | #: src/Typology_Item.php:989 src/TypologyCriteria.php:277 67 | msgid "Detail of the assigned typology" 68 | msgstr "Podrobnosti přiřazené typologie" 69 | 70 | #: src/Typology_Item.php:990 71 | msgid "Detail of the encountered configuration" 72 | msgstr "Podrobnosti zjištěného nastavení" 73 | 74 | #: src/Typology_Item.php:73 75 | msgid "Element" 76 | msgid_plural "Elements" 77 | msgstr[0] "Prvek" 78 | msgstr[1] "Prvky" 79 | msgstr[2] "Prvků" 80 | msgstr[3] "Prvky" 81 | 82 | #: front/typology.form.php:101 src/Typology_Item.php:1122 83 | #: src/Typology_Item.php:1138 84 | msgid "Element not match with rules for assigning a typology" 85 | msgstr "Prvek se neshoduje s pravidly pro přiřazení typologie" 86 | 87 | #: front/typology.form.php:86 88 | msgid "Element not match with the rule for assigning the typology:" 89 | msgstr "Prvek se neshoduje s pravidlem pro přiřazení typologie:" 90 | 91 | #: src/Typology_Item.php:184 92 | msgid "Element out of the typology" 93 | msgstr "Prvek mimo typologii" 94 | 95 | #: src/Typology.php:370 src/Typology.php:533 96 | #: src/NotificationTargetTypology.php:56 src/NotificationTargetTypology.php:80 97 | msgid "Elements not match with the typology" 98 | msgstr "Prvky se neshodují s typologií" 99 | 100 | #: src/TypologyCriteriaDefinition.php:602 101 | #: src/TypologyCriteriaDefinition.php:608 102 | #: src/TypologyCriteriaDefinition.php:849 103 | msgid "Less than" 104 | msgstr "Méně než" 105 | 106 | #: src/NotificationTargetTypology.php:87 107 | #: src/NotificationTargetTypology.php:127 108 | msgid "Link to the element" 109 | msgstr "Připojit k prvku" 110 | 111 | #: src/NotificationTargetTypology.php:86 112 | #: src/NotificationTargetTypology.php:126 113 | msgid "Link to the typology" 114 | msgstr "Připojit k typologii" 115 | 116 | #: src/Typology_Item.php:711 src/Typology_Item.php:756 117 | msgid "Linked elements" 118 | msgstr "Připojené prvky" 119 | 120 | #: src/Typology_Item.php:981 121 | msgid "Management console" 122 | msgstr "Konzole pro správu" 123 | 124 | #: src/TypologyCriteriaDefinition.php:603 125 | #: src/TypologyCriteriaDefinition.php:609 126 | #: src/TypologyCriteriaDefinition.php:851 127 | msgid "More than" 128 | msgstr "Více než" 129 | 130 | #: src/Typology_Item.php:754 131 | msgid "No linked element" 132 | msgstr "Žádný připojený prvek" 133 | 134 | #: report/typologyreport/typologyreport.php:320 135 | msgid "Not responding" 136 | msgstr "Neodpovídá" 137 | 138 | #: report/typologyreport/typologyreport.php:180 139 | msgid "Number" 140 | msgstr "Počet" 141 | 142 | #: src/Typology_Item.php:997 143 | msgid "Real value" 144 | msgstr "Skutečná hodnota" 145 | 146 | #: hook.php:223 src/Typology.php:367 147 | msgid "Recalculate typology for the elements" 148 | msgstr "Přepočítat typologii pro prvky" 149 | 150 | #: report/typologyreport/typologyreport.php:318 151 | msgid "Responding" 152 | msgstr "Odpovídá" 153 | 154 | #: hook.php:264 report/typologyreport/typologyreport.php:250 155 | #: report/typologyreport/typologyreport.php:254 src/Typology_Item.php:538 156 | #: src/Typology_Item.php:772 157 | msgid "Responding to typology's criteria" 158 | msgstr "Splňuje kritéria typologie" 159 | 160 | #: src/RuleTypologyCollection.php:54 161 | msgid "Rules for assigning a typology to a computer" 162 | msgstr "Pravidla pro přiřazení typologie k počítači" 163 | 164 | #: src/Typology_Item.php:733 165 | msgid "Select a type" 166 | msgstr "Vybrat typ" 167 | 168 | #: report/typologyreport/typologyreport.php:39 169 | msgid "Typologies list by service with materials list" 170 | msgstr "Seznam typologií podle služby se seznamem materiálů" 171 | 172 | #: setup.php:99 src/Profile.php:196 src/Typology.php:84 173 | msgid "Typology" 174 | msgid_plural "Typologies" 175 | msgstr[0] "Typologie" 176 | msgstr[1] "Typologie" 177 | msgstr[2] "Typologií" 178 | msgstr[3] "Typologie" 179 | 180 | #: src/Typology_Item.php:532 181 | msgid "Typology assigned to this material" 182 | msgstr "Typologie přiřazená tomuto materiálu" 183 | 184 | #: src/Typology.php:459 185 | msgid "Typology of the linked elements is updated." 186 | msgstr "Typologie připojených prvků byla aktualizována." 187 | 188 | #: hook.php:250 189 | msgid "Typology's name" 190 | msgstr "Název typologie" 191 | 192 | #: src/Typology_Item.php:182 193 | msgid "Update element to the typology" 194 | msgstr "Změnit prvek k typologii" 195 | 196 | #: src/Typology_Item.php:996 197 | msgid "Waiting value" 198 | msgstr "Očekávaná hodnota" 199 | 200 | #: src/Typology_Item.php:275 201 | msgid "" 202 | "You cannot assign this typology to this material as he has already a " 203 | "typology : " 204 | msgstr "" 205 | "Tomuto materiálu není možné přiřadit tuto typologii protože už má nějakou " 206 | "přiřazenou:" 207 | 208 | #: src/TypologyCriteriaDefinition.php:127 209 | msgid "" 210 | "You don't have right to create a definition for this criteria. Thank to " 211 | "contact a person having this right." 212 | msgstr "" 213 | "Nemáte oprávnění pro vytváření definice pro tato kritéria.\n" 214 | "Obraťte se na osobu která má toto oprávnění." 215 | 216 | #: report/typologyreport/typologyreport.php:296 src/Typology_Item.php:575 217 | #: src/Typology_Item.php:830 218 | msgid "for the criteria" 219 | msgstr "pro kritéria" 220 | -------------------------------------------------------------------------------- /src/Profile.php: -------------------------------------------------------------------------------- 1 | . 27 | -------------------------------------------------------------------------- 28 | */ 29 | 30 | namespace GlpiPlugin\Typology; 31 | 32 | use CommonGLPI; 33 | use DbUtils; 34 | use Html; 35 | use ProfileRight; 36 | use Session; 37 | 38 | if (!defined('GLPI_ROOT')) { 39 | die("Sorry. You can't access directly to this file"); 40 | } 41 | 42 | /** 43 | * Class Profile 44 | */ 45 | class Profile extends \Profile 46 | { 47 | 48 | static $rightname = "profile"; 49 | 50 | 51 | public static function getIcon() 52 | { 53 | return Typology::getIcon(); 54 | } 55 | 56 | /** 57 | * Get Tab Name used for itemtype 58 | * 59 | * NB : Only called for existing object 60 | * Must check right on what will be displayed + template 61 | * 62 | * @since 0.83 63 | * 64 | * @param CommonGLPI $item Item on which the tab need to be displayed 65 | * @param boolean $withtemplate is a template object ? (default 0) 66 | * 67 | * @return string tab name 68 | **/ 69 | public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) 70 | { 71 | 72 | if ($item->getType()=='Profile' 73 | && $item->getField('interface')!='helpdesk') { 74 | return self::createTabEntry(Typology::getTypeName(2)); 75 | } 76 | return ''; 77 | } 78 | 79 | /** 80 | * show Tab content 81 | * 82 | * @since 0.83 83 | * 84 | * @param CommonGLPI $item Item on which the tab need to be displayed 85 | * @param integer $tabnum tab number (default 1) 86 | * @param boolean $withtemplate is a template object ? (default 0) 87 | * 88 | * @return boolean 89 | **/ 90 | public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) 91 | { 92 | 93 | if ($item->getType()=='Profile') { 94 | $ID = $item->getID(); 95 | $prof = new self(); 96 | 97 | self::addDefaultProfileInfos( 98 | $ID, 99 | ['plugin_typology' => 0] 100 | ); 101 | $prof->showForm($ID); 102 | } 103 | return true; 104 | } 105 | 106 | /** 107 | * @param $ID 108 | */ 109 | static function createFirstAccess($ID) 110 | { 111 | //85 112 | self::addDefaultProfileInfos( 113 | $ID, 114 | ['plugin_typology' => 127], 115 | true 116 | ); 117 | } 118 | 119 | 120 | /** 121 | * @param $profile 122 | **/ 123 | static function addDefaultProfileInfos($profiles_id, $rights, $drop_existing = false) 124 | { 125 | $dbu = new DbUtils(); 126 | $profileRight = new ProfileRight(); 127 | foreach ($rights as $right => $value) { 128 | if ($dbu->countElementsInTable( 129 | 'glpi_profilerights', 130 | ["profiles_id" => $profiles_id, "name" => $right] 131 | ) && $drop_existing) { 132 | $profileRight->deleteByCriteria(['profiles_id' => $profiles_id, 'name' => $right]); 133 | } 134 | if (!$dbu->countElementsInTable( 135 | 'glpi_profilerights', 136 | ["profiles_id" => $profiles_id, "name" => $right] 137 | )) { 138 | $myright['profiles_id'] = $profiles_id; 139 | $myright['name'] = $right; 140 | $myright['rights'] = $value; 141 | $profileRight->add($myright); 142 | 143 | //Add right to the current session 144 | $_SESSION['glpiactiveprofile'][$right] = $value; 145 | } 146 | } 147 | } 148 | 149 | /** 150 | * Show profile form 151 | * 152 | * @param int $profiles_id 153 | * @param bool $openform 154 | * @param bool $closeform 155 | * @return void 156 | */ 157 | function showForm($profiles_id = 0, $openform = true, $closeform = true) 158 | { 159 | 160 | echo "
"; 161 | if (($canedit = Session::haveRightsOr(self::$rightname, [CREATE, UPDATE, PURGE])) 162 | && $openform) { 163 | $profile = new \Profile(); 164 | echo "
"; 165 | } 166 | 167 | $profile = new \Profile(); 168 | $profile->getFromDB($profiles_id); 169 | if ($profile->getField('interface') == 'central') { 170 | $rights = $this->getAllRights(); 171 | $profile->displayRightsChoiceMatrix($rights, ['canedit' => $canedit, 172 | 'default_class' => 'tab_bg_2', 173 | 'title' => __('General')]); 174 | } 175 | 176 | if ($canedit 177 | && $closeform) { 178 | echo "
"; 179 | echo Html::hidden('id', ['value' => $profiles_id]); 180 | echo Html::submit(_sx('button', 'Save'), ['name' => 'update', 'class' => 'btn btn-primary']); 181 | echo "
\n"; 182 | Html::closeForm(); 183 | } 184 | echo "
"; 185 | } 186 | 187 | /** 188 | * @param bool $all 189 | * 190 | * @return array 191 | */ 192 | static function getAllRights($all = false) 193 | { 194 | $rights = [ 195 | ['itemtype' => Typology::class, 196 | 'label' => _n('Typology', 'Typologies', 2, 'typology'), 197 | 'field' => 'plugin_typology' 198 | ], 199 | ]; 200 | 201 | return $rights; 202 | } 203 | 204 | /** 205 | * Init profiles 206 | * 207 | **/ 208 | 209 | static function translateARight($old_right) 210 | { 211 | switch ($old_right) { 212 | case '': 213 | return 0; 214 | case 'r': 215 | return READ; 216 | case 'w': 217 | return ALLSTANDARDRIGHT + READNOTE + UPDATENOTE; 218 | case '0': 219 | case '1': 220 | return $old_right; 221 | 222 | default: 223 | return 0; 224 | } 225 | } 226 | 227 | /** 228 | * @since 0.85 229 | * Migration rights from old system to the new one for one profile 230 | * @param $profiles_id 231 | */ 232 | static function migrateOneProfile($profiles_id) 233 | { 234 | global $DB; 235 | //Cannot launch migration if there's nothing to migrate... 236 | if (!$DB->tableExists('glpi_plugin_typology_profiles')) { 237 | return true; 238 | } 239 | 240 | foreach ($DB->request([ 241 | 'FROM' => 'glpi_plugin_typology_profiles', 242 | 'WHERE' => ['profiles_id' => $profiles_id] 243 | ]) as $profile_data) { 244 | $matching = ['typology' => 'plugin_typology']; 245 | $current_rights = ProfileRight::getProfileRights($profiles_id, array_values($matching)); 246 | foreach ($matching as $old => $new) { 247 | if (!isset($current_rights[$old])) { 248 | $query = "UPDATE `glpi_profilerights` 249 | SET `rights`='".self::translateARight($profile_data[$old])."' 250 | WHERE `name`='$new' AND `profiles_id`='$profiles_id'"; 251 | $DB->doQuery($query); 252 | } 253 | } 254 | } 255 | } 256 | 257 | /** 258 | * Initialize profiles, and migrate it necessary 259 | */ 260 | static function initProfile() 261 | { 262 | global $DB; 263 | $profile = new self(); 264 | $dbu = new DbUtils(); 265 | //Add new rights in glpi_profilerights table 266 | foreach ($profile->getAllRights(true) as $data) { 267 | if ($dbu->countElementsInTable( 268 | "glpi_profilerights", 269 | ["name" => $data['field']] 270 | ) == 0) { 271 | ProfileRight::addProfileRights([$data['field']]); 272 | } 273 | } 274 | 275 | //Migration old rights in new ones 276 | foreach ($DB->request([ 277 | 'SELECT' => ['id'], 278 | 'FROM' => 'glpi_profiles' 279 | ]) as $prof) { 280 | self::migrateOneProfile($prof['id']); 281 | } 282 | foreach ($DB->request([ 283 | 'SELECT' => '*', 284 | 'FROM' => 'glpi_profilerights', 285 | 'WHERE' => [ 286 | 'profiles_id' => $_SESSION['glpiactiveprofile']['id'], 287 | 'name' => ['LIKE' => '%plugin_typology%'] 288 | ] 289 | ]) as $prof) { 290 | $_SESSION['glpiactiveprofile'][$prof['name']] = $prof['rights']; 291 | } 292 | } 293 | 294 | 295 | static function removeRightsFromSession() 296 | { 297 | foreach (self::getAllRights(true) as $right) { 298 | if (isset($_SESSION['glpiactiveprofile'][$right['field']])) { 299 | unset($_SESSION['glpiactiveprofile'][$right['field']]); 300 | } 301 | } 302 | } 303 | } 304 | -------------------------------------------------------------------------------- /src/NotificationTargetTypology.php: -------------------------------------------------------------------------------- 1 | . 28 | -------------------------------------------------------------------------- 29 | */ 30 | 31 | namespace GlpiPlugin\Typology; 32 | 33 | use DbUtils; 34 | use Dropdown; 35 | use Notification; 36 | use Notification_NotificationTemplate; 37 | use NotificationTarget; 38 | use NotificationTemplate; 39 | use NotificationTemplateTranslation; 40 | use Toolbox; 41 | 42 | /** 43 | * Class NotificationTargetTypology 44 | */ 45 | class NotificationTargetTypology extends NotificationTarget 46 | { 47 | /** 48 | * Return main notification events for the object type 49 | * Internal use only => should use getAllEvents 50 | * 51 | * @return array which contains : event => event label 52 | **/ 53 | public function getEvents() 54 | { 55 | 56 | return ['AlertNotValidatedTypology' => __('Elements not match with the typology', 'typology')]; 57 | } 58 | 59 | /** 60 | * Get all data needed for template processing 61 | * Provides minimum information for alerts 62 | * Can be overridden by each NotificationTartget class if needed 63 | * 64 | * @param string $event Event name 65 | * @param array $options Options 66 | * 67 | * @return void 68 | **/ 69 | public function addDataForTemplate($event, $options = []) 70 | { 71 | global $CFG_GLPI; 72 | 73 | if ($event == 'AlertNotValidatedTypology') { 74 | $this->data['##typology.entity##'] 75 | = Dropdown::getDropdownName( 76 | 'glpi_entities', 77 | $options['entities_id'] 78 | ); 79 | $this->data['##lang.typology.entity##'] = __('Entity'); 80 | $this->data['##typology.action##'] = __('Elements not match with the typology', 'typology'); 81 | 82 | $this->data['##lang.typology.name##'] = Typology::getTypeName(1); 83 | $this->data['##lang.typology.itemtype##'] = __('Type'); 84 | $this->data['##lang.typology.items_id##'] = __('Name'); 85 | $this->data['##lang.typology.error##'] = __('Error'); 86 | $this->data['##lang.typology.url##'] = __('Link to the typology', 'typology'); 87 | $this->data['##lang.typology.itemurl##'] = __('Link to the element', 'typology'); 88 | $this->data['##lang.typology.itemuser##'] = __('User'); 89 | $this->data['##lang.typology.itemlocation##'] = __('Location'); 90 | 91 | $dbu = new DbUtils(); 92 | foreach ($options['items'] as $id => $item) { 93 | $tmp = []; 94 | 95 | $tmp['##typology.name##'] = $item['name']; 96 | $itemtype = new $item['itemtype'](); 97 | $itemtype->getFromDB($item["items_id"]); 98 | $tmp['##typology.itemtype##'] = $itemtype->getTypeName(); 99 | $tmp['##typology.items_id##'] = $itemtype->getName(); 100 | $tmp['##typology.error##'] = Typology_Item::displayErrors($item['error'], false); 101 | $tmp['##typology.url##'] = urldecode($CFG_GLPI["url_base"] . "/index.php?redirect=GlpiPlugin\Typology\Typology_" 102 | . $item['plugin_typology_typologies_id']); 103 | $tmp['##typology.itemurl##'] = urldecode($CFG_GLPI["url_base"] . "/index.php?redirect=" 104 | . Toolbox::strtolower($item['itemtype']) . "_" . $item["items_id"]); 105 | $tmp['##typology.itemuser##'] = $dbu->getUserName($itemtype->fields["users_id"]); 106 | $tmp['##typology.itemlocation##'] = Dropdown::getDropdownName( 107 | "glpi_locations", 108 | $itemtype->fields['locations_id'] 109 | ); 110 | 111 | $this->data['typologyitems'][] = $tmp; 112 | } 113 | } 114 | } 115 | 116 | /** 117 | * @return array|void 118 | */ 119 | public function getTags() 120 | { 121 | 122 | $tags = ['typology.name' => Typology::getTypeName(1), 123 | 'typology.itemtype' => __('Type'), 124 | 'typology.items_id' => __('Name'), 125 | 'typology.error' => __('Error'), 126 | 'typology.url' => __('Link to the typology', 'typology'), 127 | 'typology.itemurl' => __('Link to the element', 'typology'), 128 | 'typology.itemuser' => __('User'), 129 | 'typology.itemlocation' => __('Location')]; 130 | foreach ($tags as $tag => $label) { 131 | $this->addTagToList(['tag' => $tag,'label' => $label, 132 | 'value' => true]); 133 | } 134 | asort($this->tag_descriptions); 135 | } 136 | 137 | public static function install() 138 | { 139 | global $DB; 140 | 141 | $template = new NotificationTemplate(); 142 | $query_id = "SELECT `id` 143 | FROM `glpi_notificationtemplates` 144 | WHERE `itemtype`='GlpiPlugin\\Typology\\Typology' 145 | AND `name` = 'Alert no validated typology'"; 146 | $result = $DB->doQuery($query_id) or die($DB->error()); 147 | 148 | if ($DB->numrows($result) > 0) { 149 | $templates_id = $DB->result($result, 0, 'id'); 150 | } else { 151 | $tmp = [ 152 | 'name' => 'Alert no validated typology', 153 | 'itemtype' => Typology::class, 154 | 'date_mod' => $_SESSION['glpi_currenttime'], 155 | 'comment' => '', 156 | 'css' => '', 157 | ]; 158 | $templates_id = $template->add($tmp); 159 | } 160 | 161 | if ($templates_id) { 162 | $dbu = new DbUtils(); 163 | $translation = new NotificationTemplateTranslation(); 164 | if (!$dbu->countElementsInTable( 165 | $translation->getTable(), 166 | ["notificationtemplates_id" => $templates_id] 167 | )) { 168 | $tmp['notificationtemplates_id'] = $templates_id; 169 | $tmp['language'] = ''; 170 | $tmp['subject'] = '##typology.action## : ##typology.entity##'; 171 | $tmp['content_text'] = '##FOREACHitems## 172 | ##lang.typology.name## : ##typology.name## 173 | ##lang.typology.itemtype## : ##typology.itemtype## 174 | ##lang.typology.items_id## : ##typology.items_id## 175 | ##lang.typology.itemlocation## : ##typology.itemlocation## 176 | ##lang.typology.itemuser## : ##typology.itemuser## 177 | ##lang.typology.error## : ##typology.error## 178 | ##ENDFOREACHitems##'; 179 | $tmp['content_html'] = '<table class="tab_cadre" border="1" cellspacing="2" cellpadding="3"> 180 | <tbody> 181 | <tr> 182 | <td style="text-align: left;" bgcolor="#cccccc"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##lang.typology.name##</span></td> 183 | <td style="text-align: left;" bgcolor="#cccccc"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##lang.typology.itemtype##</span></td> 184 | <td style="text-align: left;" bgcolor="#cccccc"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##lang.typology.items_id##</span></td> 185 | <td style="text-align: left;" bgcolor="#cccccc"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##lang.typology.itemlocation##</span></td> 186 | <td style="text-align: left;" bgcolor="#cccccc"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##lang.typology.itemuser##</span></td> 187 | <td style="text-align: left;" bgcolor="#cccccc"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##lang.typology.error##</span></td> 188 | </tr> 189 | ##FOREACHtypologyitems## 190 | <tr> 191 | <td><a href="##typology.url##" target="_blank"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##typology.name##</span></a></td> 192 | <td><span style="font-family: Verdana; font-size: 11px; text-align: left;">##typology.itemtype##</span></td> 193 | <td><a href="##typology.itemurl##" target="_blank"><span style="font-family: Verdana; font-size: 11px; text-align: left;">##typology.items_id##</span></a></td> 194 | <td><span style="font-family: Verdana; font-size: 11px; text-align: left;">##typology.itemlocation##</span></td> 195 | <td><span style="font-family: Verdana; font-size: 11px; text-align: left;">##typology.itemuser##</span></td> 196 | <td><span style="font-family: Verdana; font-size: 11px; text-align: left;">##typology.error##</span></td> 197 | </tr> 198 | ##ENDFOREACHtypologyitems## 199 | </tbody> 200 | </table>'; 201 | 202 | $translation->add($tmp); 203 | } 204 | 205 | $notifs = [ 206 | 'Alert no validated typology' => 'AlertNotValidatedTypology', 207 | ]; 208 | $notification = new Notification(); 209 | $notificationtemplate = new Notification_NotificationTemplate(); 210 | $dbu = new DbUtils(); 211 | foreach ($notifs as $label => $name) { 212 | if (!$dbu->countElementsInTable( 213 | "glpi_notifications", 214 | ["itemtype" => Typology::class, 215 | "event" => $name] 216 | )) { 217 | $tmp = [ 218 | 'name' => $label, 219 | 'entities_id' => 0, 220 | 'itemtype' => Typology::class, 221 | 'event' => $name, 222 | 'comment' => '', 223 | 'is_recursive' => 1, 224 | 'is_active' => 1, 225 | 'date_mod' => $_SESSION['glpi_currenttime'], 226 | ]; 227 | $notification_id = $notification->add($tmp); 228 | 229 | $notificationtemplate->add(['notificationtemplates_id' => $templates_id, 230 | 'mode' => 'mailing', 231 | 'notifications_id' => $notification_id]); 232 | } 233 | } 234 | } 235 | } 236 | } 237 | -------------------------------------------------------------------------------- /hook.php: -------------------------------------------------------------------------------- 1 | . 28 | -------------------------------------------------------------------------- 29 | */ 30 | 31 | use GlpiPlugin\Typology\NotificationTargetTypology; 32 | use GlpiPlugin\Typology\Profile; 33 | use GlpiPlugin\Typology\RuleTypology; 34 | use GlpiPlugin\Typology\Typology; 35 | use GlpiPlugin\Typology\Typology_Item; 36 | 37 | function plugin_typology_install() 38 | { 39 | global $DB; 40 | 41 | if (!$DB->tableExists("glpi_plugin_typology_typologies")) { 42 | $update = false; 43 | // table sql creation 44 | $DB->runFile(PLUGIN_TYPOLOGY_DIR . "/sql/empty-4.0.0.sql"); 45 | 46 | // Add record notification 47 | call_user_func([NotificationTargetTypology::class, 'install']); 48 | } 49 | 50 | if ($DB->tableExists("glpi_plugin_typology_typologycriterias")) { 51 | $query = "UPDATE `glpi_plugin_typology_typologycriterias` 52 | SET `itemtype`='IPAddress' 53 | WHERE `itemtype`='NetworkPort'"; 54 | $DB->doQuery($query); 55 | 56 | $query = "UPDATE `glpi_plugin_typology_typologycriteriadefinitions` 57 | SET `field`='name;glpi_ipaddresses;itemlink' 58 | WHERE `field` LIKE '%glpi_networkports%'"; 59 | $DB->doQuery($query); 60 | } 61 | 62 | if ($DB->tableExists("glpi_plugin_typology_profiles")) { 63 | $notepad_tables = ['glpi_plugin_typology_typologies']; 64 | $dbu = new DbUtils(); 65 | foreach ($notepad_tables as $t) { 66 | // Migrate data 67 | $iterator = $DB->request([ 68 | 'SELECT' => [ 69 | 'notepad', 70 | 'id', 71 | ], 72 | 'FROM' => $t, 73 | 'WHERE' => [ 74 | 'NOT' => ['notepad' => null], 75 | 'notepad' => ['<>', ''], 76 | ], 77 | ]); 78 | if (count($iterator) > 0) { 79 | foreach ($iterator as $data) { 80 | $iq = "INSERT INTO `glpi_notepads` 81 | (`itemtype`, `items_id`, `content`, `date`, `date_mod`) 82 | VALUES ('" . $dbu->getItemTypeForTable($t) . "', '" . $data['id'] . "', 83 | '" . addslashes($data['notepad']) . "', NOW(), NOW())"; 84 | $DB->doQuery($iq, "0.85 migrate notepad data"); 85 | } 86 | } 87 | $query = "ALTER TABLE `glpi_plugin_typology_typologies` DROP COLUMN `notepad`;"; 88 | $DB->doQuery($query); 89 | } 90 | } 91 | 92 | CronTask::Register(Typology::class, 'UpdateTypology', DAY_TIMESTAMP); 93 | CronTask::Register(Typology::class, 'NotValidated', DAY_TIMESTAMP); 94 | 95 | Profile::initProfile(); 96 | Profile::createFirstAccess($_SESSION['glpiactiveprofile']['id']); 97 | $migration = new Migration("2.3.0"); 98 | $migration->dropTable('glpi_plugin_typology_profiles'); 99 | 100 | return true; 101 | } 102 | 103 | // Uninstall process for plugin : need to return true if succeeded 104 | /** 105 | * @return bool 106 | */ 107 | function plugin_typology_uninstall() 108 | { 109 | global $DB; 110 | 111 | //drop rules 112 | $Rule = new Rule(); 113 | $a_rules = $Rule->find(['sub_type' => RuleTypology::class]); 114 | foreach ($a_rules as $data) { 115 | $Rule->delete($data); 116 | } 117 | 118 | // Plugin tables deletion 119 | $tables = ["glpi_plugin_typology_typologies", 120 | "glpi_plugin_typology_typologycriterias", 121 | "glpi_plugin_typology_typologycriteriadefinitions", 122 | "glpi_plugin_typology_typologies_items"]; 123 | 124 | foreach ($tables as $table) { 125 | $DB->dropTable($table, true); 126 | } 127 | 128 | $tables_glpi = ["glpi_displaypreferences", 129 | "glpi_documents_items", 130 | "glpi_savedsearches", 131 | "glpi_notepads", 132 | "glpi_alerts", 133 | "glpi_links_itemtypes", 134 | "glpi_items_tickets", 135 | "glpi_dropdowntranslations", 136 | "glpi_impactitems"]; 137 | 138 | foreach ($tables_glpi as $table_glpi) { 139 | $DB->delete($table_glpi, ['itemtype' => Typology::class]); 140 | } 141 | 142 | 143 | $notif = new Notification(); 144 | $options = ['itemtype' => Typology::class, 145 | 'event' => 'AlertNotValidatedTypology']; 146 | foreach ($DB->request([ 147 | 'FROM' => 'glpi_notifications', 148 | 'WHERE' => $options, 149 | ]) as $data) { 150 | $notif->delete($data); 151 | } 152 | 153 | //Delete rights associated with the plugin 154 | $profileRight = new ProfileRight(); 155 | foreach (Profile::getAllRights() as $right) { 156 | $profileRight->deleteByCriteria(['name' => $right['field']]); 157 | } 158 | Typology::removeRightsFromSession(); 159 | 160 | Profile::removeRightsFromSession(); 161 | 162 | return true; 163 | } 164 | 165 | function plugin_typology_postinit() 166 | { 167 | global $PLUGIN_HOOKS; 168 | 169 | $PLUGIN_HOOKS['item_purge']['typology'] = []; 170 | $PLUGIN_HOOKS['item_add']['typology'] = []; 171 | 172 | foreach (Typology::getTypes(true) as $type) { 173 | $PLUGIN_HOOKS['item_purge']['typology'][$type] 174 | = [Typology_Item::class,'cleanItemTypology']; 175 | $PLUGIN_HOOKS['item_add']['typology'][$type] 176 | = [Typology_Item::class, 'addItem']; 177 | $PLUGIN_HOOKS['item_update']['typology'][$type] 178 | = [Typology_Item::class, 'updateItem']; 179 | CommonGLPI::registerStandardTab($type, Typology_Item::class); 180 | } 181 | } 182 | 183 | // Define dropdown relations 184 | /** 185 | * @return array 186 | */ 187 | function plugin_typology_getDatabaseRelations() 188 | { 189 | 190 | if (Plugin::isPluginActive("typology")) { 191 | return ["glpi_entities" => ["glpi_plugin_typology_typologies" => "entities_id", 192 | "glpi_plugin_typology_typologycriterias" => "entities_id", 193 | "glpi_plugin_typology_typologycriteriadefinitions" => "entities_id"], 194 | "glpi_plugin_typology_typologies" => [ 195 | "glpi_plugin_typology_typologycriterias" => "plugin_typology_typologies_id", 196 | "glpi_plugin_typology_typologies_items" => "plugin_typology_typologies_id"], 197 | "glpi_plugin_typology_typologycriterias" => [ 198 | "glpi_plugin_typology_typologycriteriadefinitions" => "plugin_typology_typologycriterias_id"]]; 199 | } else { 200 | return []; 201 | } 202 | } 203 | 204 | ////// SPECIFIC MODIF MASSIVE FUNCTIONS /////// 205 | 206 | // Define actions : 207 | /** 208 | * @param $type 209 | * 210 | * @return array 211 | */ 212 | function plugin_typology_MassiveActions($type) 213 | { 214 | 215 | if (Plugin::isPluginActive('typology')) { 216 | switch ($type) { 217 | default: 218 | // Actions from items lists 219 | if (in_array($type, Typology::getTypes(true))) { 220 | return [ 221 | 'GlpiPlugin\Typology\Typology_Item' . MassiveAction::CLASS_ACTION_SEPARATOR . 'add_item' => __('Assign a typology to this material', 'typology'), 222 | 'GlpiPlugin\Typology\Typology_Item' . MassiveAction::CLASS_ACTION_SEPARATOR . 'delete_item' => __('Delete the typology of this material', 'typology'), 223 | 'GlpiPlugin\Typology\Typology_Item' . MassiveAction::CLASS_ACTION_SEPARATOR . 'update_allitem' => __('Recalculate typology for the elements', 'typology')]; 224 | } 225 | break; 226 | } 227 | } 228 | return []; 229 | } 230 | 231 | ////// SEARCH FUNCTIONS ///////(){ 232 | 233 | // Define search option for types of the plugins 234 | /** 235 | * @param $itemtype 236 | * 237 | * @return array 238 | */ 239 | function plugin_typology_getAddSearchOptions($itemtype) 240 | { 241 | 242 | $sopt = []; 243 | 244 | if (Plugin::isPluginActive('typology') 245 | && Session::haveRight("plugin_typology", READ)) { 246 | if (in_array($itemtype, Typology::getTypes(true))) { 247 | $sopt[4650]['table'] = 'glpi_plugin_typology_typologies'; 248 | $sopt[4650]['field'] = 'name'; 249 | $sopt[4650]['name'] = Typology::getTypeName(1) . " - " 250 | . __('Typology\'s name', 'typology'); 251 | $sopt[4650]['forcegroupby'] = true; 252 | $sopt[4650]['datatype'] = 'itemlink'; 253 | $sopt[4650]['massiveaction'] = false; 254 | $sopt[4650]['itemlink_type'] = Typology::class; 255 | $sopt[4650]['joinparams'] = ['beforejoin' 256 | => ['table' => 'glpi_plugin_typology_typologies_items', 257 | 'joinparams' => ['jointype' => 'itemtype_item']]]; 258 | 259 | $sopt[4651]['table'] = 'glpi_plugin_typology_typologies_items'; 260 | $sopt[4651]['field'] = 'is_validated'; 261 | $sopt[4651]['datatype'] = 'bool'; 262 | $sopt[4651]['massiveaction'] = false; 263 | $sopt[4651]['name'] = Typology::getTypeName(1) . " - " 264 | . __('Responding to typology\'s criteria', 'typology'); 265 | $sopt[4651]['forcegroupby'] = true; 266 | $sopt[4651]['joinparams'] = ['jointype' => 'itemtype_item']; 267 | 268 | $sopt[4652]['table'] = 'glpi_plugin_typology_typologies_items'; 269 | $sopt[4652]['field'] = 'error'; 270 | $sopt[4652]['name'] = Typology::getTypeName(1) . " - " 271 | . __('Result details'); 272 | $sopt[4652]['forcegroupby'] = true; 273 | $sopt[4652]['massiveaction'] = false; 274 | $sopt[4652]['joinparams'] = ['jointype' => 'itemtype_item']; 275 | } 276 | } 277 | return $sopt; 278 | } 279 | 280 | /** 281 | * @param $type 282 | * @param $ID 283 | * @param $data 284 | * @param $num 285 | * 286 | * @return 287 | */ 288 | function plugin_typology_giveItem($type, $ID, $data, $num) 289 | { 290 | 291 | $options = Search::getOptions($type); 292 | $searchopt = & $options; 293 | $table = $searchopt[$ID]["table"]; 294 | $field = $searchopt[$ID]["field"]; 295 | 296 | switch ($type) { 297 | case 'Computer': 298 | switch ($table . '.' . $field) { 299 | 300 | case "glpi_plugin_typology_typologies_items.is_validated": 301 | if (empty($data[$num][0]['name'])) { 302 | $out = ''; 303 | } else { 304 | $validated = explode("$$", $data[$num][0]['name']); 305 | $out = Dropdown::getYesNo($validated[0]); 306 | } 307 | return $out; 308 | case "glpi_plugin_typology_typologies_items.error": 309 | $list = explode("$$", $data[$num][0]['name']); 310 | $out = Typology_Item::displayErrors($list[0]); 311 | return $out; 312 | } 313 | break; 314 | } 315 | return ""; 316 | } 317 | 318 | // Do special actions for dynamic report 319 | /** 320 | * @param $parm 321 | * 322 | * @return bool 323 | */ 324 | function plugin_typology_dynamicReport($parm) 325 | { 326 | 327 | // Return false if no specific display is done, then use standard display 328 | return false; 329 | } 330 | --------------------------------------------------------------------------------