Index: openacs-4/packages/acs-subsite/acs-subsite.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/acs-subsite.info,v
diff -u -r1.87 -r1.88
--- openacs-4/packages/acs-subsite/acs-subsite.info 29 Jan 2007 12:27:00 -0000 1.87
+++ openacs-4/packages/acs-subsite/acs-subsite.info 5 May 2007 13:07:35 -0000 1.88
@@ -7,7 +7,7 @@
t
f
-
+
OpenACS
Subsite
2006-11-19
@@ -16,7 +16,7 @@
GPL
3
-
+
@@ -69,7 +69,10 @@
-
+
+
+
+
Index: openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl 10 Jan 2007 21:22:06 -0000 1.8
+++ openacs-4/packages/acs-subsite/tcl/email-image-procs.tcl 5 May 2007 13:07:35 -0000 1.9
@@ -64,7 +64,7 @@
}
switch $priv_level {
"4" {
- return "$email"
+ return "$email"
}
"3" {
set email_image_id [email_image::get_related_item_id -user_id $user_id]
@@ -132,27 +132,33 @@
set image_name "email${user_id}.gif"
set email_length [string length $email]
set dest_path "/tmp/$image_name"
- set width [expr [expr {$email_length * [expr {$font_size / 2}]}] + 2]
+ set width [expr [expr $email_length * [expr $font_size / 2]] + 2]
set height $font_size
- set ypos [expr {[expr {$height / 2}] + 3 }]
+ set ypos [expr [expr $height / 2] + 3 ]
set size "${width}x$height"
- if {$bgcolor eq ""} {
+ if { [string equal $bgcolor ""]} {
set bgcolor "\#ffffff"
}
set bg "xc:$bgcolor"
# Creating an image of the rigth length where the email will be
- exec convert -size $size $bg $dest_path
+ if {[catch {exec convert -size $size $bg $dest_path} errmsg]} {
+ return ""
+ }
# Creating the image with the email of the user on it
- exec convert -font $font_type -fill blue -pointsize $font_size -draw "text 0,$ypos $email" \
- $dest_path $dest_path
+ if {[catch {exec convert -font $font_type -fill blue -pointsize $font_size -draw "text 0,$ypos $email" \
+ $dest_path $dest_path} errmsg]} {
+ return ""
+ }
- if { $transparent eq "" || $transparent eq "1" } {
- # Making the bg color transparent
- exec convert $dest_path -transparent $bgcolor $dest_path
+ if { [string equal $transparent ""] || [string equal $transparent "1"] } {
+ # Making the bg color transparent
+ if {[catch {exec convert $dest_path -transparent $bgcolor $dest_path} errmsg]} {
+ return ""
+ }
}
# Time to store the image in the content repository
@@ -210,12 +216,12 @@
set image_name "email${user_id}.gif"
set email_length [string length $new_email]
set dest_path "/tmp/$image_name"
- set width [expr [expr {$email_length * [expr {$font_size / 2}]}] + 2]
+ set width [expr [expr $email_length * [expr $font_size / 2]] + 2]
set height $font_size
- set ypos [expr {[expr {$height / 2}] + 3 }]
+ set ypos [expr [expr $height / 2] + 3 ]
set size "${width}x$height"
- if {$bgcolor eq ""} {
+ if { [string equal $bgcolor ""]} {
set bgcolor "\#ffffff"
}
@@ -231,7 +237,7 @@
exec convert -font $font_type -fill blue -pointsize $font_size -draw "text 0,$ypos $new_email" \
$dest_path $dest_path
- if { $transparent eq "" || $transparent eq "1" } {
+ if { [string equal $transparent ""] || [string equal $transparent "1"] } {
# Making the bg color transparent
exec convert $dest_path -transparent $bgcolor $dest_path
}
Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v
diff -u -r1.37 -r1.38
--- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 16 Jan 2007 23:18:35 -0000 1.37
+++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 5 May 2007 13:07:35 -0000 1.38
@@ -490,16 +490,20 @@
{-sections_multirow "sections"}
{-subsections_multirow "subsections"}
{-section ""}
+ {-url ""}
} {
Defines the page flow of the subsite
TODO: add an image
TODO: add link_p/selected_p for subsections
} {
- set pageflow [get_pageflow_struct]
+ set pageflow [get_pageflow_struct -url $url]
+ if {$url eq ""} {
+ set base_url [subsite::get_element -element url]
+ } else {
+ set base_url $url
+ }
- set base_url [subsite::get_element -element url]
-
template::multirow create $sections_multirow name label title url selected_p link_p
template::multirow create $subsections_multirow name label title url selected_p link_p
@@ -632,7 +636,9 @@
}
}
-ad_proc -public subsite::get_pageflow_struct {} {
+ad_proc -public subsite::get_pageflow_struct {
+ {-url ""}
+} {
Defines the page flow structure.
} {
# This is where the page flow structure is defined
@@ -645,7 +651,12 @@
set pageflow [list]
- set subsite_url [subsite::get_element -element url]
+ if {$url eq ""} {
+ set subsite_url [subsite::get_element -element url]
+ } else {
+ set substie_url $url
+ }
+
set subsite_id [ad_conn subsite_id]
array set subsite_sitenode [site_node::get -url $subsite_url]
set subsite_node_id $subsite_sitenode(node_id)
Index: openacs-4/packages/acs-subsite/www/resources/core.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/resources/core.js,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-subsite/www/resources/core.js 4 Jun 2006 00:45:46 -0000 1.10
+++ openacs-4/packages/acs-subsite/www/resources/core.js 5 May 2007 13:07:35 -0000 1.11
@@ -175,9 +175,16 @@
}
+function acs_KeypressGoto(theUrl, event) {
+ var key;
+ if (event) {
+ if (event.which == 13) {
+ location.href = theUrl;
+ }
+ }
+ }
-
/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo
* ---------------------------------------------------------------------------
*
Index: openacs-4/packages/acs-subsite/www/resources/default-master.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/resources/default-master.css,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-subsite/www/resources/default-master.css 11 May 2005 13:24:37 -0000 1.5
+++ openacs-4/packages/acs-subsite/www/resources/default-master.css 5 May 2007 13:07:35 -0000 1.6
@@ -1,32 +1,3 @@
-#login-box {
- border: black 1px solid;
- padding: 4px;
-}
-
-TABLE.table-display {
- font-family: tahoma, verdana, helvetica;
- font-size: 85%;
-}
-
-TR.table-header {
- background-color: #cccccc;
-}
-
-TR.even {
- background-color: #f0f0f0;
-}
-
-TR.odd {
- background-color: #e0e0e0;
-}
-
-/* Replace deprictated center tags in forms. Eventually all forms should use form builder and this tag should not be used */
-
-DIV.submit-button {
- text-align: center;
-}
-
-
/* Calendar widget css */
/* The main calendar widget. DIV containing a table. */
Index: openacs-4/packages/acs-subsite/www/resources/site-master.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/resources/site-master.css,v
diff -u -r1.27 -r1.28
--- openacs-4/packages/acs-subsite/www/resources/site-master.css 6 Aug 2006 20:57:31 -0000 1.27
+++ openacs-4/packages/acs-subsite/www/resources/site-master.css 5 May 2007 13:07:35 -0000 1.28
@@ -1,98 +1,58 @@
+/* Styles originally defined in default-master.css */
-/**********************************************************************
-/* Site-Wide/Master Templates
-/**********************************************************************/
-
-/* BODY tag */
-
-body {
- font-family: verdana, helvetica, arial, sans-serif;
- background-color: white;
- margin: 0px;
+#login-box {
+ border: black 1px solid;
+ padding: 4px;
}
-
-/* Site Header */
-
-#site-header {
- background-color: #313063;
- color: white;
- font-family: tahoma, verdana, helvetica, sans-serif;
+TABLE.table-display {
+ font-family: tahoma, verdana, helvetica;
font-size: 85%;
- padding-top: 4px;
- padding-bottom: 4px;
- padding-left: 8px;
- padding-right: 8px;
- text-align: center;
}
-#site-header .system-name {
- font-size: 120%;
- font-weight: bold;
- float: left;
+TR.table-header {
+ background-color: #cccccc;
}
-#site-header .system-name a {
- color: white;
- text-decoration: none;
-}
-#site-header .system-name a:hover {
- color: white;
- text-decoration: none;
-}
-#site-header .users-online {
- display: inline;
- float: right;
- padding-right: 4em;
+TR.even {
+ background-color: #f0f0f0;
}
-#site-header .user-greeting {
- display: inline;
+TR.odd {
+ background-color: #e0e0e0;
}
-#site-header .permanent-navigation {
- display: inline;
- float: right;
-}
+/* Replace deprecated center tags in forms. Eventually all forms should use form builder and this tag should not be used */
-#site-header .action-list a {
- border: solid 1px #313063;
- text-align: center;
- padding: 1px;
- padding-left: 4px;
- padding-right: 4px;
- color: white;
- text-decoration: none;
+DIV.submit-button {
+ text-align: center;
}
-#site-header .action-list a:hover {
- text-decoration: none;
- background-color: #666666;
- border: solid 1px #999999;
-}
+/**********************************************************************
+/* Site-Wide/Master Templates
+/**********************************************************************/
+#skiptocontent {
+ display: none;
+}
+
+.block-marker {display: none;}
+
/* User Messages */
-#user-message {
+#alert-message {
background-color: #ccff99;
padding: 4px;
padding-top: 6px;
padding-bottom: 6px;
font-size: 85%;
}
-#user-message ul {
+#alert-message .alert {
margin-left: 0;
- padding-left: 0;
- display: inline;
- border: none;
-}
-#user-message ul li {
- margin-left: 0;
padding-left: 2px;
border: none;
- list-style: none;
}
@@ -118,41 +78,6 @@
}
-/* Context Bar */
-
-#context-bar {
- font-family: Arial, sans-serif;
- font-size: 11px;
- margin-bottom: 2px;
- padding-left: 8px;
-}
-#context-bar .breadcrumbs {
- clear: left;
- float: left;
- padding-top: 3px;
-}
-#context-bar .breadcrumbs ul {
- display: inline;
- margin-left: 0;
- padding-left: 0;
- display: inline;
- border: none;
-}
-#context-bar .breadcrumbs ul li {
- list-style: none;
- display: inline;
- margin-left: 0;
- padding-left: 2px;
- border: none;
- list-style: none;
- display: inline;
-}
-#context-bar #navlinks {
- float: right;
-}
-
-
-
/* Subsite Name */
#subsite-name {
@@ -170,26 +95,10 @@
text-decoration: none;
}
-/* This wraps everything except site-header and site-footer, and is used to ensure proper margins */
-/* Only used on non-tabbed (navbar and subnavbar) pages */
-#page-body {
- margin-left: 8px;
- margin-right: 8px;
-}
-
-
-
-
-/* Title of page, typically used on an H1 tag */
-
-.page-title {
-}
-
-
/* Site Footer */
-#site-footer {
+#footer {
clear: both;
border-top: 1px solid #ccc;
font-family: tahoma, verdana, helvetica, sans-serif;
@@ -202,30 +111,25 @@
text-align: center;
}
-#site-footer ul {
+#footer ul {
display: inline;
margin-left: 0;
padding-left: 0;
border: none;
}
-#site-footer ul li {
+#footer ul li {
margin-left: 0;
padding-left: 10px;
border: none;
list-style: none;
display: inline;
}
-#site-footer .action-list {
+#footer .action-list {
float: left;
}
-
-
-
-
-
/**********************************************************************
/* General navigation
/**********************************************************************/
@@ -335,7 +239,6 @@
color: black;
}
-
#subnavbar-body {
border-bottom: 1px solid #016799;
border-left: 1px solid #016799;
@@ -348,47 +251,69 @@
padding-right: 6px;
}
+/* END NAVIGATION */
/**********************************************************************
/* Widgets
/**********************************************************************/
+/* STANDARD TAGS -----------------------------------------------------------*/
+/* standard html (body, h1, p, form...) */
-/* Various forms of links */
+body {
+ margin:5px 5px 0px 5px;
+ padding:0;
+ font:small/1.5em Tahoma, "Lucida Grande", sans-serif; voice-family: "\"}\""; voice-family:inherit;
+}
-.action-list {
- padding: 0;
+h1 {
+ font-size: 1.2em;
+ font-weight: bold;
+ color: #666666;
+ margin-bottom: 12px;
}
-.action-list ul {
- margin: 0;
- padding: 0;
- display: inline;
- border: none;
+h2 {
+ font-size: 1.1em;
+ font-weight:bold;
+ color: #555555;
+ margin-bottom: 12px;
}
-
-.action-list ul li {
- margin: 0;
- padding: 0;
- border: none;
- list-style: none;
- display: inline;
+
+h3 {
+ font-size: 1.05em;
+ font-weight:bold;
+ color: #444444;
+ margin-bottom: 12px;
}
-a.refresh {
- color: white;
- text-decoration: underline;
+h3 {
+ font-size: 1.00em;
+ font-weight:bold;
+ color: #444444;
+ margin-bottom: 12px;
}
-a.refresh:hover {
- color: red;
- text-decoration: underline;
+
+a:link {
+ color: #235c96;
+ text-decoration:underline;
}
+a:visited {
+ color: #235c96;
+}
+
+a:hover {
+ color: #235c96;
+ background: #CCCCCC;
+}
+
+/* BUTTON ---- */
a.button {
- font: 85% arial;
+ font: .85em arial;
border: solid 1px black;
- background-color: #e1e1e1;
+ background-color: #E1E1E1;
text-align: center;
padding: 1px;
padding-left: 8px;
@@ -397,25 +322,57 @@
text-decoration: none;
white-space: nowrap;
}
+
a.button:link {
text-decoration: none;
border: solid 1px black;
}
-a.button:visited {
- text-decoration: none;
- border: solid 1px black;
-}
+
a.button:hover {
text-decoration: none;
- background-color: #ccc;
+ background-color: #CCCCCC;
border: solid 1px black;
}
+
a.button:active {
text-decoration: none;
border: solid 1px black;
}
+/* END BUTTON ---- */
+.center {text-align: center;}
+.small {font-size: x-small;}
+
+/* ARE THESE NEEDED ??? -----------------------------------------------------------*/
+
+/* Various forms of links */
+
+.action-list {
+ padding: 0;
+}
+
+.action-list ul {
+ margin: 0;
+ padding: 0;
+ display: inline;
+ border: none;
+}
+
+.action-list ul li {
+ margin: 0;
+ padding: 0;
+ border: none;
+ list-style: none;
+ display: inline;
+}
+
+div.subsite-context-bar {
+ font-size: 85%;
+ margin-bottom: 4px;
+ position: relative;
+}
+
a.admin-button {
font: 85% arial;
border: solid 1px black;
@@ -459,49 +416,72 @@
background: #f00;
}
+.highlight {
+ background-color: #ffc;
+}
ul.action-links li {
list-style: circle url(/resources/acs-subsite/action-link-marker.png);
margin: 8px;
margin-left: -16px;
}
-div.subsite-context-bar {
- font-size: 85%;
- margin-bottom: 4px;
- position: relative;
-}
+/* END ARE THESE NEEDED -----------------------------------------------------------*/
+/* END STANDARD TAGS ---------------------------------------------------------------*/
+/* HEADER TAGS ---------------------------------------------------------------------*/
-/* Text Styles */
+#header {
+ font-size: 0.92em;
+ background-color: #EFEFEF;
+ color: #444444;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
-h1 {
- font-size: 120%;
- margin-bottom: 12px;
+#system-name {
+ font-size: 1.4em;
+ font-weight: bold;
+ float: left;
+ padding-left: 0.2em;
}
-h2 {
- font-size: 115%;
- margin-bottom: 12px;
+
+#system-name a {
+ color: #333333;
+ text-decoration: none;
}
-h3 {
- font-size: 110%;
- margin-bottom: 12px;
+
+#header-navigation {
+ float: right;
+ padding-right: 0.4em;
}
-h4 {
- font-size: 105%;
- margin-bottom: 12px;
-}
-.small {
- font-size: 85%;
+/* CONTEXT BAR ---- */
+
+#breadcrumbs {
+ clear: right;
+ padding-left: 100px;
}
-.highlight {
- background-color: #ffc;
+/* END CONTEXT BAR ---- */
+
+/* END HEADER TAGS -----------------------------------------------------------*/
+
+/* LISTS -----------------------------------------------------------*/
+
+ul.compact, .action-list ul{
+ margin: 0px;
+ padding: 0px;
}
+ul.compact li, .action-list ul li {
+ list-style:none;
+ display: inline;
+}
+/* END OF LISTS */
+
/* Portlets */
.portlet h2 {
@@ -530,12 +510,6 @@
}
-
-
-
-
-
-
/* Generally Available Tabs */
#tabs-div {
@@ -659,14 +633,6 @@
}
-
-
-
-
-
-
-
-
/**********************************************************************
/* DEPRECATED CLASSES
/**********************************************************************/
Index: openacs-4/packages/acs-subsite/www/shared/parameters.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/shared/parameters.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-subsite/www/shared/parameters.tcl 10 Jan 2007 21:22:10 -0000 1.12
+++ openacs-4/packages/acs-subsite/www/shared/parameters.tcl 5 May 2007 13:07:35 -0000 1.13
@@ -22,7 +22,7 @@
set page_title "$instance_name Parameters"
-if {$package_url eq [subsite::get_element -element url]} {
+if { $package_url eq [subsite::get_element -element url] } {
set context [list [list "${package_url}admin/" "Administration"] $page_title]
} elseif { $package_url ne "" } {
set context [list [list $package_url $instance_name] [list "${package_url}admin/" "Administration"] $page_title]
@@ -47,22 +47,32 @@
set section_where_clause ""
}
+
+array set sections {}
+
db_foreach select_params {} {
- if { $section_name eq "" } {
- set section_name "Main"
+ if { $section_name ne "" } {
+ set section_name "main"
+ set section_pretty "Main"
} else {
- set section_name [string map {_ { } - { }} $section_name]
- set section_name "[string toupper [string index $section_name 0]][string range $section_name 1 end]"
+ set section_name [string map {- {_} " " {_}} $section_name]
+ set section_pretty [string map {_ { }} $section_name]
+ set section_pretty "[string toupper [string index $section_pretty 0]][string range $section_pretty 1 end]"
}
+ if { ![info exists sections($section_name)] } {
+ set sec [list "-section" $section_name {legendtext "$section_pretty"}]
+ ad_form -extend -name parameters -form [list $sec]
+ set sections($section_name) "$section_pretty"
+ }
+
if { $counter == 0 } {
set focus_elm $parameter_name
}
set elm [list ${parameter_name}:text,optional,nospell \
{label {$parameter_name}} \
{help_text {$description}} \
- {section {$section_name}} \
{html {size 50}}]
set file_val [ad_parameter_from_file $parameter_name $package_key]