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:

trunk/CHANGELOG
12 12

  
13 13
------------------------------------- 2.8.0 -------------------------------------
14 14
08-July-2009 Dietrich Roland Pehlke
15
!	admin -> users -> index.php
16
!	admin -> groups -> index.php
17
	Codechanges using blocks to avoid to generate the "switch"-link right-top,
18
	if the user has no permission to edit the other one.
19
!	wb_theme|classic_theme|argos_theme -> templates -> users.htt
20
!	wb_theme|classic_theme|argos_theme -> templates -> groups.htt
21
 	Add block-comments
15 22
!	admin -> addons -> index.php	codechanges
16 23
!	admin -> access -> index.php	codechanges
17 24
	Codechanges to get rid of the empty display(style) declaration "style='display: ;'",
trunk/wb/admin/groups/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');
trunk/wb/admin/users/index.php
31 31
$template = new Template(THEME_PATH.'/templates');
32 32
$template->set_file('page', 'users.htt');
33 33
$template->set_block('page', 'main_block', 'main');
34
$template->set_block("main_block", "manage_groups_block", "groups");
34 35
$template->set_var('ADMIN_URL', ADMIN_URL);
35 36

  
36 37
// Get existing value from database
......
73 74

  
74 75
// Insert language headings
75 76
$template->set_var(array(
76
								'HEADING_MODIFY_DELETE_USER' => $HEADING['MODIFY_DELETE_USER'],
77
								'HEADING_ADD_USER' => $HEADING['ADD_USER']
78
								)
79
						);
77
		'HEADING_MODIFY_DELETE_USER' => $HEADING['MODIFY_DELETE_USER'],
78
		'HEADING_ADD_USER' => $HEADING['ADD_USER']
79
		)
80
);
80 81
// Insert language text and messages
81 82
$template->set_var(array(
82
								'TEXT_MODIFY' => $TEXT['MODIFY'],
83
								'TEXT_DELETE' => $TEXT['DELETE'],
84
								'TEXT_MANAGE_GROUPS' => $TEXT['MANAGE_GROUPS'],
85
								'CONFIRM_DELETE' => $MESSAGE['USERS']['CONFIRM_DELETE']
86
								)
87
						);
88

  
83
		'TEXT_MODIFY' => $TEXT['MODIFY'],
84
		'TEXT_DELETE' => $TEXT['DELETE'],
85
		'TEXT_MANAGE_GROUPS' => ( $admin->get_permission('groups') == true ) ? $TEXT['MANAGE_GROUPS'] : "**",
86
		'CONFIRM_DELETE' => $MESSAGE['USERS']['CONFIRM_DELETE']
87
		)
88
);
89
if ( $admin->get_permission('groups') == true ) $template->parse("groups", "manage_groups_block", true);
89 90
// Parse template object
90 91
$template->parse('main', 'main_block', false);
91 92
$template->pparse('output', 'page');
......
165 166

  
166 167
// Insert language text and messages
167 168
$template->set_var(array(
168
								'TEXT_RESET' => $TEXT['RESET'],
169
								'TEXT_ACTIVE' => $TEXT['ACTIVE'],
170
								'TEXT_DISABLED' => $TEXT['DISABLED'],
171
								'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
172
								'TEXT_USERNAME' => $TEXT['USERNAME'],
173
								'TEXT_PASSWORD' => $TEXT['PASSWORD'],
174
								'TEXT_RETYPE_PASSWORD' => $TEXT['RETYPE_PASSWORD'],
175
								'TEXT_DISPLAY_NAME' => $TEXT['DISPLAY_NAME'],
176
								'TEXT_EMAIL' => $TEXT['EMAIL'],
177
								'TEXT_GROUP' => $TEXT['GROUP'],
178
								'TEXT_NONE' => $TEXT['NONE'],
179
								'TEXT_HOME_FOLDER' => $TEXT['HOME_FOLDER'],
180
								'USERNAME_FIELDNAME' => $username_fieldname,
181
								'CHANGING_PASSWORD' => $MESSAGE['USERS']['CHANGING_PASSWORD']
182
								)
183
						);
169
			'TEXT_RESET' => $TEXT['RESET'],
170
			'TEXT_ACTIVE' => $TEXT['ACTIVE'],
171
			'TEXT_DISABLED' => $TEXT['DISABLED'],
172
			'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
173
			'TEXT_USERNAME' => $TEXT['USERNAME'],
174
			'TEXT_PASSWORD' => $TEXT['PASSWORD'],
175
			'TEXT_RETYPE_PASSWORD' => $TEXT['RETYPE_PASSWORD'],
176
			'TEXT_DISPLAY_NAME' => $TEXT['DISPLAY_NAME'],
177
			'TEXT_EMAIL' => $TEXT['EMAIL'],
178
			'TEXT_GROUP' => $TEXT['GROUP'],
179
			'TEXT_NONE' => $TEXT['NONE'],
180
			'TEXT_HOME_FOLDER' => $TEXT['HOME_FOLDER'],
181
			'USERNAME_FIELDNAME' => $username_fieldname,
182
			'CHANGING_PASSWORD' => $MESSAGE['USERS']['CHANGING_PASSWORD']
183
			)
184
	);
184 185

  
185 186
// Parse template for add user form
186 187
$template->parse('main', 'main_block', false);
trunk/wb/templates/classic_theme/templates/users.htt
10 10
		<h2>{HEADING_MODIFY_DELETE_USER}</h2>
11 11
	</td>
12 12
	<td align="right">
13
		<!-- BEGIN manage_groups_block -->
13 14
		<a href="{ADMIN_URL}/groups/index.php">{TEXT_MANAGE_GROUPS}</a>
15
		<!-- END manage_groups_block -->
14 16
	</td>
15 17
</tr>
16 18
</table>
trunk/wb/templates/classic_theme/templates/groups.htt
10 10
		<h2>{HEADING_MODIFY_DELETE_GROUP}</h2>
11 11
	</td>
12 12
	<td align="right">
13
		<!-- BEGIN manage_users_block -->
13 14
		<a href="{ADMIN_URL}/users/index.php">{TEXT_MANAGE_USERS}</a>
15
		<!-- END manage_users_block -->
14 16
	</td>
15 17
</tr>
16 18
</table>
trunk/wb/templates/wb_theme/templates/users.htt
10 10
		<h2>{HEADING_MODIFY_DELETE_USER}</h2>
11 11
	</td>
12 12
	<td align="right">
13
		<!-- BEGIN manage_groups_block -->
13 14
		<a href="{ADMIN_URL}/groups/index.php">{TEXT_MANAGE_GROUPS}</a>
15
		<!-- END manage_groups_block -->
14 16
	</td>
15 17
</tr>
16 18
</table>
trunk/wb/templates/wb_theme/templates/groups.htt
10 10
		<h2>{HEADING_MODIFY_DELETE_GROUP}</h2>
11 11
	</td>
12 12
	<td align="right">
13
		<!-- BEGIN manage_users_block -->
13 14
		<a href="{ADMIN_URL}/users/index.php">{TEXT_MANAGE_USERS}</a>
15
		<!-- END manage_users_block -->
16
		{USER}
14 17
	</td>
15 18
</tr>
16 19
</table>
trunk/wb/templates/argos_theme/templates/users.htt
6 6
<table cellpadding="5" cellspacing="0" border="0" align="center" width="100%" style="margin-bottom:10px;">
7 7
	<tr style="background:#f0f0f0;">
8 8
		<td align="left"><h2>{HEADING_MODIFY_DELETE_USER}</h2></td>
9
		<td align="right"><a href="{ADMIN_URL}/groups/index.php">{TEXT_MANAGE_GROUPS}</a></td>
9
		<td align="right">
10
		<!-- BEGIN manage_groups_block -->
11
		<a href="{ADMIN_URL}/groups/index.php">{TEXT_MANAGE_GROUPS}</a>
12
		<!-- END manage_groups_block -->
13
		</td>
10 14
     </tr>
11 15
</table>
12 16

  
trunk/wb/templates/argos_theme/templates/groups.htt
6 6
  <table cellpadding="5" cellspacing="0" border="0" align="center" width="100%" style="margin-bottom:10px;">
7 7
	<tr style="background:#f0f0f0;">
8 8
		<td align="left"><h2>{HEADING_MODIFY_DELETE_GROUP}</h2></td>
9
		<td align="right"><a href="{ADMIN_URL}/users/index.php">{TEXT_MANAGE_USERS}</a></td>
9
		<td align="right">
10
		<!-- BEGIN manage_users_block -->
11
		<a href="{ADMIN_URL}/users/index.php">{TEXT_MANAGE_USERS}</a>
12
		<!-- END manage_users_block -->
13
		</td>
10 14
     </tr>
11 15
</table>
12 16

  

Also available in: Unified diff