Files
crm.twinpol.com/modules/EcmSysInfos/Menu.php
2025-05-12 15:44:39 +00:00

95 lines
4.7 KiB
PHP
Executable File

<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
global $mod_strings;
/* Ustawianie module_menu
* domyslnie pobiera tablice z elementami od 0 do 3 gdzie:
* 0 - link - gotowy link do wklejenia, tak jak bylo
* 1 - nazwa - nazwa do wyswietlenia, tak jak bylo
* 2 - ikona - nazwa ikony ktora ma byc dolaczona, tak jak bylo
* jest tu ino dwa problemy:
* - po pierwsze poniewaz musi byc podana sama nazwa obrazka
* bez rozszerzenia poniewaz kod michala sam dopisuje
* '.gif' do nazwy
* - po drugie plik musi sie znajdowac w 'themes/default/images/'
* 3 - parentTab - angielska nazwa modulu, tak jak bylo
* dodalem taki feature ze jesli nie podasz tego parametru, lub
* bedzie on bledny to bedzie sie staral dac parentTab z nazwy
* folderu w ktorym aktualnie sie plik Menu.php znajduje
* -----------------------------------------------------------------------------
* A teraz nowości:
* można ustawiać przez tabele klucz => wartosc i nastepujace klucze sa obslugiwane
* 'showName' => 'tekst do wyswietlenia', - nazwa wyswietlana na liscie
* 'icon' => 'ikona.png' - ikona pobierana z aktualnie ustawionej skroki
* aktualnie uzywana w systemie jest Sugar5 wiec
* jesli chcesz dodac nowa to wrzuc to do jej folderu
* rozmiar ustawiony jest na 16px x 16 px wiec moze
* byc ustawiona nawet wieksza
* 'link' => "index.php?module=EcmSysInfos&action=firmInfo" - link tak jak bylo poprzednio
*
* 'module' => 'modul' - modul w ktorym jest akcja
* 'action' => 'akcja' - akcja jaka ma byc wykonana
* Powyzsze dwie akcje zostana wykonane TYLKO I WYLACZNIE wtedy gdy
* NIE ZOSTANA PODANE klucze link albo 0 - z przykladu powyzej to nie zadziala
* wiec jesli powyzsze warunki sa spelnione to zostanie stworzony taki link:
* index.php?module=modul&action=akcja
*
* 'parentTab' => 'EcmSysInfos' - angielska nazwa zakladki
*
* przyklad dziala ponizej
* reasumujac - stare wpisy dziala jak dzialaly, a fajnie jak by kozystac z nowych
* bo sa czytelniejsze i troche lepiej dzialaja; p
*/
/*
$module_menu[]=Array(
'action' => 'firmInfo',
'module' => 'EcmSysInfos',
'showName' => $mod_strings['LNK_FIRM_INFO'],
'icon' => 'MoreDetail2.png',
'parentTab' => 'EcmSysInfos'
);
$module_menu[]=Array(
'action' => 'headersDocuments',
'module' => 'EcmSysInfos',
'showName' => $mod_strings['LNK_HEADERS_DOCUMENTS'],
'icon' => 'header_footer.png',
'parentTab' => 'EcmSysInfos'
);*/
$module_menu [] = Array("index.php?module=EcmSysInfos&action=firmInfo", $mod_strings['LNK_FIRM_INFO'],"EcmSysInfos","EcmSysInfos");
$module_menu [] = Array("index.php?module=EcmSysInfos&action=headersDocuments", $mod_strings['LNK_HEADERS_DOCUMENTS'],"EcmSysInfos","EcmSysInfos");
?>