Index: openacs-4/contrib/packages/project-manager/project-manager.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/Attic/project-manager.info,v
diff -u -r1.12 -r1.12.2.1
--- openacs-4/contrib/packages/project-manager/project-manager.info 8 Oct 2003 21:37:09 -0000 1.12
+++ openacs-4/contrib/packages/project-manager/project-manager.info 5 Dec 2003 01:09:18 -0000 1.12.2.1
@@ -15,20 +15,21 @@
+
-
+
+
+
-
-
+
-
-
+
Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-table-create.sql,v
diff -u -r1.15.2.1 -r1.15.2.2
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 4 Dec 2003 21:00:13 -0000 1.15.2.1
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 5 Dec 2003 01:09:19 -0000 1.15.2.2
@@ -32,27 +32,7 @@
insert into pm_project_status (status_id, description, status_type) values
(2, 'Closed', 'c');
--- categories
-create sequence pm_project_category_seq start 5;
-
-create table pm_project_category (
- category_id integer
- constraint pm_project_category_pk
- primary key,
- description varchar(100)
-);
-
-insert into pm_project_category (category_id, description) values
-(1, 'On the market');
-insert into pm_project_category (category_id, description) values
-(2, 'Trials');
-insert into pm_project_category (category_id, description) values
-(3, 'Upcoming');
-insert into pm_project_category (category_id, description) values
-(4, 'R & D');
-
-
create table pm_projects (
project_id integer
constraint project_manager_id_fk
@@ -97,17 +77,6 @@
);
-create table pm_project_category_map (
- project_id integer
- constraint pm_project_cm_fk
- references pm_projects,
- category_id integer
- constraint pm_project_cm_fk
- references pm_project_category
-);
-
-
-
-- ROLES
create sequence pm_role_seq start 4;
Index: openacs-4/contrib/packages/project-manager/www/add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/add-edit.tcl,v
diff -u -r1.12.2.1 -r1.12.2.2
--- openacs-4/contrib/packages/project-manager/www/add-edit.tcl 4 Dec 2003 21:00:13 -0000 1.12.2.1
+++ openacs-4/contrib/packages/project-manager/www/add-edit.tcl 5 Dec 2003 01:09:19 -0000 1.12.2.2
@@ -107,10 +107,28 @@
{label "Status"}
{options {[db_list_of_lists get_status_codes { }]}}
}
-
+
}
+if {[exists_and_not_null project_id]} {
+ if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} {
+ ad_form -extend -name add_edit -form {
+ {category_ids:integer(category),multiple,optional {label "Categories"}
+ {html {size 4}} {value {$project_item_id $package_id}}
+ }
+ }
+ }
+} else {
+ if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} {
+ ad_form -extend -name add_edit -form {
+ {category_ids:integer(category),multiple,optional {label "Categories"}
+ {html {size 4}} {value {$package_id $package_id}}
+ }
+ }
+ }
+}
+
if {$use_goal_p} {
ad_form -extend -name add_edit \
-form {
@@ -151,7 +169,9 @@
set project_id [db_exec_plsql new_project_revision { *SQL* }]
project_manager::project::compute_parent_status $project_item_id
-
+
+ category::map_object -remove_old -object_id $project_item_id $category_ids
+
} -after_submit {
ad_returnredirect "one?[export_url_vars project_id]"
Index: openacs-4/contrib/packages/project-manager/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index-postgresql.xql,v
diff -u -r1.8.2.1 -r1.8.2.2
--- openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 4 Dec 2003 21:00:13 -0000 1.8.2.1
+++ openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 5 Dec 2003 01:09:19 -0000 1.8.2.2
@@ -14,12 +14,14 @@
to_char(p.planned_start_date, 'MM/DD/YY') as planned_start_date,
to_char(p.planned_end_date, 'MM/DD/YY') as planned_end_date,
p.ongoing_p,
+ c.category_id,
+ c.category_name,
p.actual_hours_completed,
p.estimated_hours_total,
to_char(p.estimated_finish_date, 'MM/DD/YY') as estimated_finish_date,
to_char(p.earliest_finish_date, 'MM/DD/YY') as earliest_finish_date,
to_char(p.latest_finish_date, 'MM/DD/YY') as latest_finish_date
- FROM pm_projectsx p, cr_items i, pm_project_status s
+ FROM pm_projectsx p LEFT JOIN (select om.category_id, om.object_id, t.name as category_name from category_object_map om, category_translations t where om.category_id = t.category_id) c ON p.item_id = c.object_id, cr_items i, pm_project_status s
WHERE p.project_id = i.live_revision and
p.parent_id = :root_folder and
s.status_id = p.status_id
Index: openacs-4/contrib/packages/project-manager/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.tcl,v
diff -u -r1.9.2.1 -r1.9.2.2
--- openacs-4/contrib/packages/project-manager/www/index.tcl 4 Dec 2003 21:00:13 -0000 1.9.2.1
+++ openacs-4/contrib/packages/project-manager/www/index.tcl 5 Dec 2003 01:09:19 -0000 1.9.2.2
@@ -17,6 +17,7 @@
} {
orderby_project:optional
status_id:optional
+ category_id:optional
} -properties {
context:onevalue
@@ -57,6 +58,12 @@
# Projects, using list-builder ---------------------------------
+
+
+set category_choices [db_list_of_lists gg "select t.name, t.category_id from category_tree_map tm, categories c, category_translations t where c.tree_id = tm.tree_id and c.category_id = t.category_id and tm.object_id = :package_id"]
+
+
+
template::list::create \
-name projects \
-multirow projects \
@@ -77,6 +84,10 @@
label "Hours completed"
display_template "@projects.actual_hours_completed@/@projects.estimated_hours_total@"
}
+ category_id {
+ label "Categories"
+ display_template "@projects.category_name@"
+ }
} \
-actions {
"Tasks" "tasks" "View list of tasks"
@@ -97,19 +108,26 @@
}
category_id {
label "Category"
- values {[db_list_of_lists get_category "select description, category_id from pm_project_category order by category_id"]}
+ values {$category_choices}
where_clause {
+ om.category_id = :category_id
}
}
} \
-orderby {
- default_value project_name,asc
+ default_value category_id,asc
project_name {
label "Project name"
orderby_desc "upper(p.title) desc"
orderby_asc "upper(p.title) asc"
default_direction asc
}
+ category_id {
+ label "Categories"
+ orderby_desc "c.category_name desc"
+ orderby_asc "c.category_name asc"
+ default_direction asc
+ }
} \
-orderby_name orderby_project \
-html {
Index: openacs-4/contrib/packages/project-manager/www/one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.adp,v
diff -u -r1.27.2.1 -r1.27.2.2
--- openacs-4/contrib/packages/project-manager/www/one.adp 4 Dec 2003 21:00:13 -0000 1.27.2.1
+++ openacs-4/contrib/packages/project-manager/www/one.adp 5 Dec 2003 01:09:19 -0000 1.27.2.2
@@ -103,6 +103,32 @@
+
+
+
+ Categories |
+
+
+
+
+
+
+
+
+
+
+
+ - @categories:item@
+
+
+
+
+ |
+
+
+ |
+
+
Add subproject
Index: openacs-4/contrib/packages/project-manager/www/one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.tcl,v
diff -u -r1.26.2.1 -r1.26.2.2
--- openacs-4/contrib/packages/project-manager/www/one.tcl 4 Dec 2003 21:00:13 -0000 1.26.2.1
+++ openacs-4/contrib/packages/project-manager/www/one.tcl 5 Dec 2003 01:09:19 -0000 1.26.2.2
@@ -29,6 +29,7 @@
{orderby_versions ""}
} -properties {
+ categories:onelist
context_bar:onevalue
project:multirow
tasks:multirow
@@ -74,6 +75,15 @@
set write_p [permission::permission_p -object_id $package_id -privilege write]
set create_p [permission::permission_p -object_id $package_id -privilege create]
+# categories
+
+
+set categories [list]
+set cat_list [category::get_mapped_categories $project_item_id]
+foreach cat $cat_list {
+ lappend categories [category::get_name $cat]
+}
+
db_1row project_query { } -column_array project
set project_root [db_exec_plsql get_root_folder { }]
Index: openacs-4/contrib/packages/project-manager/www/tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.adp,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/contrib/packages/project-manager/www/tasks.adp 4 Dec 2003 21:00:13 -0000 1.1.2.1
+++ openacs-4/contrib/packages/project-manager/www/tasks.adp 5 Dec 2003 01:09:19 -0000 1.1.2.2
@@ -3,7 +3,7 @@
@task_term@s
-@context;noquote@
+@context_bar;noquote@
Index: openacs-4/contrib/packages/project-manager/www/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/contrib/packages/project-manager/www/tasks.tcl 4 Dec 2003 21:00:13 -0000 1.1.2.1
+++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 5 Dec 2003 01:09:19 -0000 1.1.2.2
@@ -19,7 +19,7 @@
party_id:optional
} -properties {
task_term:onevalue
- context:onevalue
+ context_bar:onevalue
tasks:multirow
}
@@ -32,7 +32,7 @@
set project_term_lower [parameter::get -parameter "projectname" -default "project"]
# set up context bar
-set context [list]
+set context_bar [ad_context_bar "Tasks"]
# the unique identifier for this package
set package_id [ad_conn package_id]
Index: openacs-4/contrib/packages/project-manager/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/admin/Attic/index.adp,v
diff -u -r1.2.2.1 -r1.2.2.2
--- openacs-4/contrib/packages/project-manager/www/admin/index.adp 4 Dec 2003 21:00:14 -0000 1.2.2.1
+++ openacs-4/contrib/packages/project-manager/www/admin/index.adp 5 Dec 2003 01:09:19 -0000 1.2.2.2
@@ -37,7 +37,7 @@
- Project categories |
+ Project categories |
the categories for projects. |
Index: openacs-4/contrib/packages/project-manager/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/admin/Attic/index.tcl,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/contrib/packages/project-manager/www/admin/index.tcl 4 Dec 2003 21:00:14 -0000 1.1.2.1
+++ openacs-4/contrib/packages/project-manager/www/admin/index.tcl 5 Dec 2003 01:09:19 -0000 1.1.2.2
@@ -16,6 +16,7 @@
} -properties {
+ categories_link:onevalue
context:onevalue
projects:multirow
write_p:onevalue
@@ -42,6 +43,10 @@
set package_id [ad_conn package_id]
set user_id [ad_maybe_redirect_for_registration]
+# set up link to categories
+set categories_link "/categories/cadmin/one-object?object_id=$package_id"
+
+
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read