~blueyed/b2evolution/dev

« back to all changes in this revision

Viewing changes to blogs/inc/users/views/_group.form.php

  • Committer: Daniel Hahler
  • Date: 2010-10-18 17:39:43 UTC
  • mfrom: (0.1.8919)
  • Revision ID: ubuntu-launchpad@thequod.de-20101018173943-j4mnutpz73ln8dx9
Merge trunk.

Revert r8917: the "utf8-decoding" looks suspicous/irrelevant.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 * @author fplanque: Francois PLANQUE
32
32
 * @author blueyed: Daniel HAHLER
33
33
 *
34
 
 * @version $Id: _group.form.php,v 1.28 2010/05/07 08:07:14 efy-asimo Exp $
 
34
 * @version $Id: _group.form.php,v 1.29 2010/10/15 13:10:09 efy-asimo Exp $
35
35
 */
36
36
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
37
37
 
65
65
                                $perm = $permissions[$perm_name];
66
66
                                if( $perm['perm_block'] == $perm_block )
67
67
                                {
68
 
                                        if( isset( $perm['perm_type'] ) )
 
68
                                        if( ! isset( $perm['perm_type'] ) )
69
69
                                        {
70
 
                                                switch( $perm['perm_type'] )
71
 
                                                {
72
 
                                                        case 'checkbox':
73
 
                                                                $Form->checkbox_input( 'edited_grp_'.$perm_name, $GroupSettings->permission_values[$perm_name] == 'allowed', $perm['label'], array( 'input_suffix' => ' '.$perm['note'], 'value' => 'allowed' ) );
74
 
                                                        break;
75
 
 
76
 
                                                        case 'radiobox':
77
 
                                                                $Form->radio( 'edited_grp_'.$perm_name, $GroupSettings->permission_values[$perm_name], $perm['options'], $perm['label'], true );
78
 
                                                        break;
79
 
                                                }
 
70
                                                $perm['perm_type'] = 'radiobox';
80
71
                                        }
81
 
                                        else
 
72
 
 
73
                                        switch( $perm['perm_type'] )
82
74
                                        {
83
 
                                                $Form->radio( 'edited_grp_'.$perm_name, $GroupSettings->permission_values[$perm_name], $perm['options'], $perm['label'], true );
 
75
                                                case 'checkbox':
 
76
                                                        $Form->checkbox_input( 'edited_grp_'.$perm_name, $GroupSettings->permission_values[$perm_name] == 'allowed', $perm['label'], array( 'input_suffix' => ' '.$perm['note'], 'value' => 'allowed' ) );
 
77
                                                break;
 
78
 
 
79
                                                case 'radiobox':
 
80
                                                        if( ! isset( $perm['field_lines'] ) )
 
81
                                                        {
 
82
                                                                $perm['field_lines'] = true;
 
83
                                                        }
 
84
                                                        if( ! isset( $perm['field_note'] ) )
 
85
                                                        {
 
86
                                                                $perm['field_note'] = '';
 
87
                                                        }
 
88
                                                        $Form->radio( 'edited_grp_'.$perm_name, $GroupSettings->permission_values[$perm_name], $perm['options'], $perm['label'], $perm['field_lines'], $perm['field_note'] );
 
89
                                                break;
84
90
                                        }
85
91
                                }
86
92
                        }
184
190
                                                        array( 'edit', T_('Full Access'), T_('Includes deleting/reassigning of stats') )
185
191
                                                ), T_('Stats'), true );
186
192
 
187
 
        // fp> todo perm check
188
 
        $filetypes_linkstart = '<a href="?ctrl=filetypes" title="'.T_('Edit locked file types...').'">';
189
 
        $filetypes_linkend = '</a>';
190
 
        $Form->radio( 'edited_grp_perm_files', $edited_Group->get('perm_files'),
191
 
                        array(  $perm_none_option,
192
 
                                                        array( 'view', T_('View files for all allowed roots') ),
193
 
                                                        array( 'add', T_('Add/Upload files to allowed roots') ),
194
 
                                                        array( 'edit', sprintf( T_('Edit %sunlocked files'), $filetypes_linkstart.get_icon('file_allowed').$filetypes_linkend ) ),
195
 
                                                        array( 'all', sprintf( T_('Edit all files, including %slocked ones'), $filetypes_linkstart.get_icon('file_not_allowed').$filetypes_linkend ), T_('Needed for editing PHP files in skins.') ),
196
 
 
197
 
                                                ), T_('Files'), true, T_('This setting will further restrict any media file permissions on specific blogs.') );
198
 
 
199
 
 
200
193
        // Display pluggable permissions:
201
194
        display_pluggable_permissions( $Form, 'additional' );
202
195
 
204
197
 
205
198
$Form->begin_fieldset( T_('System admin permissions').get_manual_link('group_properties_system_permissions') );
206
199
 
207
 
        $Form->radio( 'edited_grp_perm_spamblacklist', $edited_Group->get('perm_spamblacklist'),
208
 
                        array(  $perm_none_option,
209
 
                                                        array( 'view', T_('View only') ),
210
 
                                                        array( 'edit', T_('Full Access') )
211
 
                                                ), T_('Antispam'), false );
212
 
 
213
 
        $Form->radio( 'edited_grp_perm_slugs', $edited_Group->get('perm_slugs'),
214
 
                        array(  $perm_none_option,
215
 
                                                        array( 'view', T_('View only') ),
216
 
                                                        array( 'edit', T_('Full Access') )
217
 
                                                ), T_('Slug manager'), false );
218
 
 
219
 
        $Form->checkbox( 'edited_grp_perm_templates', $edited_Group->get('perm_templates'), T_('Skins'), T_('Check to allow access to skin files.') );
 
200
        display_pluggable_permissions( $Form, 'core');
220
201
 
221
202
        if( $edited_Group->ID != 1 )
222
203
        {       // Groups others than #1 can be prevented from editing users
230
211
        {       // Group #1 always has user management right:
231
212
                $Form->info( T_('Users & Groups'), T_('Full Access') );
232
213
        }
233
 
        $Form->radio( 'edited_grp_perm_options', $edited_Group->get('perm_options'),
234
 
                        array(  $perm_none_option,
235
 
                                                        $perm_view_option,
236
 
                                                        $perm_edit_option
237
 
                                                ), T_('Settings') );
 
214
 
 
215
        // asimo>After perm_users will be converted to pluggable permission 'core2' can be changed to 'core' 
 
216
        display_pluggable_permissions( $Form, 'core2' );
238
217
 
239
218
        // Display pluggable permissions:
240
219
        display_pluggable_permissions( $Form, 'system' );
252
231
 
253
232
/*
254
233
 * $Log: _group.form.php,v $
 
234
 * Revision 1.29  2010/10/15 13:10:09  efy-asimo
 
235
 * Convert group permissions to pluggable permissions - part1
 
236
 *
255
237
 * Revision 1.28  2010/05/07 08:07:14  efy-asimo
256
238
 * Permissions check update (User tab, Global Settings tab) - bugfix
257
239
 *