~automne-team/automne/trunk

« back to all changes in this revision

Viewing changes to automne/admin/user.php

  • Committer: sebastien
  • Date: 2011-02-24 10:18:18 UTC
  • Revision ID: sebastien.pauchet@ws-interactive.fr-20110224101818-93fzocrg4nvzkmsp
Correct empty tabs if module label does not exists

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
        unset($modules[MOD_STANDARD_CODENAME]);
280
280
        foreach ($modules as $codename => $module) {
281
281
                $label = sensitiveIO::sanitizeJSString($module->getLabel($cms_language));
282
 
                $modulesTab .= ",{
283
 
                        id:                                     'user-{$codename}-{$userId}',
284
 
                        title:                          '{$label}',
285
 
                        border:                         false,
286
 
                        xtype:                          'atmPanel',
287
 
                        autoScroll:                     true,
288
 
                        autoLoad:               {
289
 
                                url:            'user-modules-rights.php',
290
 
                                params:                 {
291
 
                                        fatherId:               userWindow.id,
292
 
                                        module:                 '{$codename}',
293
 
                                        winId:                  'user-{$codename}-{$userId}',
294
 
                                        userId:                 userWindow.userId
295
 
                                },
296
 
                                nocache:        true
297
 
                        }
298
 
                }";
 
282
                if ($label) {
 
283
                        $modulesTab .= ",{
 
284
                                id:                                     'user-{$codename}-{$userId}',
 
285
                                title:                          '{$label}',
 
286
                                border:                         false,
 
287
                                xtype:                          'atmPanel',
 
288
                                autoScroll:                     true,
 
289
                                autoLoad:               {
 
290
                                        url:            'user-modules-rights.php',
 
291
                                        params:                 {
 
292
                                                fatherId:               userWindow.id,
 
293
                                                module:                 '{$codename}',
 
294
                                                winId:                  'user-{$codename}-{$userId}',
 
295
                                                userId:                 userWindow.userId
 
296
                                        },
 
297
                                        nocache:        true
 
298
                                }
 
299
                        }";
 
300
                }
299
301
        }
300
302
        //ADMIN TAB
301
303
        $adminTab = ",{