one.tcl
View an OpenACS Object Type
- Location:
- /packages/acs-subsite/www/admin/object-types/one.tcl
- Author:
- Yonantan Feldman <yon@arsdigita.com>
- Created:
- August 13, 2000
- CVS ID:
$Id: one.tcl,v 1.13.2.2 2019/05/16 09:54:29 gustafn Exp $
Related Files
- packages/acs-subsite/www/admin/object-types/one.xql
- packages/acs-subsite/www/admin/object-types/one.tcl
- packages/acs-subsite/www/admin/object-types/one.adp
- packages/acs-subsite/www/admin/object-types/one-postgresql.xql
- packages/acs-subsite/www/admin/object-types/one-oracle.xql
[ hide source ] | [ make this the default ]
File Contents
ad_page_contract { View an OpenACS Object Type @author Yonantan Feldman (yon@arsdigita.com) @creation-date August 13, 2000 @cvs-id $Id: one.tcl,v 1.13.2.2 2019/05/16 09:54:29 gustafn Exp $ } { object_type:notnull } if { ![db_0or1row object_type {}] } { ad_return_complaint 1 "The specified object type, $object_type, does not exist" ad_script_abort } set page_title "Details for type $pretty_name" set context [list [list index "Object Type Index"] "Details for type $pretty_name"] set page [acs_object_type_hierarchy -object_type $object_type] append page [subst { <p> <b>Information</b>: <ul> <li>Pretty Name: [lang::util::localize $pretty_name]</li> <li>Pretty Plural: [lang::util::localize $pretty_plural]</li> <li>Abstract: [expr {$abstract_p ? "True" : "False"}]</li> <li>Dynamic: [expr {$dynamic_p ? "True" : "False"}]</li> [expr {$table_name eq "" ? "" : "<li>Table Name: $table_name</li>"}] [expr {$id_column eq "" ? "" : "<li>Primary Key: $id_column</li>"}] [expr {$name_method eq "" ? "" : "<li>Name Method: $name_method</li>"}] [expr {$type_extension_table eq "" ? "" : "<li>Helper Table: $type_extension_table</li>"}] [expr {$package_name eq "" ? "" : "<li>Package Name: $package_name</li>"}] </ul> }] set i 0 set body [subst { <table cellpadding="5" cellspacing="5"> <tr> <th>Attribute Name</th> <th>Pretty Name</th> <th>Pretty Plural</th> <th>Datatype</th> <th>Default Value</th> <th>Minimum Number of Values</th> <th>Maximum Number of Values</th> <th>Storage</th> <th>Table Name</th> <th>Column Name</th> </tr> }] db_foreach attribute { select attribute_name, pretty_name, pretty_plural, datatype, default_value, min_n_values, max_n_values, storage, table_name as attr_table_name, column_name from acs_attributes where object_type = :object_type } { incr i append body " <tr> <td>$attribute_name</td> <td>$pretty_name</td> <td>$pretty_plural</td> <td>$datatype</td> <td>$default_value</td> <td>$min_n_values</td> <td>$max_n_values</td> <td>$storage</td> <td>[string tolower $attr_table_name]</td> <td>[string tolower $column_name]</td> </tr>" } append body " </table>" if { $i > 0 } { append page " <p> <b>Attributes</b>: $body " } if { $table_name ne "" } { set body [db_string table_comment {} -default ""] append body [subst { <table border="0" cellpadding="5" cellspacing="5"> <tr> <th>Type</th> <th>Name</th> <th>Comment</th> </tr> }] set i 0 db_foreach attribute_comment {} { incr i append body " <tr> <td>[string tolower $column_name]</td> <td>[string tolower $data_type]</td> <td>$comments</td> </tr>" } append body " </table>" if { $i > 0 } { append page [subst {<p><b>Table Attributes</b>:<p>$body\n}] } } set i 0 set body "" db_foreach package_index {} { incr i append body [subst { <pre class="code">[ns_quotehtml $text]</pre> <p> }] } if { $i > 0 } { append page [subst {<p><b>SQL Functions</b>:<p>$body}] } # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: