Index: openacs-4/packages/acs-service-contract/www/binding-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/www/binding-display.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-service-contract/www/binding-display.adp 8 Feb 2005 01:16:49 -0000 1.1 @@ -0,0 +1,22 @@ + + Contract @contract_name;noquote@ + {@contract_name;noquote@} + +

Binding @contract_name@

+

+ +

Contract details

+ + + Index: openacs-4/packages/acs-service-contract/www/binding-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/www/binding-display.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-service-contract/www/binding-display.tcl 8 Feb 2005 01:16:49 -0000 1.1 @@ -0,0 +1,60 @@ +ad_page_contract { + Display a given service contract + + @author Jeff Davis + @creation-date 2005-02-05 + @cvs-id $Id: binding-display.tcl,v 1.1 2005/02/08 01:16:49 jeffd Exp $ +} { + id + impl_name:trim,notnull +} + +set contract_name [db_string contract_name {select contract_name from acs_sc_contracts where contract_id = :id}] + +db_multirow contract contract { + select o.contract_name, o.operation_name, o.operation_desc, (case when t.msg_type_id = o.operation_inputtype_id then 'input' else 'output' end) as inout, + e.element_name as param, e.element_msg_type_isset_p as set_p, et.msg_type_name as param_type + from acs_sc_operations o, + acs_sc_msg_types t, + acs_sc_msg_type_elements e, + acs_sc_msg_types et + where contract_id = :id + and t.msg_type_id in (o.operation_inputtype_id, operation_outputtype_id) + and e.msg_type_id = t.msg_type_id + and et.msg_type_id = e.element_msg_type_id + order by o.contract_name, o.operation_name, t.msg_type_name, e.element_pos } + + +template::list::create \ + -name binding \ + -multirow binding \ + -elements { + impl_operation_name { + label "Operation" + } + impl_pl { + label "Language" + } + impl_alias { + label "Alias" + display_template {@binding.impl_alias;noquote@} + } + } + +db_multirow -extend {check} binding binding { + select impl_operation_name, impl_alias, impl_pl + from acs_sc_impl_aliases + where impl_name = :impl_name and impl_contract_name = :contract_name + order by lower(impl_operation_name) + +} { + if {[string equal $impl_pl "TCL"]} { + regsub {^::} $impl_alias {} impl_alias + if {[empty_string_p [info proc ::$impl_alias]]} { + append impl_alias { - NOT FOUND!} + } else { + append impl_alias " {[info args ::$impl_alias]}" + } + set impl_alias "$impl_alias" + } +} Index: openacs-4/packages/acs-service-contract/www/contract-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/www/contract-display.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-service-contract/www/contract-display.tcl 16 Sep 2003 08:30:00 -0000 1.4 +++ openacs-4/packages/acs-service-contract/www/contract-display.tcl 8 Feb 2005 01:16:49 -0000 1.5 @@ -39,6 +39,13 @@ display_template {Uninstall} sub_class narrow } + display { + label {} + link_url_eval {[export_vars -base binding-display { {id $contract_id} impl_name }]} + link_html { title "View this contracts implementation details" } + display_template {view} + sub_class narrow + } } db_multirow valid_installed_binding valid_installed_binding {}