Index: openacs-4/packages/calendar/www/calendar-item-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/calendar-item-types.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/calendar/www/calendar-item-types.tcl 10 Sep 2002 22:22:31 -0000 1.3 +++ openacs-4/packages/calendar/www/calendar-item-types.tcl 15 May 2007 20:14:21 -0000 1.4 @@ -17,5 +17,43 @@ set item_types [calendar::get_item_types -calendar_id $calendar_id] set context [list "Item Types"] +ad_form -name add-new-item-type -action item-type-new -has_submit 1 -form { + {calendar_id:text(hidden) + {value $calendar_id} + } + {type:text,nospell + {label "[_ calendar.New_Type]"} + {html {size 20}} + } + {btn_ok:text(submit) + {label "[_ calendar.add]"} + } +} + template::list::create \ + -name item_types \ + -multirow item_types \ + -no_data "" \ + -elements { + col1 { + label "[_ calendar.Calendar_Item_Types]:" + } + col2 { + label "" + display_template { + @item_types.col2@ + } + } + } + + multirow create item_types col1 col2 col2_url + +foreach item_type $item_types { + set item_type_id [lindex $item_type 1] + set type [lindex $item_type 0] + if {[empty_string_p $item_type_id]} { + continue + } + multirow append item_types "$type" "[_ acs-kernel.common_delete]" "item-type-delete?calendar_id=$calendar_id&item_type_id=$item_type_id" +} \ No newline at end of file