Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.adp 4 Oct 2003 08:46:40 -0000 1.1 @@ -0,0 +1 @@ +Current content type does not have a template yet Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/default_template.tcl 4 Oct 2003 08:46:40 -0000 1.1 @@ -0,0 +1,68 @@ +# serve the correct template based from the manage type, +# its its in the content manage type, then return the template according to +# the content type + +# this page also set an array current_item if the manage type is +# content or template + + +# check what are we managing: category, templates or contents +set manage_type [ad_get_client_property -default content [ad_conn package_id] manage_type] +switch -exact $manage_type { + template { + #if we are on template manage_type then we need to use the template folder not the page folder + set root_id [parameter::get -parameter template_folder_id] + } + content { + set root_id [parameter::get -parameter root_folder_id] + } + category { + ad_return_template category-view + return + } + search { + ad_return_template search-view + return + } +} + +set root_url [ad_conn package_url] +set extra_url [ad_conn extra_url] +if [string equal $extra_url ""] {set extra_url "/"} + +# get the item by url +array set current_item [bcms::item::get_item_by_url -root_id $root_id -url "$extra_url"] + +# check to see if there is a content item for this url. +if {[array size current_item] > 0} { + + # lets check if we need to have / on the url + # if its a folder we need to add / and redirect + set current_url_list [ad_conn urlv] + set current_url [ad_conn url] + if {![regexp {/$} $current_url] \ + && [string equal $current_item(content_type) "content_folder"]} { + ad_returnredirect "$current_url/" + ad_script_abort + } + + # return the correct template of a particular content type + if {[string equal "content_folder" $current_item(content_type)]} { + ad_return_template folder-view + } elseif {[string equal "content_revision" $current_item(content_type)]} { + if {[string equal "text" $current_item(storage_type)]} { + ad_return_template page-view + } else { + ad_return_template file-view + } + } elseif {[string equal "content_template" $current_item(content_type)]} { + ad_return_template template-view + } elseif {[string equal "image" $current_item(content_type)]} { + ad_return_template image-view + } + +} else { + ns_returnnotfound + ad_script_abort +} + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.adp 4 Oct 2003 08:46:40 -0000 1.1 @@ -0,0 +1,16 @@ + +@title@ +@context@ +@context_action@ +@context_help@ +1 + + +

File Name: @current_item.name@

+

Title: @file_revision.title@

+

Description: @file_revision.description@

+ +Download + + + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/file-view.tcl 4 Oct 2003 08:46:40 -0000 1.1 @@ -0,0 +1,45 @@ +ad_page_contract { + view a file revision, if no revision_id is passed then latest revision is used +} { + {revision_id:optional,naturalnum $current_item(latest_revision)} + {preview_p:optional 0} +} + +if {$preview_p} { + cr_write_content -revision_id $revision_id + ad_script_abort +} + +array set file_revision [bcms::revision::get_revision -revision_id $revision_id] + +set current_url [ad_return_url -urlencode] +set current_url_unencoded [ad_return_url] +set package_url [ad_conn package_url] + +# we will only allow edits on the latest version, else you can only view them +if {$revision_id == $file_revision(latest_revision)} { + set context_action " +Edit this File +Publish this File +Categorize this File +View Version(s)" + + set context_help "You can edit this file, etc." + + set title "View file" + set context [bcms::widget::item_context -item_id $current_item(item_id) -root_id $root_id] + set context [lrange $context 0 [expr [llength $context] - 2]] + lappend context "$file_revision(title)" + +} else { + set context_action " +View Version(s)" + + set context_help "This is a version of a file. You can only view this file" + + set title "View File Version" + set context [bcms::widget::item_context -item_id $current_item(item_id) -root_id $root_id] + lappend context "version $revision_id" + +} + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/folder-view.tcl 4 Oct 2003 08:46:40 -0000 1.2 @@ -21,19 +21,19 @@ template::list::create \ -name item_list \ -multirow item_list \ - -pass_properties { package_url current_item_id current_url } \ + -pass_properties { package_url } \ -key item_id \ - -bulk_actions { - "Delete" "${package_url}manage/delete-item" "Delete checked items" - "Move" "${package_url}manage/move-item" "Move checked items" - } \ + -bulk_actions [list \ + "Delete" "${package_url}manage/delete-item" "Delete checked items" \ + "Move" "${package_url}manage/move-item" "Move checked items" \ + ]\ -bulk_action_export_vars { return_url } \ - -actions { - Edit "${package_url}manage/folder-edit?folder_id=$current_item_id&return_url=$current_url" "Edit this Folder" - "Use Categories" "${package_url}manage/folder-set-category?folder_id=$current_item_id&return_url=$current_url" "Categorize Contents on the Folder" - } \ + -actions [list \ + Edit "${package_url}manage/folder-edit?folder_id=$current_item_id&return_url=$current_url" "Edit this Folder" \ + "Use Categories" "${package_url}manage/folder-set-category?folder_id=$current_item_id&return_url=$current_url" "Categorize Contents on the Folder" \ + ]\ -elements { name { label "Name" @@ -49,8 +49,16 @@ - + + + + + + + + + } html { style "width:70px" } } @@ -74,8 +82,8 @@ orderby last_modified } } \ - -page_size 5 \ - -page_groupsize 2 \ + -page_size 10 \ + -page_groupsize 10 \ -page_query { select i.item_id, i.name, @@ -91,7 +99,7 @@ from cr_items i, cr_revisionsx r where i.parent_id = $current_item(item_id) - and i.latest_revision = r.revision_id and content_type = 'content_revision' + and i.latest_revision = r.revision_id union select i.item_id, @@ -121,7 +129,9 @@ Template this Folder Use Categories Add a Folder - Add a Page" + Add a Page + Add a File + Add an Image" set context_help "This is a content folder. You can see the contents of the folder on your right. You may click the actions that can be performed on this folder on your left." set title "View Folder Contents" Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.adp 4 Oct 2003 08:46:40 -0000 1.1 @@ -0,0 +1,16 @@ + +@title@ +@context@ +@context_action@ +@context_help@ +1 + + +

File Name: @current_item.name@

+

Title: @image_revision.title@

+

Description: @image_revision.description@

+ + + + + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/image-view.tcl 4 Oct 2003 08:46:40 -0000 1.1 @@ -0,0 +1,46 @@ +ad_page_contract { + view a image revision, if no revision_id is passed then latest revision is used +} { + {revision_id:optional,naturalnum $current_item(latest_revision)} + {preview_p:optional 0} +} + +if {$preview_p} { + cr_write_content -revision_id $revision_id + ad_script_abort +} + + +array set image_revision [bcms::revision::get_revision -revision_id $revision_id] + +set current_url [ad_return_url -urlencode] +set current_url_unencoded [ad_return_url] +set package_url [ad_conn package_url] + +# we will only allow edits on the latest version, else you can only view them +if {$revision_id == $image_revision(latest_revision)} { + set context_action " +Edit this Image +Publish this Image +Categorize this Image +View Version(s)" + + set context_help "You can edit this image, etc." + + set title "View image" + set context [bcms::widget::item_context -item_id $current_item(item_id) -root_id $root_id] + set context [lrange $context 0 [expr [llength $context] - 2]] + lappend context "$image_revision(title)" + +} else { + set context_action " +View Version(s)" + + set context_help "This is a version of a image. You can only view this image" + + set title "View Image Version" + set context [bcms::widget::item_context -item_id $current_item(item_id) -root_id $root_id] + lappend context "version $revision_id" + +} + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/page-view.tcl 4 Oct 2003 08:46:40 -0000 1.2 @@ -15,7 +15,7 @@ set context_action " Edit this Page Template this Page -Publish this Page +Publish this Page Categorize this Page View Version(s) Relate Page" Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.adp 4 Oct 2003 08:46:40 -0000 1.2 @@ -2,7 +2,5 @@ @title@ @context@ - + Index: openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl 22 Sep 2003 07:36:47 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-base/templates/bcms-ui-base/search-view.tcl 4 Oct 2003 08:46:40 -0000 1.2 @@ -1,12 +1,8 @@ ad_page_contract { display search results } { - {name_search:optional ""} - {title_search:optional ""} - {content_search:optional ""} + name_search:optional {display_search_results:optional 0} - {orderby:optional ""} - {page:optional 1} } if {$display_search_results} { Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/templates/public/default.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/templates/public/default.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.adp 4 Oct 2003 08:46:41 -0000 1.1 @@ -0,0 +1,12 @@ + + +
+ View as: + + +
+ +@current_item.content@ Index: openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/bcms-ui-base/templates/public/default_template.tcl 4 Oct 2003 08:46:41 -0000 1.1 @@ -0,0 +1,53 @@ +ad_page_contract { + serve the correct template based from what is template assigned + on the cms_context of public +} { +} + +set root_id [bcms::folder::get_bcms_root_folder] +set root_url [ad_conn package_url] +set extra_url [ad_conn extra_url] +if [string equal $extra_url ""] {set extra_url "/"} + +set manage_type [ad_get_client_property -default content [ad_conn package_id] manage_type] +if {[string equal $manage_type "template"]} { + #if we are on template manage_type then we need to use the template folder not the page folder + set root_id [parameter::get -parameter template_folder_id] +} + +# get the item by url +array set current_item [bcms::item::get_item_by_url -root_id $root_id -url "$extra_url" -revision live -resolve_index] + +# check to see if there is a content item for this url. +# array size 1 there is no live item in this url +# array size 0 there is no item in this url +if {[array size current_item] > 1} { + + # lets check if we need to have / on the url + # if the item is index but the last urlv is not index or the url does not have / on the end + # we need to redirect. + set current_url_list [ad_conn urlv] + set current_url [ad_conn url] + if {![string equal [lindex $current_url_list end] "index"] \ + && ![regexp {/$} $current_url] \ + && [string equal $current_item(name) "index"]} { + ad_returnredirect "$current_url/" + } + + if {![string equal $current_item(storage_type) "text"]} { + cr_write_content -revision_id $current_item(live_revision) + ad_script_abort + } + + # get the template for this item + array set one_template [bcms::template::get_template -item_id $current_item(item_id) -context public] + + if {[array size one_template] > 0} { + ad_return_template /templates/public/$one_template(name) + } + +} else { + ns_returnnotfound + ad_script_abort +} + Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/bcms-ui-base/templates/public/folder.adp'. Fisheye: No comparison available. Pass `N' to diff?