Changeset 711 for trunk/Modules


Ignore:
Timestamp:
Dec 29, 2014, 12:43:16 AM (10 years ago)
Author:
chronos
Message:
  • Modified: Some FormType definition moved from global file to corresponding modules.
Location:
trunk/Modules
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Customer/Customer.php

    r710 r711  
    5454      ),
    5555    ));
     56    $this->System->FormManager->RegisterFormType('TMember', array(
     57        'Type' => 'Reference',
     58        'Table' => 'Member',
     59        'Id' => 'Id',
     60        'Name' => 'Name',
     61        'Filter' => '1',
     62    ));
    5663   
    5764  } 
  • trunk/Modules/Employee/Employee.php

    r638 r711  
    1919      'Title' => 'Zaměstnanci',
    2020      'Table' => 'Employee',
    21       'DefaultSortColumn' => 'Name',
    2221      'Items' => array(
    2322        'FirstName' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
    24         'SecondName' => array('Type' => 'String', 'Caption' => 'Přijímení', 'Default' => ''),
    25         'PeriodicSalary' => array('Type' => 'Integer', 'Caption' => 'Pravidlená mzda', 'Default' => '0', 'Suffix' => 'Kč'),
    26         'ValidFrom' => array('Type' => 'Date', 'Caption' => 'Platnost od', 'Default' => '0'),
     23        'SecondName' => array('Type' => 'String', 'Caption' => 'Příjmení', 'Default' => ''),
     24        'Salary' => array('Type' => 'Integer', 'Caption' => 'Pevná mzda', 'Default' => '0', 'Suffix' => 'Kč'),
     25        'ValidFrom' => array('Type' => 'Date', 'Caption' => 'Platnost od', 'Default' => ''),
    2726        'ValidTo' => array('Type' => 'Date', 'Caption' => 'Platnost do', 'Default' => '', 'Null' => true),
     27        'SalaryList' => array('Type' => 'TEmployeeSalaryList', 'Caption' => 'Mzda', 'Default' => ''),
    2828      ),
    2929    ));
    30     $this->System->FormManager->RegisterClass('EmployeePayment', array(
    31       'Title' => 'Výplaty zaměstnacům',
    32       'Table' => 'EmployeePayment',
     30    $this->System->FormManager->RegisterClass('EmployeeSalary', array(
     31      'Title' => 'Výplaty zaměstnanců',
     32      'Table' => 'EmployeeSalary',
    3333      'Items' => array(
    34         'Employee' => array('Type' => 'TEmployee', 'Caption' => 'Zaměstnanec', 'Default' => ''),
    35         'PeriodFrom' => array('Type' => 'Date', 'Caption' => 'Období od', 'Default' => '0'),
    36         'PeriodTo' => array('Type' => 'Date', 'Caption' => 'Období do', 'Default' => ''),
    37         'Salary' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '', 'Suffix' => 'Kč'),
    38         'DatePayment' => array('Type' => 'Date', 'Caption' => 'Datum vyplacení', 'Default' => ''),
    39         'WorkHours' => array('Type' => 'Integer', 'Caption' => 'Počet hodin', 'Default' => '0'),
    40         'PayPerHour' => array('Type' => 'Integer', 'Caption' => 'Hodinová mzda', 'Default' => '0'),
    41         'TaxAdvance' => array('Type' => 'Integer', 'Caption' => 'Záloha daně', 'Default' => '0'),
     34        'Date' => array('Type' => 'Date', 'Caption' => 'Datum', 'Default' => ''),
     35        'Employee' => array('Type' => 'TEmployee', 'Caption' => 'Zaměstnance', 'Default' => ''),
     36        'Amount' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč'),
     37        'Contract' => array('Type' => 'TContract', 'Caption' => 'Smlouva', 'Default' => ''),
    4238      ),
     39    ));         
     40        $this->System->FormManager->RegisterFormType('TEmployee', array(
     41      'Type' => 'Reference',
     42        'Table' => 'Employee',
     43        'Id' => 'Id',
     44        'Name' => 'CONCAT(FirstName, " ", SecondName)',
     45        'Filter' => '1',
     46    ));   
     47    $this->System->FormManager->RegisterFormType('TEmployeeSalaryList', array(
     48        'Type' => 'ManyToOne',
     49        'Table' => 'EmployeeSalary',
     50        'Id' => 'Id',
     51        'Ref' => 'Employee',
     52        'Filter' => '1',
    4353    ));
    44 
    4554  }
    4655}
  • trunk/Modules/Finance/Finance.php

    r710 r711  
    507507      'BeforeInsert' => array($this, 'BeforeInsertFinanceOperation'),
    508508    ));
    509     $this->System->FormManager->RegisterClass('Employee', array(
    510       'Title' => 'Zaměstnanci',
    511       'Table' => 'Employee',
    512       'Items' => array(
    513         'FirstName' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
    514         'SecondName' => array('Type' => 'String', 'Caption' => 'Příjmení', 'Default' => ''),
    515         'Salary' => array('Type' => 'Integer', 'Caption' => 'Pevná mzda', 'Default' => '0', 'Suffix' => 'Kč'),
    516         'ValidFrom' => array('Type' => 'Date', 'Caption' => 'Platnost od', 'Default' => ''),
    517         'ValidTo' => array('Type' => 'Date', 'Caption' => 'Platnost do', 'Default' => '', 'Null' => true),
    518         'SalaryList' => array('Type' => 'TEmployeeSalaryList', 'Caption' => 'Mzda', 'Default' => ''),
    519       ),
    520     ));
    521     $this->System->FormManager->RegisterClass('EmployeeSalary', array(
    522       'Title' => 'Výplaty zaměstnanců',
    523       'Table' => 'EmployeeSalary',
    524       'Items' => array(
    525         'Date' => array('Type' => 'Date', 'Caption' => 'Datum', 'Default' => ''),
    526         'Employee' => array('Type' => 'TEmployee', 'Caption' => 'Zaměstnance', 'Default' => ''),
    527         'Amount' => array('Type' => 'Integer', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč'),
    528         'Contract' => array('Type' => 'TContract', 'Caption' => 'Smlouva', 'Default' => ''),
    529       ),
    530     ));
     509    $this->System->FormManager->RegisterFormType('TFinanceVAT', array(
     510        'Type' => 'Reference',
     511        'Table' => 'FinanceVAT',
     512        'Id' => 'Id',
     513        'Name' => 'Name',
     514        'Filter' => '1',
     515    ));
     516    $this->System->FormManager->RegisterFormType('TFinanceVATType', array(
     517                'Type' => 'Reference',
     518                'Table' => 'FinanceVATType',
     519                'Id' => 'Id',
     520                'Name' => 'Name',
     521                'Filter' => '1',
     522    ));
     523   
    531524
    532525    $this->System->AddModule(new Bill($this->System));
  • trunk/Modules/IS/IS.php

    r706 r711  
    770770      ),
    771771    ));
     772    $this->System->FormManager->RegisterFormType('TMenuItem', array(
     773      'Type' => 'Reference',
     774      'Table' => 'MenuItem',
     775      'Id' => 'Id',
     776      'Name' => 'Name',
     777      'Filter' => '1',
     778    ));
     779    $this->System->FormManager->RegisterFormType('TMenu', array(
     780      'Type' => 'Reference',
     781      'Table' => 'Menu',
     782      'Id' => 'Id',
     783      'Name' => 'Name',
     784      'Filter' => '1',
     785    ));
    772786  }
    773787
  • trunk/Modules/Network/Network.php

    r679 r711  
    341341      ),
    342342    ));
     343    $this->System->FormManager->RegisterFormType('TNetworkDevice', array(
     344        'Type' => 'Reference',
     345        'Table' => 'NetworkDevice',
     346        'Id' => 'Id',
     347        'Name' => 'Name',
     348        'Filter' => '1',
     349    ));
     350    $this->System->FormManager->RegisterFormType('TNetworkDeviceType', array(
     351        'Type' => 'Reference',
     352        'Table' => 'NetworkDeviceType',
     353        'Id' => 'Id',
     354        'Name' => 'Name',
     355        'Filter' => '1',
     356    ));
     357    $this->System->FormManager->RegisterFormType('TNetworkInterface', array(
     358        'Type' => 'Reference',
     359        'Table' => 'NetworkInterface',
     360        'View' => '(SELECT NetworkInterface.*, CONCAT(NetworkDevice.Name, "-", NetworkInterface.Name) AS DeviceName FROM NetworkInterface '.
     361        'LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device) AS T',
     362        'Id' => 'Id',
     363        'Name' => 'DeviceName',
     364        'Filter' => '1',
     365    ));
     366    $this->System->FormManager->RegisterFormType('TNetworkInterfaceType', array(
     367        'Type' => 'Reference',
     368        'Table' => 'NetworkInterfaceType',
     369        'Id' => 'Id',
     370        'Name' => 'Name',
     371        'Filter' => '1',
     372    ));   
     373    $this->System->FormManager->RegisterFormType('TDeviceList', array(
     374      'Type' => 'ManyToOne',
     375      'Table' => 'NetworkDevice',
     376      'Id' => 'Id',
     377      'Ref' => 'Member',
     378      'Filter' => '1',
     379    ));
     380    $this->System->FormManager->RegisterFormType('TDeviceListAPI', array(
     381      'Type' => 'ManyToOne',
     382      'Table' => 'NetworkDevice',
     383      'Id' => 'Id',
     384      'Ref' => 'API',
     385      'Filter' => '1',
     386    ));
     387    $this->System->FormManager->RegisterFormType('TDeviceAPIType', array(
     388      'Type' => 'Reference',
     389        'Table' => 'DeviceAPIType',
     390        'Id' => 'Id',
     391        'Name' => 'Name',
     392        'Filter' => '1',
     393    ));   
     394    $this->System->FormManager->RegisterFormType('TNetworkInterfaceWirelessListInterface', array(
     395      'Type' => 'ManyToOne',
     396      'Table' => 'NetworkInterfaceWireless',
     397      'Id' => 'Id',
     398      'Ref' => 'NetworkInterface',
     399      'Filter' => '1',
     400    ));
     401    $this->System->FormManager->RegisterFormType('TInterfaceList', array(
     402      'Type' => 'ManyToOne',
     403      'Table' => 'NetworkInterface',
     404      'Id' => 'Id',
     405      'Ref' => 'Device',
     406      'Filter' => '1',
     407    ));
    343408  }
    344409
  • trunk/Modules/News/News.php

    r660 r711  
    6666      ),
    6767    ));
     68    $this->System->FormManager->RegisterFormType('TNewsCategory', array(
     69        'Type' => 'Reference',
     70        'Table' => 'NewsCategory',
     71        'Id' => 'Id',
     72        'Name' => 'Caption',
     73        'Filter' => '1',
     74    ));
     75    $this->System->FormManager->RegisterFormType('TNewsList', array(
     76        'Type' => 'ManyToOne',
     77        'Table' => 'News',
     78        'Id' => 'Id',
     79        'Ref' => 'Category',
     80        'Filter' => '1',
     81    ));
     82   
    6883    if($this->System->ModuleManager->ModulePresent('Search'))
    6984    {
  • trunk/Modules/Stock/Stock.php

    r710 r711  
    115115      'Filter' => '1',
    116116    ));
     117    $this->System->FormManager->RegisterFormType('TProduct', array(
     118      'Type' => 'Reference',
     119      'Table' => 'Product',
     120      'Id' => 'Id',
     121      'Name' => 'Name',
     122      'Filter' => '1',
     123    ));
     124    $this->System->FormManager->RegisterFormType('TStock', array(
     125      'Type' => 'Reference',
     126      'Table' => 'Stock',
     127      'Id' => 'Id',
     128      'Name' => 'Name',
     129      'Filter' => '1',
     130    ));
     131    $this->System->FormManager->RegisterFormType('TStockSerialNumber', array(
     132      'Type' => 'Reference',
     133      'Table' => 'StockSerialNumber',
     134      'Id' => 'Id',
     135      'Name' => 'RegNumber',
     136      'Filter' => '1',
     137    ));
    117138  }
    118139
  • trunk/Modules/Subject/Subject.php

    r689 r711  
    100100      ),
    101101    ));
     102    $this->System->FormManager->RegisterFormType('TSubject', array(
     103      'Type' => 'Reference',
     104      'Table' => 'Subject',
     105      'Id' => 'Id',
     106      'Name' => 'Name',
     107      'Filter' => '1',
     108    ));
    102109  }
    103110}
  • trunk/Modules/System/System.php

    r623 r711  
    182182    $this->System->RegisterPage('module', 'PageModules');
    183183    $this->System->FormManager->RegisterClass('Action', array(
    184     'Title' => 'Akce',
    185     'Table' => 'Action',
    186     'Items' => array(
    187       //'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
    188       'Title' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
    189       'URL' => array('Type' => 'Hyperlink', 'Caption' => 'Odkaz', 'Default' => ''),
    190       'Icon' => array('Type' => 'TActionIcon', 'Caption' => 'Ikony', 'Default' => '', 'Null' => true),
    191       'Type' => array('Type' => 'TActionType', 'Caption' => 'Typ', 'Default' => ''),
    192       'Group' => array('Type' => 'TActionGroup', 'Caption' => 'Skupina', 'Default' => '', 'Null' => true),
    193       'PermissionOperation' => array('Type' => 'TPermissionOperation', 'Caption' => 'Operace oprávnění', 'Default' => ''),
    194       'Enable' => array('Type' => 'Boolean', 'Caption' => 'Povolení', 'Default' => ''),
    195     ),
    196   ));
    197   $this->System->FormManager->RegisterClass('ActionIcon', array(
    198     'Title' => 'Ikony akcí',
    199     'Table' => 'ActionIcon',
    200     'Items' => array(
    201       'Name' => array('Type' => 'Image', 'Caption' => 'Název souboru', 'Default' => ''),
    202       'Items' => array('Type' => 'TActionListIcon', 'Caption' => 'Položky', 'Default' => ''),
    203     ),
    204   ));
    205   $this->System->FormManager->RegisterClass('ActionGroup', array(
    206     'Title' => 'Skupiny akcí',
    207     'Table' => 'ActionGroup',
    208     'Items' => array(
    209       'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
    210       'Items' => array('Type' => 'TActionListGroup', 'Caption' => 'Položky', 'Default' => ''),
    211     ),
    212   ));
    213   $this->System->FormManager->RegisterClass('ActionType', array(
    214     'Title' => 'Typy akcí',
    215     'Table' => 'ActionType',
    216     'Items' => array(
    217       'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
    218       'Items' => array('Type' => 'TActionListType', 'Caption' => 'Položky', 'Default' => ''),
    219     ),
    220   ));
    221 
     184      'Title' => 'Akce',
     185      'Table' => 'Action',
     186      'Items' => array(
     187        //'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
     188        'Title' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
     189        'URL' => array('Type' => 'Hyperlink', 'Caption' => 'Odkaz', 'Default' => ''),
     190        'Icon' => array('Type' => 'TActionIcon', 'Caption' => 'Ikony', 'Default' => '', 'Null' => true),
     191        'Type' => array('Type' => 'TActionType', 'Caption' => 'Typ', 'Default' => ''),
     192        'Group' => array('Type' => 'TActionGroup', 'Caption' => 'Skupina', 'Default' => '', 'Null' => true),
     193        'PermissionOperation' => array('Type' => 'TPermissionOperation', 'Caption' => 'Operace oprávnění', 'Default' => ''),
     194        'Enable' => array('Type' => 'Boolean', 'Caption' => 'Povolení', 'Default' => ''),
     195      ),
     196    ));
     197    $this->System->FormManager->RegisterClass('ActionIcon', array(
     198      'Title' => 'Ikony akcí',
     199      'Table' => 'ActionIcon',
     200      'Items' => array(
     201        'Name' => array('Type' => 'Image', 'Caption' => 'Název souboru', 'Default' => ''),
     202        'Items' => array('Type' => 'TActionListIcon', 'Caption' => 'Položky', 'Default' => ''),
     203      ),
     204    ));
     205    $this->System->FormManager->RegisterClass('ActionGroup', array(
     206      'Title' => 'Skupiny akcí',
     207      'Table' => 'ActionGroup',
     208      'Items' => array(
     209        'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
     210        'Items' => array('Type' => 'TActionListGroup', 'Caption' => 'Položky', 'Default' => ''),
     211      ),
     212    ));
     213    $this->System->FormManager->RegisterClass('ActionType', array(
     214      'Title' => 'Typy akcí',
     215      'Table' => 'ActionType',
     216      'Items' => array(
     217        'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
     218        'Items' => array('Type' => 'TActionListType', 'Caption' => 'Položky', 'Default' => ''),
     219      ),
     220    ));
     221    $this->System->FormManager->RegisterClass('Module', array(
     222        'Title' => 'Moduly',
     223          'Table' => 'Module',
     224          'Items' => array(
     225                'Name' => array('Type' => 'String', 'Caption' => 'Systémové jméno', 'Default' => ''),
     226                  'Title' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),
     227          ),
     228    ));
     229    $this->System->FormManager->RegisterClass('Language', array(
     230        'Title' => 'Jazyky',
     231          'Table' => 'Language',
     232          'DefaultSortColumn' => 'Name',
     233          'Items' => array(
     234                'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     235          ),
     236    ));
     237    $this->System->FormManager->RegisterClass('UnitOfMeasure', array(
     238        'Title' => 'Měrné jednotky',
     239          'Table' => 'UnitOfMeasure',
     240          'DefaultSortColumn' => 'Name',
     241          'Items' => array(
     242                        'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     243                        'Unit' => array('Type' => 'String', 'Caption' => 'Jednotka', 'Default' => ''),
     244          ),
     245    ));
     246    $this->System->FormManager->RegisterClass('Country', array(
     247        'Title' => 'Země',
     248          'Table' => 'Country',
     249          'DefaultSortColumn' => 'Name',
     250          'Items' => array(
     251                'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     252          ),
     253    ));
     254    $this->System->FormManager->RegisterFormType('TUnitOfMeasure', array(
     255        'Type' => 'Reference',
     256        'Table' => 'UnitOfMeasure',
     257        'Id' => 'Id',
     258        'Name' => 'Name',
     259        'Filter' => '1',
     260    ));
     261    $this->System->FormManager->RegisterFormType('TLanguage', array(
     262        'Type' => 'Reference',
     263        'Table' => 'Language',
     264        'Id' => 'Id',
     265        'Name' => 'Name',
     266        'Filter' => '1',
     267    ));
     268    $this->System->FormManager->RegisterFormType('TAction', array(
     269        'Type' => 'Reference',
     270        'Table' => 'Action',
     271        'Id' => 'Id',
     272        'Name' => 'Title',
     273        'Filter' => '1',
     274    ));
     275    $this->System->FormManager->RegisterFormType('TActionIcon', array(
     276        'Type' => 'Reference',
     277        'Table' => 'ActionIcon',
     278        'Id' => 'Id',
     279        'Name' => 'Name',
     280        'Filter' => '1',
     281    ));
     282    $this->System->FormManager->RegisterFormType('TActionType', array(
     283        'Type' => 'Reference',
     284        'Table' => 'ActionType',
     285        'Id' => 'Id',
     286        'Name' => 'Name',
     287        'Filter' => '1',
     288    ));
     289    $this->System->FormManager->RegisterFormType('TActionGroup', array(
     290        'Type' => 'Reference',
     291        'Table' => 'ActionGroup',
     292        'Id' => 'Id',
     293        'Name' => 'Name',
     294        'Filter' => '1',
     295    ));   
     296    $this->System->FormManager->RegisterFormType('TModule', array(
     297        'Type' => 'Reference',
     298        'Table' => 'Module',
     299        'Id' => 'Id',
     300        'Name' => 'Name',
     301        'Filter' => '1',
     302    ));
     303   
    222304    //$this->Manager->OnModuleChange = array($this, 'ModuleChange');
    223305    //$this->LoadFromDatabase();
  • trunk/Modules/Task/Task.php

    r660 r711  
    6060      ),
    6161    ));
    62 
     62    $this->System->FormManager->RegisterFormType('TWorkListTask', array(
     63        'Type' => 'ManyToOne',
     64        'Table' => 'Work',
     65        'Id' => 'Id',
     66        'Ref' => 'Task',
     67        'Filter' => '1',
     68    ));
     69   
    6370  }
    6471}
  • trunk/Modules/User/User.php

    r703 r711  
    657657      ),
    658658    ));
    659 
     659    $this->System->FormManager->RegisterFormType('TUser', array(
     660        'Type' => 'Reference',
     661        'Table' => 'User',
     662        'Id' => 'Id',
     663        'Name' => 'Name',
     664        'Filter' => '1',
     665    ));
     666    $this->System->FormManager->RegisterFormType('TPermissionGroup', array(
     667        'Type' => 'Reference',
     668        'Table' => 'PermissionGroup',
     669        'Id' => 'Id',
     670        'Name' => 'Description',
     671        'Filter' => '1',
     672    ));
     673    $this->System->FormManager->RegisterFormType('TPermissionGroupAssignment', array(
     674        'Type' => 'Reference',
     675        'Table' => 'PermissionGroupAssignment',
     676        'Id' => 'Id',
     677        'Name' => 'Id',
     678        'Filter' => '1',
     679    ));
     680    $this->System->FormManager->RegisterFormType('TPermissionOperation', array(
     681        'Type' => 'Reference',
     682        'Table' => 'PermissionOperation',
     683        'Id' => 'Id',
     684        'Name' => 'Id',
     685        'Filter' => '1',
     686    ));
     687   
    660688  }
    661689
Note: See TracChangeset for help on using the changeset viewer.