Index: openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html 16 Feb 2005 00:21:03 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html 4 Jun 2006 00:45:25 -0000 1.7 @@ -1,4 +1,5 @@ -Admin Pages

Admin Pages

+ +Admin Pages

Admin Pages

There are at least two flavors of admin user interface:

  • Admins use same pages as all other users, except that they are offered admin links and buttons where appropriate. @@ -20,11 +21,11 @@ package.

    [$OPENACS_SERVICE_NAME admin]$ vi index.adp
     <master>
    -<property name="title">@title;noquote@</property>
    -<property name="context">@context;noquote@</property>
    +<property name="title">@title;noquote@</property>
    +<property name="context">@context;noquote@</property>
     
    -<ul class="action-links">
    -  <li><a href="@parameters_url@" title="Set parameters" class="action_link">Set parameters</a></li>
    +<ul class="action-links">
    +  <li><a href="@parameters_url@" title="Set parameters" class="action_link">Set parameters</a></li>
     </ul>
     
    [$OPENACS_SERVICE_NAME admin]$ vi index.tcl
     ad_page_contract {} {
    @@ -40,9 +41,9 @@
     
     set context [list]
     
    -set title "Administration"
    +set title "Administration"
     
    -set parameters_url [export_vars -base "/shared/parameters" {
    +set parameters_url [export_vars -base "/shared/parameters" {
       package_id { return_url [ad_return_url] }
     }]
     
    @@ -53,8 +54,8 @@
     could put a static link to the toplevel
     index.adp but that might be distracting for
     people who are not admins.  Besides, some people consider it impolite to first
    -offer a link and then display a nasty "You don't have permission to access this
    -page" message.
    +offer a link and then display a nasty "You don't have permission to access this
    +page" message.
     

    In order to display the link to the admin page only to users that have admin privileges add the following code near the top of @@ -67,14 +68,14 @@ -privilege admin -party_id [ad_conn untrusted_user_id]] if { $admin_p } { - set admin_url "admin" + set admin_url "admin" set admin_title Administration }

    In /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin/index.adp put:

     <if @admin_p@ ne nil>
    -  <a href="@admin_url@">@admin_title@</a>
    +  <a href="@admin_url@">@admin_title@</a>
     </if>
     
View comments on this page at openacs.org