Index: openacs-4/packages/bug-tracker/www/admin/component-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/component-delete.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/bug-tracker/www/admin/component-delete.tcl 5 Feb 2003 11:14:01 -0000 1.1 @@ -0,0 +1,11 @@ +ad_page_contract { + Delete component +} { + component_id:integer +} + +db_dml delete_component { + delete from bt_components where component_id = :component_id +} + +ad_returnredirect . \ No newline at end of file Index: openacs-4/packages/bug-tracker/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/index.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/admin/index.adp 3 May 2002 16:29:59 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/admin/index.adp 5 Feb 2003 11:14:05 -0000 1.2 @@ -4,17 +4,17 @@ - - - + - - - @@ -108,25 +111,28 @@ @components.maintainer_first_names@ @components.maintainer_last_name@ - No maintainer of this component + No maintainer + - + - +
+ + Edit - - + + Delete - +
+ @project_name@ @@ -35,14 +35,17 @@ +   + Edit  
+ Project versions @@ -53,7 +56,7 @@
+ Project permissions @@ -67,7 +70,7 @@
+ Components
+ @components.num_bugs@ bugbugs + Edit - + Delete
No componentsNo components
Create New ComponentCreate New Component
Index: openacs-4/packages/bug-tracker/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/admin/index.tcl 10 Sep 2002 22:22:28 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/admin/index.tcl 5 Feb 2003 11:14:05 -0000 1.4 @@ -31,21 +31,26 @@ set severity_codes_edit_url "severity-codes" set priority_codes_edit_url "priority-codes" -db_multirow -extend { edit_url delete_url maintainer_url } components components { +db_multirow -extend { edit_url delete_url maintainer_url view_bugs_url } components components { select c.component_id, c.component_name, c.description, c.maintainer, u.first_names as maintainer_first_names, u.last_name as maintainer_last_name, - u.email as maintainer_email + u.email as maintainer_email, + (select count(*) from bt_bugs where component_id = c.component_id) as num_bugs from bt_components c left outer join cc_users u on (u.user_id = c.maintainer) where c.project_id = :package_id - order by component_name + order by upper(component_name) } { set edit_url "component-ae?[export_vars -url { component_id }]" - set delete_url "component-delete?[export_vars -url { component_id }]" + if { $num_bugs == 0 } { + set delete_url "component-delete?[export_vars -url { component_id }]" + } else { + set view_bugs_url "../?[export_vars { { filter.component_id $component_id } }]" + } set maintainer_url [acs_community_member_url -user_id $maintainer] }