{= 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 = v.fp.option_info_path; string option_info_path_id = v.fp.option_info_path_id; # Just resend to client # 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 label; string short_description = ""; string long_description = ""; string option_info_text; 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; ); option_info_text = "
" . label . "
"; # It is possible that no short description exists, in this case we # don't want any line breaks. if (short_description ne "") then ( option_info_text .= short_description; option_info_text .= "

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

The option
" . option_info_path . "
does not exist.

"; ); string dat = "{"; dat .= add_json("optionInfoPathId", option_info_path_id, "string"); dat .= add_json("optionInfoText", option_info_text, "string"); dat = close_json(dat); debug_message("\n#### optionInfo dat:\n" . dat . "\n"); "optionInfo.displayResponse(" . dat . ")\n"; =}