Update of /cvsroot/webnotes/webnotes/core
In directory usw-pr-cvs1:/tmp/cvs-serv2238/core
Modified Files:
html_api.php
Log Message:
- Changed the look of the menu.
- Customised the menu based on the access level of the logged in user.
Index: html_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- html_api.php 18 Sep 2002 12:33:31 -0000 1.6
+++ html_api.php 18 Sep 2002 13:17:40 -0000 1.7
@@ -120,16 +120,26 @@
$queue_count = note_queue_count();
- echo <<<EOT
- <div class="menu">
- <a href="$g_user_home_page">Home</a> |
- <a href="$g_admin_index_files">$s_index_files</a> |
- <a href="$g_admin_manage_notes">$s_manage_notes</a> |
- <a href="$g_admin_manage_users">$s_manage_users</a> |
- <a href="$g_admin_pending">$s_view_queue</a> [$queue_count] |
+ echo '<div class="menu">.: ';
+ echo "<a href=\"$g_user_home_page\">Home</a> :: ";
+ if ( access_check_action( ACTION_PAGES_MANAGE ) ) {
+ echo "<a href=\"$g_admin_index_files\">$s_index_files</a> :: ";
+ }
+ if ( access_check_action( ACTION_NOTES_MODERATE ) ) {
+ echo "<a href=\"$g_admin_manage_notes\">$s_manage_notes</a> :: ";
+ }
+ if ( access_check_action( ACTION_USERS_MANAGE ) ) {
+ echo "<a href=\"$g_admin_manage_users\">$s_manage_users</a> :: ";
+ }
+ if ( access_check_action( ACTION_NOTES_MODERATE ) ) {
+ echo "<a href=\"$g_admin_pending\">$s_view_queue</a> [$queue_count] :: ";
+ }
+ if ( access_check_action( ACTION_USERS_EDIT_OWN ) ) {
+ echo "<a href=\"$g_admin_change_password\">$s_change_password</a> :: ";
+ }
- <a href="$g_admin_change_password">$s_change_password</a> |
- <a href="$g_logout">$s_logout_link</a>
+echo <<<EOT
+ <a href="$g_logout">$s_logout_link</a> :.
</div>
<br />
EOT;
|