Index: openacs-4/packages/cms/cms.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/cms.info,v diff -u -r1.11 -r1.12 --- openacs-4/packages/cms/cms.info 6 Oct 2004 17:41:42 -0000 1.11 +++ openacs-4/packages/cms/cms.info 16 Nov 2004 22:32:42 -0000 1.12 @@ -7,843 +7,32 @@ f t - + oracle postgresql Karl Goldstein David Lutterkort + Michael Steigman A CMS implemented on top of the Content Repository. 2001-01-26 OpenACS CMS is a full featured content management system implemented on top of - the content repository which supports workflow, composite objects, dynamically created attributes, publishing to + the content repository which supports workflow, composite objects, dynamicly created attributes, publishing to the filesystem and categorization. The user interface needs a great deal of work and the package relies on acs-workflow which has been deprecated. Alternatives include etp and bcms (which is a work in progress), CMS remains the best place to look to find examples of how the content repository should be used. - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Index: openacs-4/packages/cms/todo =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/todo,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/todo 16 Nov 2004 22:32:42 -0000 1.1 @@ -0,0 +1,37 @@ +basic/cosmetic +--------- +list-ize child items (or what to do with it? shouldn't we be able to relate items that already exist?) +templates not showing up on clipboard as templates +better navigation strategy (i.e., "back" links while visiting attributes, rename, delete pages, etc.) +new icon for "clipping" items - new listbuilder checkboxes confuse UI a bit +include description in heading on folder attributes page +inheritance display should not link to "basic item" on its page and should not include the current type (related to navigation strategy) +move all item info (clip check, title, path, etc.) into an include and put in /lib (with ancestors and bookmark) +combine the index pages for templates and items into one and put in /lib? (if they can be made the same) +use page_title in master (possible?) + +fix "clear the clipboard" functionality +fix [float] link in tabs +list-ize user browser +floatclipboard_p working? + +plumbing +-------- +build up actions list for folder using allow_* vars (i.e., links? new folders?) on sitemap browser +replace [User::getID] with [auth::require_login] +root folder param? +content delivery strategy +remove custom cms permissions system [perm::require] +remove old workflow/add new workflow +fix search +utilize new cr tcl api +use ad_form where appropriate +integrate categories package +ad_page_contract for non-include pages? + +questions/ideas +--------- +create templates from within folders (in old system)? +generic error page (replace with ad_complain or just pretty up?) +better model for "clipping" items? +how do we get extlinks and other types (if any?) which do not sub-class content_revision into the system? Index: openacs-4/packages/cms/tcl/clipboard-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/clipboard-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/tcl/clipboard-procs.tcl 1 Nov 2003 08:45:38 -0000 1.3 +++ openacs-4/packages/cms/tcl/clipboard-procs.tcl 16 Nov 2004 22:32:46 -0000 1.4 @@ -82,6 +82,24 @@ } } +ad_proc -public clipboard::render_bookmark { mount_point id package_url} { + + Compile and eval a chunk of ADP for the bookmark + +} { + set img_checked "[ad_conn package_url]resources/checked.gif" + set img_unchecked "[ad_conn package_url]resources/unchecked.gif" + + set clipboardfloats_p [clipboard::floats_p] + + set code " + " + + set compiled_code [template::adp_compile -string $code] + return [template::adp_eval compiled_code] +} + ad_proc -public clipboard::get_bookmark_icon { clip mount_point item_id {row_ref row} } { Use this function as part of the multirow query to Index: openacs-4/packages/cms/tcl/perm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/perm-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/cms/tcl/perm-procs.tcl 15 Aug 2002 03:39:34 -0000 1.6 +++ openacs-4/packages/cms/tcl/perm-procs.tcl 16 Nov 2004 22:32:46 -0000 1.7 @@ -59,7 +59,7 @@ template::util::get_opts $args if { [template::util::is_nil opts(user_id)] } { - set user_id [User::getID] + set user_id [auth::require_login] } else { set user_id $opts(user_id) } Index: openacs-4/packages/cms/www/bookmark.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/bookmark.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/bookmark.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/cms/www/bookmark.adp 16 Nov 2004 22:32:47 -0000 1.2 @@ -1,7 +1,4 @@   - - - + +  + Index: openacs-4/packages/cms/www/error.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/error.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/error.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/cms/www/error.adp 16 Nov 2004 22:32:47 -0000 1.2 @@ -1,35 +1,17 @@ - - - - + +

+

Error

- - - -
- @message@ -
- -
-
+@message@ - - +

- + + Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/index.adp'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/cms/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/index.tcl 16 Aug 2002 00:20:17 -0000 1.3 +++ openacs-4/packages/cms/www/index.tcl 16 Nov 2004 22:32:47 -0000 1.4 @@ -1,9 +1,11 @@ -# Get the name for the current user +ad_page_contract { -set user_id [User::getID] + @author Michael Steigman (michael@steigman.net) + @creation-date October 2004 +} { + {module "modules/workspace/index"} +} -if { ! $user_id } { template::forward "signin" } +set user_id [auth::require_login] -set name [db_string get_name ""] - -ns_set put [ns_conn outputheaders] Pragma "No-cache" +ns_returnredirect $module \ No newline at end of file Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/loading.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/cms/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/master.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/master.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/cms/www/master.adp 16 Nov 2004 22:32:47 -0000 1.2 @@ -1,33 +1,121 @@ - - - A:link, A:visited, A:active { text-decoration: none } + - - - - @title@ - - +

- +

+ + \ No newline at end of file Index: openacs-4/packages/cms/www/master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/master.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/master.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/cms/www/master.tcl 16 Nov 2004 22:32:47 -0000 1.2 @@ -1 +1,26 @@ +set url [ad_conn url] +set package_url [ad_conn package_url] + +#default (needed?) +set section sitemap + +if {[string match *sitemap* $url]} { + set section sitemap +} elseif {[string match *templates* $url]} { + set section templates +} elseif {[string match *types* $url]} { + set section types +} elseif {[string match *search* $url]} { + set section search +} elseif {[string match *workflow* $url]} { + set section workflow +} elseif {[string match *workspace* $url]} { + set section workspace +} elseif {[string match *clipboard* $url]} { + set section clipboard +} elseif {[string match *users* $url]} { + set section users +} + + set clipboard_js "[ad_conn package_url]modules/clipboard/clipboard.js" \ No newline at end of file Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/register-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/register-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/register.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.8 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/register.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/signin.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/signin.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/signin.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/cms/www/signout.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/cms/www/table-footer.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/table-footer.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/table-footer.adp 25 Feb 2004 17:48:40 -0000 1.2 +++ openacs-4/packages/cms/www/table-footer.adp 16 Nov 2004 22:32:47 -0000 1.3 @@ -7,4 +7,4 @@ @footer;noquote@ - + \ No newline at end of file Index: openacs-4/packages/cms/www/table-header.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/table-header.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/table-header.adp 25 Feb 2004 17:48:40 -0000 1.3 +++ openacs-4/packages/cms/www/table-header.adp 16 Nov 2004 22:32:47 -0000 1.4 @@ -3,7 +3,7 @@ - @title@ + @title;noquote@ @header;noquote@   Index: openacs-4/packages/cms/www/tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/tree.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/tree.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/cms/www/tree.tcl 16 Nov 2004 22:32:47 -0000 1.2 @@ -108,6 +108,8 @@ set state [initFolderTree $user_id] } +ns_log Notice "**** state is $state" + # Extract the current folder (it may be overwritten by user_action) set current_folder [ns_queryget current_folder] @@ -181,8 +183,11 @@ set mount_point "" set control_count 0 + +ns_log Notice "**** fetchStateFolders = [fetchStateFolders $user_id state]" foreach folder [fetchStateFolders $user_id state] { - + + ns_log Notice "**** folder is $folder" set mount_point [folderAccess mount_point $folder] set name [folderAccess name $folder] set folder_id [folderAccess id $folder] Index: openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.adp 20 Apr 2001 20:51:10 -0000 1.1 +++ openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.adp 16 Nov 2004 22:32:48 -0000 1.2 @@ -1,5 +1,14 @@ + + + + + \ No newline at end of file + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.tcl 20 Apr 2001 20:51:10 -0000 1.1 +++ openacs-4/packages/cms/www/modules/clipboard/clear-clipboard.tcl 16 Nov 2004 22:32:48 -0000 1.2 @@ -1,2 +1,10 @@ +ad_page_contract { + + @author Michael Steigman (michael@steigman.net) + @creation-date October 2004 +} { + {float_p "1"} +} + #clipboard::clear_cookie #ns_returnredirect "index" \ No newline at end of file Index: openacs-4/packages/cms/www/modules/clipboard/clipboard.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/clipboard.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/clipboard/clipboard.js 12 Jun 2001 04:13:46 -0000 1.2 +++ openacs-4/packages/cms/www/modules/clipboard/clipboard.js 16 Nov 2004 22:32:48 -0000 1.3 @@ -113,11 +113,11 @@ } } - if (floatclipboard_p) { +// if (floatclipboard_p != 1) { // this last call open or refresh the floating clipboard - var clipboardWin=window.open(root_url + 'modules/clipboard/index?id=' + mnt + '&mount_point=clipboard','clipboardFrame', 'toolbar=no,dependent=yes,innerWidth=500,innerHeight=300,scrollbars=yes'); +// var clipboardWin=window.open(root_url + 'modules/clipboard/floating?id=' + mnt + '&mount_point=clipboard','clipboardFrame', 'toolbar=no,dependent=yes,innerWidth=500,innerHeight=300,scrollbars=yes'); - } +// } } Index: openacs-4/packages/cms/www/modules/clipboard/floating.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/floating.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/clipboard/floating.adp 16 Nov 2004 22:32:48 -0000 1.1 @@ -0,0 +1,147 @@ + + + + +
+Clipboard (close window) +

+ + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/templates/properties.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/properties.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/templates/properties.tcl 19 Aug 2002 04:07:50 -0000 1.3 +++ openacs-4/packages/cms/www/modules/templates/properties.tcl 16 Nov 2004 22:32:51 -0000 1.4 @@ -1,22 +1,29 @@ -request create -params { - id -datatype integer - path -datatype text - tab -datatype keyword -value revisions +ad_page_contract { + List the contents of a folder under in the template repository + Either a path or a folder ID may be passed to the page. + + @author Michael Steigman + @creation-date October 2004 +} { + { item_id:integer ""} + { path:optional "" } + { mount_point "templates"} + { template_props_tab:optional "revisions"} } if { ! [string equal $path {}] } { - set id [db_string get_id ""] + set item_id [db_string get_id ""] - if { [string equal $id {}] } { + if { [string equal $item_id {}] } { set msg "The requested folder $path does not exist." request error invalid_path $msg } } else { - if { [string equal $id {}] } { + if { [string equal $item_id {}] } { set id [db_string get_root_id ""] } @@ -28,15 +35,15 @@ set type [db_string get_type ""] if { [string equal $type content_folder] } { - template::forward index?id=$id + template::forward index?id=$item_id } -multirow create tabs label name -multirow append tabs General general -multirow append tabs History revisions -multirow append tabs {Data Sources} datasources -multirow append tabs Assets assets -multirow append tabs {Content Types} types -multirow append tabs {Content Items} items +set package_url [ad_conn package_url] -set tab_count [expr ${tabs:rowcount} * 2] +# query the content_type of the item ID so we can check for a custom info page +db_1row get_info "" -column_array info +template::util::array_to_vars info + +set item_title [db_string get_item_title ""] +set page_title "Content Template - $item_title" + Index: openacs-4/packages/cms/www/modules/templates/properties.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/properties.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/modules/templates/properties.xql 8 Jun 2001 01:44:53 -0000 1.1 +++ openacs-4/packages/cms/www/modules/templates/properties.xql 16 Nov 2004 22:32:51 -0000 1.2 @@ -4,10 +4,32 @@ - select content_type from cr_items where item_id = :id + select content_type from cr_items where item_id = :item_id + + + + select + i.content_type, i.latest_revision, r.description + from + cr_items i, cr_revisions r + where + i.item_id = :item_id + and + r.revision_id = content_item__get_best_revision(:item_id) + + + + + + + + select title from cr_revisions where revision_id = :latest_revision + + + Index: openacs-4/packages/cms/www/modules/templates/revisions-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/revisions-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/templates/revisions-oracle.xql 3 Sep 2001 05:28:28 -0000 1.3 +++ openacs-4/packages/cms/www/modules/templates/revisions-oracle.xql 16 Nov 2004 22:32:51 -0000 1.4 @@ -12,7 +12,7 @@ round(r.content_length / 1000, 2) || ' KB' as file_size, decode(NVL(p.person_id, 0), 0, '-', - substr(p.first_names, 1, 1) || substr(p.last_name, 1, 1)) modified_by, + p.first_names || ' ' || p.last_name) modified_by, nvl(j.msg, '-') msg from cr_revisions r, acs_objects o, persons p, journal_entries j Index: openacs-4/packages/cms/www/modules/templates/revisions-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/revisions-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/templates/revisions-postgresql.xql 22 Sep 2003 11:55:37 -0000 1.3 +++ openacs-4/packages/cms/www/modules/templates/revisions-postgresql.xql 16 Nov 2004 22:32:51 -0000 1.4 @@ -12,7 +12,7 @@ (round(r.content_length::numeric / 1000.0,2)::float8::text || ' KB'::text) as file_size, case when coalesce(p.person_id, 0) = 0 then '-' - else substr(p.first_names, 1, 1) || substr(p.last_name, 1, 1) end as modified_by, + else p.first_names || ' ' || p.last_name end as modified_by, coalesce(j.msg, '-') as msg from cr_revisions r, Index: openacs-4/packages/cms/www/modules/templates/revisions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/revisions.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/modules/templates/revisions.adp 20 Apr 2001 20:51:10 -0000 1.1 +++ openacs-4/packages/cms/www/modules/templates/revisions.adp 16 Nov 2004 22:32:51 -0000 1.2 @@ -1,42 +1,3 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#  Size  Modified  Author  Comment  Publish  Revert  
@revisions.revision_number@ @revisions.file_size@ @revisions.modified@ @revisions.modified_by@ @revisions.msg@   
- -
\ No newline at end of file +
Template Revisions
+

+ Index: openacs-4/packages/cms/www/modules/templates/revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/revisions.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/cms/www/modules/templates/revisions.tcl 19 Aug 2002 04:19:45 -0000 1.5 +++ openacs-4/packages/cms/www/modules/templates/revisions.tcl 16 Nov 2004 22:32:51 -0000 1.6 @@ -1,3 +1,34 @@ +template::list::create \ + -name template_revisions \ + -multirow revisions \ + -has_checkboxes \ + -key item_id \ + -elements { + revision_number { + label "\#" + } + file_size { + label "Size" + } + modified { + label "Last Modified" + } + modified_by { + label "Author" + } + msg { + label "Comment" + } + status { + label "Status" + } + publish_revert { + display_template "publish \ +   |   revert" + } + } + + # template ID is passed to included template set live_revision [db_string get_live_revision ""] @@ -8,7 +39,14 @@ set counter $revision_count -db_multirow -extend revision_number revisions get_revisions "" { - set revision_number $counter - incr counter -1 +db_multirow -extend { revision_number publish_url revert_url status publish_revert revision_total } revisions get_revisions "" { + set revision_number $counter + incr counter -1 + set edit_revision $revision_id + set revision_total $revision_count + set publish_url [export_vars -base publish { revision_id }] + set revert_url [export_vars -base edit { template_id edit_revision }] + if { $revision_id == $live_revision } { + set status "live" + } } Index: openacs-4/packages/cms/www/modules/templates/upload.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/upload.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/templates/upload.adp 12 Jun 2001 04:13:46 -0000 1.2 +++ openacs-4/packages/cms/www/modules/templates/upload.adp 16 Nov 2004 22:32:51 -0000 1.3 @@ -1,41 +1,11 @@ - + - - -Upload Template - - - - - - -
@@ -82,7 +52,3 @@
- - - - Index: openacs-4/packages/cms/www/modules/types/attributes-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/attributes-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/attributes-oracle.xql 16 Nov 2004 22:32:52 -0000 1.1 @@ -0,0 +1,41 @@ + + + + oracle8.1.6 + + + + + select + attr.attribute_id, attr.attribute_name, attr.object_type, + attr.pretty_name as attribute_name_pretty, + datatype, types.pretty_name as pretty_name, + nvl(description_key,' ') as description_key, + description, widget + from + acs_attributes attr, acs_attribute_descriptions d, + cm_attribute_widgets w, + ( select + object_type, pretty_name + from + acs_object_types + where + object_type ^= 'acs_object' + connect by + prior supertype = object_type + start with + object_type = :content_type + ) types + where + attr.object_type = types.object_type + and + attr.attribute_id = w.attribute_id(+) + and + attr.attribute_name = d.attribute_name(+) + order by + types.object_type, sort_order, attr.attribute_name + + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/attributes-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/attributes-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/attributes-postgresql.xql 16 Nov 2004 22:32:52 -0000 1.1 @@ -0,0 +1,36 @@ + + + + postgresql7.1 + + + + + select + attr.attribute_id, attr.attribute_name, attr.object_type, + attr.pretty_name as attribute_name_pretty, + datatype, types.pretty_name as pretty_name, + coalesce(description_key,' ') as description_key, + description, widget + from + acs_attributes attr left outer join cm_attribute_widgets w using (attribute_id) + left outer join acs_attribute_descriptions d using (attribute_name), + ( select + o2.object_type, o2.pretty_name + from + (select * from acs_object_types where object_type = :content_type) o1, + acs_object_types o2 + where + o2.object_type != 'acs_object' + and + o1.tree_sortkey between o2.tree_sortkey and tree_right(o2.tree_sortkey) + ) types + where + attr.object_type = types.object_type + order by + types.object_type, sort_order, attr.attribute_name + + + + + \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/attributes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/attributes.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/attributes.adp 16 Nov 2004 22:32:52 -0000 1.1 @@ -0,0 +1,5 @@ + +

Attributes
+

+ + Index: openacs-4/packages/cms/www/modules/types/attributes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/attributes.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/attributes.tcl 16 Nov 2004 22:32:52 -0000 1.1 @@ -0,0 +1,42 @@ +request create -params { + can_edit_widgets -datatype keyword -optional + content_type -datatype keyword -optional +} + +template::list::create \ + -name attribute_types \ + -multirow attribute_types \ + -has_checkboxes \ + -elements { + attribute_name_pretty { + label "Attribute Name" + } + pretty_name { + label "Object Type" + } + datatype { + label "Data Type" + } + widget { + label "Widget" + } + widget_links { + display_template "

@attribute_types.widget_links;noquote@
" + } + } + +# get all the attribute properties for this object_type +db_multirow -extend { widget_links } attribute_types get_attr_types "" { + set edit_widget_url [export_vars -base widget-register {attribute_id widget content_type }] + set unregister_widget_url [export_vars -base widget-unregister {attribute_id content_type}] + if {[string match $can_edit_widgets "t"]} { + if {[string match $object_type $content_type] && [expr ! [string match $object_type "content_revision"]]} { + if {[template::util::is_nil widget]} { + set widget_links "Register Widget" + } else { + set widget_links "\[ Edit Widget | Unregister Widget \]" + } + } + } + +} Index: openacs-4/packages/cms/www/modules/types/content-method.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/types/content-method.adp 12 Jun 2001 04:13:46 -0000 1.2 +++ openacs-4/packages/cms/www/modules/types/content-method.adp 16 Nov 2004 22:32:52 -0000 1.3 @@ -1,85 +1,13 @@ - - +
Content Methods
+

+ - -

- - - - - - - - - -
- - -
- Register Content Insertion Method:   - - -   - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- There are no content methods registered to this content type. - By default, all content methods will be available to this - content type. -
Content MethodDescriptionIs Default? 
@content_methods.label@@content_methods.description@ - YesNo - - - - [ - - Unset default - - - Set as default - - | - Unregister - ] - -   -
-
- - +

+ +Register Content Insertion Method:   + + +  + + Index: openacs-4/packages/cms/www/modules/types/content-method.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/cms/www/modules/types/content-method.tcl 20 Aug 2002 04:18:00 -0000 1.5 +++ openacs-4/packages/cms/www/modules/types/content-method.tcl 16 Nov 2004 22:32:52 -0000 1.6 @@ -11,11 +11,46 @@ set return_url "index?id=$content_type" } +template::list::create \ + -name content_methods \ + -multirow content_methods \ + -has_checkboxes \ + -no_data "There are no content methods registered to this content type. By default, all content methods will be available to this content type." \ + -elements { + content_method { + label "Content Method" + } + description { + label "Description" + } + pretty_is_default { + label "Is default?" + } + unreg_default_links { + display_template "

@content_methods.unreg_default_links;noquote@
" + } + + } # fetch the content methods registered to this content type -db_multirow content_methods get_methods "" +db_multirow -extend {pretty_is_default unreg_default_links} content_methods get_methods "" { + set content_method_unset_default_url [export_vars -base content-method-unset-default {content_type}] + set content_method_set_default_url [export_vars -base content-method-set-default {content_type content_method}] + set content_method_unregister_url [export_vars -base content-method-unregister {content_type content_method}] + set unreg_default_links "\[ " + if {[string match $is_default "t"]} { + set pretty_is_default "Yes" + append unreg_default_links "unset default" + } else { + set pretty_is_default "No" + append unreg_default_links "set as default" + } + append unreg_default_links " | unregister ]" + +} + # text_entry content method filter # don't show text entry if a text mime type is not registered to the item set has_text_mime_type [db_string check_status ""] Index: openacs-4/packages/cms/www/modules/types/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/cms/www/modules/types/index-postgresql.xql 30 Nov 2002 17:29:21 -0000 1.5 +++ openacs-4/packages/cms/www/modules/types/index-postgresql.xql 16 Nov 2004 22:32:52 -0000 1.6 @@ -76,5 +76,4 @@ - Index: openacs-4/packages/cms/www/modules/types/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/types/index.adp 22 May 2003 14:32:35 -0000 1.3 +++ openacs-4/packages/cms/www/modules/types/index.adp 16 Nov 2004 22:32:52 -0000 1.4 @@ -7,206 +7,160 @@
-

@page_title@

+

+ +@page_title;noquote@ +

+
+

- - - - - -
- - Inheritance:  - - Basic Item - - - - : - - @content_type_tree.pretty_name@ - - - - @content_type_tree.pretty_name@ - - - - - - -   - Add this content type to the clipboard. -
+ + Inheritance:   + + Basic item + + + + + @content_type_tree.pretty_name;noquote@ + + + + + @content_type_tree.pretty_name;noquote@ + + + : + + -

+ + - -
+
- Index: openacs-4/packages/cms/www/modules/types/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/www/modules/types/index.tcl 17 Sep 2002 14:08:25 -0000 1.4 +++ openacs-4/packages/cms/www/modules/types/index.tcl 16 Nov 2004 22:32:52 -0000 1.5 @@ -1,11 +1,25 @@ +# ad_page_contract { + +# @author Michael Steigman (michael@steigman.net) +# @creation-date October 2004 +# } { +# {id "content_revision"} +# {mount_pount "types"} +# {parent_id ""} +# {type_props_tab "attributes"} +# } + # query for attributes of this subclass of content_revision and display them request create request set_param id -datatype keyword -value content_revision request set_param parent_id -datatype keyword -optional request set_param mount_point -datatype keyword -value types +request set_param type_props_tab -datatype keyword -value attributes request set_param refresh_tree -datatype keyword -optional -value t +set package_url [ad_conn package_url] + # Tree hack if { [string equal $id content_revision] } { set refresh_id "" @@ -14,7 +28,7 @@ } set content_type $id -set user_id [User::getID] +set user_id [auth::require_login] set root_id [cm::modules::templates::getRootFolderID] set module_id [db_string get_module_id ""] @@ -36,11 +50,41 @@ # get all the content types that this content type inherits from db_multirow content_type_tree get_content_type "" -# get all the attribute properties for this object_type -db_multirow attribute_types get_attr_types "" +template::list::create \ + -name type_templates \ + -multirow type_templates \ + -has_checkboxes \ + -no_data "There are no templates registered to this content type." \ + -actions [list "Register marked templates to this content type" [export_vars -base register-templates {content_type}] "Register marked templates to this content type"] \ + -elements { + name { + label "Template Name" + } + path { + label "Path" + } + pretty_name { + label "Content Type" + } + use_context { + label "Context" + } + is_default { + label "Default?" + display_template "Yesset as default" + } + unreg_link { + display_template "

unregister
" + } + + } # get template information -db_multirow type_templates get_type_templates "" +db_multirow -extend {unreg_link unreg_link_url set_default_url} type_templates get_type_templates "" { + set context $use_context + set unreg_link_url [export_vars -base unregister-template {template_id context content_type}] + set set_default_url [export_vars -base set-default-template {template_id context content_type}] +} set page_title "Content Type - $object_type_pretty" @@ -57,12 +101,12 @@ } # Create the tabbed dialog -set url [ns_conn url] +set url [ad_conn url] append url "?id=$id&mount_point=$mount_point&parent_id=$parent_id&refresh_tree=f" -template::tabstrip create type_props -base_url $url -template::tabstrip add_tab type_props attributes "Attributes and Uploads" attributes -template::tabstrip add_tab type_props relations "Relation Types" relations -template::tabstrip add_tab type_props templates "Templates" templates -template::tabstrip add_tab type_props permissions "Permissions" permissions +# template::tabstrip create type_props -base_url $url +# template::tabstrip add_tab type_props attributes "Attributes and Uploads" attributes +# template::tabstrip add_tab type_props relations "Relation Types" relations +# template::tabstrip add_tab type_props templates "Templates" templates +# template::tabstrip add_tab type_props permissions "Permissions" permissions Index: openacs-4/packages/cms/www/modules/types/mime-types.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/types/mime-types.adp 12 Jun 2001 04:13:46 -0000 1.2 +++ openacs-4/packages/cms/www/modules/types/mime-types.adp 16 Nov 2004 22:32:52 -0000 1.3 @@ -1,63 +1,17 @@ -

+

Registered Mime Types
+

+ - - - - - - - - + - - -
- - -
- Register MIME type:   +

+ +Register new mime type:   -

-
-
+

- - - - - - - - - - - - - - - - - - - - -
- There are no MIME types registered to this content type. -
Registered MIME Types 
@registered_mime_types.label@ - - Unregister - -   -
- - -
- -

- - Index: openacs-4/packages/cms/www/modules/types/mime-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/www/modules/types/mime-types.tcl 17 Sep 2002 13:50:58 -0000 1.4 +++ openacs-4/packages/cms/www/modules/types/mime-types.tcl 16 Nov 2004 22:32:52 -0000 1.5 @@ -8,7 +8,7 @@ set module_id [db_string get_module_id ""] # permissions check - must have cm_examine -content::check_access $module_id cm_examine -user_id [User::getID] +content::check_access $module_id cm_examine -user_id [auth::require_login] set content_type_name [db_string get_name ""] @@ -22,7 +22,23 @@ template::forward "index?id=content_revision" } -db_multirow registered_mime_types get_reg_mime_types "" +template::list::create \ + -name mime_types \ + -multirow registered_mime_types \ + -has_checkboxes \ + -key mime_types \ + -elements { + label { + label "Mime Type" + } + unreg { + display_template "unregister" + } + } + +db_multirow -extend {unreg unreg_url} registered_mime_types get_reg_mime_types "" { + set unreg_url [export_vars -base unregister-mime-type {content_type mime_type}] +} set page_title "Register MIME types to $content_type_name" Index: openacs-4/packages/cms/www/modules/types/relation-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-register.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/www/modules/types/relation-register.tcl 20 Aug 2002 04:18:00 -0000 1.4 +++ openacs-4/packages/cms/www/modules/types/relation-register.tcl 16 Nov 2004 22:32:52 -0000 1.5 @@ -95,5 +95,5 @@ } } - template::forward "index?id=$content_type" + template::forward "index?id=$content_type&type_props_tab=relations" } Index: openacs-4/packages/cms/www/modules/types/relation-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-unregister.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/www/modules/types/relation-unregister.tcl 20 Aug 2002 04:18:00 -0000 1.4 +++ openacs-4/packages/cms/www/modules/types/relation-unregister.tcl 16 Nov 2004 22:32:52 -0000 1.5 @@ -43,4 +43,4 @@ "Could not unregister relation type - $errmsg" } -template::forward "index?id=$content_type" +template::forward "index?id=$content_type&type_props_tab=relations" Index: openacs-4/packages/cms/www/modules/types/relations.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relations.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/types/relations.adp 12 Jun 2001 04:13:46 -0000 1.2 +++ openacs-4/packages/cms/www/modules/types/relations.adp 16 Nov 2004 22:32:52 -0000 1.3 @@ -1,130 +1,13 @@ - +

+

+
Registered Item Relation Types
+

+ +

- - - - - - - - - - - -
Registered Item Relation Types
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- There are no item relation types registered to this - content type. -
Related Object TypeRelation TagMin RelationsMax Relations 
@rel_types.pretty_name@@rel_types.relation_tag@ - 0 - @rel_types.min_n@ - - - - @rel_types.max_n@ - - - Unregister - -   -
-
- - Register a new item relation type -
-

- - - - - - - - - - - - - - - -
Registered Child Relation Types
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- There are no child relation types registered to this - content type. -
Child TypeRelation TagMin RelationsMax Relations 
@child_types.pretty_name@@child_types.relation_tag@ - 0 - @child_types.min_n@ - - - - @child_types.max_n@ - - - Unregister - -   -
-
- - Register a new child relation type -
-

+

+

+
Registered Child Relation Types
+

+ +

\ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/relations.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relations.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/types/relations.tcl 20 Aug 2002 04:18:00 -0000 1.3 +++ openacs-4/packages/cms/www/modules/types/relations.tcl 16 Nov 2004 22:32:52 -0000 1.4 @@ -3,13 +3,70 @@ # @author Michael Pih request create -request set_param type -datatype integer -value content_revision +request set_param content_type -datatype integer -value content_revision set module_id [db_string get_module_id ""] # permission check - must have cm_examine on types module -content::check_access $module_id cm_examine -user_id [User::getID] +content::check_access $module_id cm_examine -user_id [auth::require_login] -db_multirow rel_types get_rel_types "" +template::list::create \ + -name rel_types \ + -multirow rel_types \ + -has_checkboxes \ + -no_data "There are no item relation types registered to this content type." \ + -actions [list "Register a new item relation type" [export_vars -base relation-register?rel_type=item_rel {content_type}] "Register a new item relation type"] \ + -elements { + pretty_name { + label "Related Object Type" + } + relation_tag { + label "Relation Tag" + } + min_n { + label "Min Relations" + } + max_n { + label "Max Relations" + } + item_unreg_link { + display_template "
unregister
" + } + + } -db_multirow child_types get_child_types "" +db_multirow -extend {item_unreg_link} rel_types get_rel_types "" { + set rel_type item_rel + set item_unreg_link [export_vars -base relation-unregister {rel_type content_type target_type relation_tag}] +} + +template::list::create \ + -name child_types \ + -multirow child_types \ + -has_checkboxes \ + -no_data "There are no child relation types registered to this content type." \ + -actions [list "Register a new child relation type" [export_vars -base relation-register?rel_type=child_rel {content_type}] "Register a new child relation type"] \ + -elements { + pretty_name { + label "Child Type" + } + relation_tag { + label "Relation Tag" + } + min_n { + label "Min Relations" + } + max_n { + label "Max Relations" + } + child_unreg_link { + display_template "
unregister
" + } + + } + +db_multirow -extend {child_unreg_link} child_types get_child_types "" { + set rel_type child_rel + set target_type $child_type + set child_unreg_link [export_vars -base relation-unregister {rel_type content_type target_type relation_tag}] +} Index: openacs-4/packages/cms/www/modules/types/relations.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relations.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/modules/types/relations.xql 25 May 2001 23:49:05 -0000 1.1 +++ openacs-4/packages/cms/www/modules/types/relations.xql 16 Nov 2004 22:32:52 -0000 1.2 @@ -20,7 +20,7 @@ where o.object_type = r.target_type and - r.content_type = :type + r.content_type = :content_type order by pretty_name, relation_tag @@ -38,7 +38,7 @@ where c.child_type = o.object_type and - c.parent_type = :type + c.parent_type = :content_type order by pretty_name, relation_tag Index: openacs-4/packages/cms/www/modules/types/subtypes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/subtypes.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/subtypes.adp 16 Nov 2004 22:32:52 -0000 1.1 @@ -0,0 +1,13 @@ + +
Subtypes of @object_type_pretty@
+ +
+ +
No subtypes of @object_type_pretty@
+
Index: openacs-4/packages/cms/www/modules/types/subtypes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/subtypes.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/subtypes.tcl 16 Nov 2004 22:32:52 -0000 1.1 @@ -0,0 +1,2 @@ +# get all subtypes of this content type +db_multirow subtypes get_subtypes "" \ No newline at end of file Index: openacs-4/packages/cms/www/modules/types/subtypes.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/subtypes.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/types/subtypes.xql 16 Nov 2004 22:32:52 -0000 1.1 @@ -0,0 +1,15 @@ + + + + + + + select object_type, pretty_name + from acs_object_types + where supertype = :content_type + order by object_type asc + + + + + \ No newline at end of file