_ >   1   # packages/views/lib/views-chunk.tcl
  2   #
  3   # shows views
  4   #
  5   # @author Deds Castillo (deds@i-manila.com.ph)
  6   # @creation-date 2004-08-03
  7   # @cvs-id $Id$
    1 ad_include_contract {
    2     packages/views/lib/views-chunk.tcl
8 3
< >   9   foreach required_param {package_id object_type} {
  10       if {![info exists $required_param]} {
  11           return -code error "$required_param is a required parameter."
  12       }
  13   }
    4     shows views
14 5
< >   15   foreach optional_param {filter_url} {
  16       if {![info exists $optional_param]} {
  17           set $optional_param {}
  18       }
    6     @author Deds Castillo (deds@i-manila.com.ph)
    7     @creation-date 2004-08-03
    8     @cvs-id $Id$
    9 } {
    10     package_id:naturalnum,notnull
    11     object_type:token,notnull
    12     {filter_url:localurl ""}
    13     {sortby:token "viewer_name"}
    14     viewer_id:naturalnum,optional
19 15 }
  20 16
< >   21   if {![info exists sortby]} {
  22       set sortby viewer_name
  23   }
  24  
< _   25 17 set user_id [ad_conn user_id]
  26 18 set admin_p [permission::permission_p -object_id $package_id -party_id $user_id -privilege admin]
  27 19