~automne-team/automne/trunk

« back to all changes in this revision

Viewing changes to automne/admin/group.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:
181
181
unset($modules[MOD_STANDARD_CODENAME]);
182
182
foreach ($modules as $codename => $module) {
183
183
        $modLabel = sensitiveIO::sanitizeJSString($module->getLabel($cms_language));
184
 
        $modulesTab .= ",{
185
 
                id:                                     'group-{$codename}-{$groupId}',
186
 
                title:                          '{$modLabel}',
187
 
                border:                         false,
188
 
                xtype:                          'atmPanel',
189
 
                autoScroll:                     true,
190
 
                autoLoad:               {
191
 
                        url:            'user-modules-rights.php',
192
 
                        params:                 {
193
 
                                fatherId:               groupWindow.id,
194
 
                                module:                 '{$codename}',
195
 
                                winId:                  'group-{$codename}-{$groupId}',
196
 
                                groupId:                groupWindow.groupId
197
 
                        },
198
 
                        nocache:        true
199
 
                }
200
 
        }";
 
184
        if ($modLabel) {
 
185
                $modulesTab .= ",{
 
186
                        id:                                     'group-{$codename}-{$groupId}',
 
187
                        title:                          '{$modLabel}',
 
188
                        border:                         false,
 
189
                        xtype:                          'atmPanel',
 
190
                        autoScroll:                     true,
 
191
                        autoLoad:               {
 
192
                                url:            'user-modules-rights.php',
 
193
                                params:                 {
 
194
                                        fatherId:               groupWindow.id,
 
195
                                        module:                 '{$codename}',
 
196
                                        winId:                  'group-{$codename}-{$groupId}',
 
197
                                        groupId:                groupWindow.groupId
 
198
                                },
 
199
                                nocache:        true
 
200
                        }
 
201
                }";
 
202
        }
201
203
}
202
204
//ADMIN TAB
203
205
$adminTab = ",{