Project

General

Profile

« Previous | Next » 

Revision 1044

Added by Matthias over 15 years ago

Codechanges using blocks to avoid to generate the "switch"-link right-top, if the user has no permission to edit the other one.

View differences:

index.php
32 32
$template = new Template(THEME_PATH.'/templates');
33 33
$template->set_file('page', 'groups.htt');
34 34
$template->set_block('page', 'main_block', 'main');
35
$template->set_block('main_block', 'manage_users_block', 'users');
35 36
$template->set_var('ADMIN_URL', ADMIN_URL);
36 37

  
37 38
// Get existing value from database
......
74 75

  
75 76
// Insert language headings
76 77
$template->set_var(array(
77
								'HEADING_MODIFY_DELETE_GROUP' => $HEADING['MODIFY_DELETE_GROUP'],
78
								'HEADING_ADD_GROUP' => $HEADING['ADD_GROUP']
79
								)
80
						);
78
	'HEADING_MODIFY_DELETE_GROUP' => $HEADING['MODIFY_DELETE_GROUP'],
79
	'HEADING_ADD_GROUP' => $HEADING['ADD_GROUP']
80
	)
81
);
81 82
// Insert language text and messages
82 83
$template->set_var(array(
83
								'TEXT_MODIFY' => $TEXT['MODIFY'],
84
								'TEXT_DELETE' => $TEXT['DELETE'],
85
								'TEXT_MANAGE_USERS' => $TEXT['MANAGE_USERS'],
86
								'CONFIRM_DELETE' => $MESSAGE['GROUPS']['CONFIRM_DELETE']
87
								)
88
						);
89

  
84
	'TEXT_MODIFY' => $TEXT['MODIFY'],
85
	'TEXT_DELETE' => $TEXT['DELETE'],
86
	'TEXT_MANAGE_USERS' => ( $admin->get_permission('users') == true ) ? $TEXT['MANAGE_USERS']: "",
87
	'CONFIRM_DELETE' => $MESSAGE['GROUPS']['CONFIRM_DELETE']
88
	)
89
);
90
if ( $admin->get_permission('users') == true ) $template->parse("users", "manage_users_block", true);
90 91
// Parse template object
91 92
$template->parse('main', 'main_block', false);
92 93
$template->pparse('output', 'page');

Also available in: Unified diff