Index: openacs-4/packages/acs-developer-support/www/css-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/www/css-edit.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-developer-support/www/css-edit.tcl 27 Oct 2014 16:39:33 -0000 1.3 +++ openacs-4/packages/acs-developer-support/www/css-edit.tcl 22 Jun 2015 21:03:12 -0000 1.4 @@ -28,8 +28,8 @@ } -on_request { set package_id [ad_conn package_id] - set css_path "$css_location" - set fp [open "$file_location" "r"] + set css_path "$css_location" + set fp [open $file_location "r"] set css_content "" while { [gets $fp line] >= 0 } { append css_content "$line \n" @@ -40,12 +40,15 @@ set revision_html "" if {$item_id ne ""} { append revision_html "
    " - db_foreach revision {select revision_id, publish_date, description from cr_revisions where item_id = :item_id order by publish_date desc} { + db_foreach revision {select revision_id, publish_date, description + from cr_revisions where item_id = :item_id order by publish_date desc + } { if { [content::revision::is_live -revision_id $revision_id] == "t" } { set make_live "that's live!" } else { set return_url_2 [ad_return_url] - set make_live "make live!" + set href [export_vars -base css-make-live -url {revision_id return_url_2 file_location}] + set make_live [subst {make live!] } set return_url "" append revision_html "
  1. $publish_date \[$make_live\]: [string range $description 0 50]
  2. " @@ -75,7 +78,11 @@ set old_css_content [read $fp] close $fp - set item_id [content::item::new -name $file_location -parent_id $package_id -title "$css_location" -description "First revision" -text $old_css_content] + set item_id [content::item::new -name $file_location \ + -parent_id $package_id \ + -title "$css_location" \ + -description "First revision" \ + -text $old_css_content] } @@ -94,4 +101,4 @@ } -cancel_url $return_url } else { ad_returnredirect $return_url -} \ No newline at end of file +}