{= include "templates.util.base_util"; include "templates.util.encoding"; # 2007-05-28 - GMF - Added this, so documentation which calls utility functions (like docs_option_link()) # won't get an error. include "docs.util"; string option_info_path = volatile.option_info_path; # KHP 20/Apr/2008 # Options usually refer to "lang_options" though # they can also refer to "lang_admin" or "lang_config" # if the GUI requires i.e. an option description which is # not covered or structured well in lang_options. # Hence we check if the option_info_path already starts # with i.e. "lang_config". In this case we don't add # the "lang_options" prefix to the path. if (!starts_with(option_info_path, "lang_")) then ( option_info_path = "lang_options." . option_info_path; ); debug_message("\n#### option_info_path: " . option_info_path . "\n"); # # Set the language # string user_node_name = node_name(volatile.authenticated_user_node_path); debug_message("#### user_node_name: " . user_node_name . "\n"); # Set output language string current_language = get_current_language(user_node_name); debug_message("#### current_language: " . current_language . "\n"); set_language(current_language); string dat; string label; string short_description = ""; string long_description = ""; if (?(option_info_path)) then ( node option_info_node = option_info_path; if (option_info_node?{"label"}) then ( label = expand(@option_info_node{"label"}); ) else ( label = lang_admin.docs.missing_label; ); if (option_info_node?{"short_description"}) then ( short_description = expand(@option_info_node{"short_description"}); ); if (option_info_node?{"long_description"}) then ( long_description = expand(@option_info_node{"long_description"}); ); if (short_description eq "" and long_description eq "") then ( short_description = lang_admin.docs.no_description; ); dat = "
" . label . "
"; # It is possible that no short description exists, in this case we # don't want any line breaks. if (short_description ne "") then ( dat .= short_description; dat .= "

"; ); dat .= long_description; ) else ( dat = "

The option
" . option_info_path . "
does not exist.

"; ); debug_message("\n#### optionInfo text:\n" . dat . "\n"); "adminConfig.optionInfo.displayResponse('" . encode_json(dat) . "')\n"; =}