Index: openacs-4/packages/lors/lib/course-structure.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/lib/course-structure.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lors/lib/course-structure.adp 12 Jun 2006 01:52:19 -0000 1.2
+++ openacs-4/packages/lors/lib/course-structure.adp 13 Jun 2006 02:16:23 -0000 1.3
@@ -170,3 +170,4 @@
+
\ No newline at end of file
Index: openacs-4/packages/lors/lib/course-structure.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/lib/course-structure.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/lors/lib/course-structure.tcl 12 Jun 2006 01:52:19 -0000 1.3
+++ openacs-4/packages/lors/lib/course-structure.tcl 13 Jun 2006 02:16:24 -0000 1.4
@@ -91,41 +91,61 @@
[_ lorsm.Items] |
"
+
+set pretty_types_map {as_sections Questions ::xowiki::Page Content}
+template::multirow create blah course_name delete down folder_id fs_package_id hasmetadata href identifierref indent isshared item_id item_title object_id org_id res_identifier type up
db_multirow organizations organizations { } { }
template::multirow foreach organizations {
set total_items [db_string items_count {select count(*) from ims_cp_items where org_id=:org_id} -default 0]
# We get the indent of the items in this org_id
set indent_list [lorsm::get_items_indent -org_id $org_id]
template::util::list_of_lists_to_array $indent_list indent_array
+ ns_log notice "BEFORE MULTIROW [template::multirow size blah]"
+ db_multirow blah blah "" {
+ ns_log notice "Hi There"
+ set indent [string repeat " " [expr {$indent_array($item_id)-1}]]
+ if {$type eq "webcontent" && ![string equal $identifierref {}]} {
+ set href "[apm_package_url_from_id_mem $fs_package_id]view/[db_string select_folder_key {select key from fs_folders where folder_id = :folder_id}]/[lorsm::fix_url -url $identifierref]"
+ } else {
+ set href "[lors::object_url -url admin -object_id $res_identifier]"
+ }
+ set type [string map $pretty_types_map $type]
+ set delete [export_vars -base object-delete {item_id return_url}]
+ set up [export_vars -base reorder-items {item_id {dir up} return_url}]
+ set down [export_vars -base reorder-items {item_id {dir down} return_url}]
+ ns_log notice "setting up '${up}' \n setting down '${down}'"
+ }
+ ns_log notice "AFTER MULTIROW [template::multirow size blah]"
+
append orgs_list ""
#"$org_title | $hasmetadata | "
-
set indent [expr $indent +1]
- set missing_text "[_ lorsm.Nothing_here]"
- set return_url [export_vars -base [ns_conn url] man_id]
- set table_extra_html { width="100%" }
- set table_extra_vars {return_url indent_array lorsm_p}
- set table_def {
- { title "\#lorsm.Item_Name\#" "no_sort" " |
- [set indent \"\"
- for { set i 0 } { $i < [expr $indent_array($item_id)-1]} { incr i } {
- append indent \" \"
- }
- if {$type eq \"webcontent\" && ![string equal $identifierref {}]} {set href \"$indent$item_title\"} else {set href \"$item_title\"}] | " }
- { type "\#lorsm.Type\#" "no_sort" "$type | " }
- { delete "\#acs-kernel.common_Delete\#" "no_sort" "Delete | " }
- { move_up "Move Up" "no_sort" "Move Up | " }
- { move_down "Move Down" "no_sort" "Move Down | " }
- }
+# set indent [expr $indent +1]
+# set missing_text "[_ lorsm.Nothing_here]"
+# set return_url [export_vars -base [ns_conn url] man_id]
+# set table_extra_html { width="100%" }
+# set table_extra_vars {return_url indent_array lorsm_p}
+# set table_def {
+# { title "\#lorsm.Item_Name\#" "no_sort" "
+# [set indent \"\"
+# for { set i 0 } { $i < [expr $indent_array($item_id)-1]} { incr i } {
+# append indent \" \"
+# }
+# if {$type eq \"webcontent\" && ![string equal $identifierref {}]} {set href \"$indent$item_title\"} else {set href \"$item_title\"}] | " }
+# { type "\#lorsm.Type\#" "no_sort" "$type | " }
+# { delete "\#acs-kernel.common_Delete\#" "no_sort" "Delete | " }
+# { move_up "Move Up" "no_sort" "Move Up | " }
+# { move_down "Move Down" "no_sort" "Move Down | " }
+# }
- set table_item [ad_table -Tmissing_text $missing_text -Textra_vars $table_extra_vars -Theader_row_extra "style=\"background-color: #e0e0e0; font-weight: bold;\" class=\"list-header\"" -Ttable_extra_html $table_extra_html blah { } $table_def]
+# set table_item [ad_table -Tmissing_text $missing_text -Textra_vars $table_extra_vars -Theader_row_extra "style=\"background-color: #e0e0e0; font-weight: bold;\" class=\"list-header\"" -Ttable_extra_html $table_extra_html blah { } $table_def]
- append orgs_list "$table_item"
+# append orgs_list "$table_item"
- append orgs_list "
"
+# append orgs_list ""
} if_no_rows {
append orgs_list " |
"
@@ -142,4 +162,31 @@
ad_form -name add-new -action object-new -export {man_id} -form {
{add_type:text(select) {label ""} {options $add_type_options}}
{add_new:text(submit) {label {[_ acs-kernel.common_Add]}}}
-}
\ No newline at end of file
+}
+
+ template::list::create \
+ -name blah \
+ -multirow blah \
+ -elements {
+ item_title {
+ label "\#lorsm.Item_Name\#"
+ link_url_col href
+ }
+ type {
+ label ""
+ }
+ delete {
+ label ""
+ display_template {delete}
+ }
+ up {
+ label ""
+ display_template {\#lors.Up\#}
+ }
+ down {
+ label ""
+ display_template {\#lors.Down\#}
+ }
+ }
+
+
Index: openacs-4/packages/lors/lib/course-structure.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lors/lib/course-structure.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lors/lib/course-structure.xql 12 Jun 2006 01:52:19 -0000 1.2
+++ openacs-4/packages/lors/lib/course-structure.xql 13 Jun 2006 02:16:24 -0000 1.3
@@ -106,6 +106,10 @@
SELECT
+ '' as delete,
+ '' as up,
+ '' as down,
+
o.object_id,
repeat(' ', (tree_level(o.tree_sortkey) - :indent)* 3) as indent,
i.ims_item_id as item_id,
@@ -126,7 +130,7 @@
end as identifierref,
case
when i.identifierref <> ''
- then coalesce(ot.pretty_name,r.type)
+ then r.type
else ''
end as type,
m.fs_package_id,