jeffd
committed
on 24 Oct 02
create the autosubscribe_p column on forums_forums table
/lib/notification-widget.tcl (+41)
  1 ad_include_contract {
  2     Include for notification chunk
  3 } {
  4     {type:token}
  5     {object_id:naturalnum}
  6     {pretty_name}
  7     {url}
  8     {user_id:naturalnum ""}
  9 }
  10
  11 if {$user_id eq ""} {
  12     set user_id [ad_conn user_id]
  13 }
  14
  15 set type_id [notification::type::get_type_id -short_name $type]
  16 set request_id [notification::request::get_request_id -type_id $type_id -object_id $object_id -user_id $user_id]
  17    
  18 if {$request_id ne ""} {
  19     set icon /resources/acs-subsite/email_delete.gif
  20     set icon_alt [_ acs-subsite.icon_of_envelope]
  21     set sub_url [notification::display::unsubscribe_url -request_id $request_id -url $url]
  22     set title [_ notifications.lt_Ubsubscribe_Notification_]
  23     set sub_chunk [_ notifications.lt_You_have_requested_no]
  24 } else {
  25     set icon /resources/acs-subsite/email_add.gif
  26     set icon_alt [_ acs-subsite.icon_of_envelope]
  27     set sub_url [notification::display::subscribe_url -type $type -object_id $object_id -url $url -user_id $user_id -pretty_name $pretty_name]
  28     set title [_ notifications.lt_Request_Notification_]
  29     set sub_chunk [_ notifications.lt_You_may_a_hrefsub_url]
  30 }
  31
  32 if { [permission::permission_p -object_id $object_id -privilege admin] } {
  33     set subscribers_url [export_vars -base /notifications/subscribers -url {object_id}]
  34 }
  35
  36 # Local variables:
  37 #    mode: tcl
  38 #    tcl-indent-level: 4
  39 #    indent-tabs-mode: nil
  40 # End:
  41