2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
40 <!-- BEGIN: SearchHeader -->
41 <table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
44 <form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
45 <table width="100%" border="0" cellspacing="0" cellpadding="0">
48 <td scope="row" nowrap="nowrap">{MOD.LBL_DOC_NAME}</td>
49 <td nowrap="nowrap"><input type="text" name="document_name" size="10" value="{DOCUMENT_NAME}"/></td>
50 <td scope="row" nowrap="nowrap">{MOD.LBL_DET_IS_TEMPLATE}</td>
51 <td nowrap="nowrap"><select name="is_template" >{IS_TEMPLATE_OPTIONS}</select></td>
54 <td scope="row" nowrap="nowrap">{MOD.LBL_DET_TEMPLATE_TYPE}</td>
55 <td nowrap="nowrap"><select name="template_type" >{TEMPLATE_TYPE_OPTIONS}</select></td>
56 <td scope="row" nowrap="nowrap">{MOD.LBL_CATEGORY_VALUE}</td>
57 <td nowrap="nowrap"><select name="category_id" >{CATEGORY_OPTIONS}</select></td>
60 <td scope="row" nowrap="nowrap">{MOD.LBL_SUBCATEGORY_VALUE}</td>
61 <td nowrap="nowrap"><select name="subcategory_id" >{SUB_CATEGORY_OPTIONS}</select></td>
62 <td align="right" colspan=2>
63 <input type="hidden" name="module" value="{MODULE_NAME}" />
64 <input type="hidden" name="action" value="Popup" />
65 <input type="hidden" name="query" value="true" />
66 <input type="hidden" name="func_name" value="" />
67 <input type="hidden" name="request_data" value="{request_data}" />
68 <input type="hidden" name="populate_parent" value="false" />
69 <input type="hidden" name="record_id" value="" />
70 <input type="submit" name="button" class="button"
71 id="search_form_submit"
72 title="{APP.LBL_SEARCH_BUTTON_TITLE}"
73 accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
74 value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
82 <!-- BEGIN: TreeView -->
83 <script type="text/javascript" src="include/javascript/popup_helper.js?v={VERSION_MARK}"></script>
84 <script type='text/javascript' src='include/javascript/yui/build/connection/connection.js'></script>
90 function select_document(treeid) {
91 var node=YAHOO.namespace(treeid).selectednode;
92 send_back('Documents',node.data.id);
95 function populate_parent_search(treeid) {
96 var node=YAHOO.namespace(treeid).selectednode;
99 new_subcategory_id=node.data.id;
100 if (new_subcategory_id == 'null') new_subcategory_id='';
101 new_category_id=node.parent.data.id;
102 if (new_category_id == 'null') new_category_id='';
104 new_category_id=node.data.id;
105 if (new_category_id == 'null') new_category_id='';
106 new_subcategory_id='';
109 if(!window.opener.document.getElementById('Documentsadvanced_searchSearchForm')) {
110 window.opener.location = 'index.php?searchFormTab=advanced_search&module=Documents&action=index&query=true&category_id_advanced' +'='+escape(new_category_id)+'&subcategory_id_advanced='+escape(new_subcategory_id);
112 var searchTab = (window.opener.document.getElementById('Documentsadvanced_searchSearchForm').style.display == '') ? 'advanced' : 'basic';
113 window.opener.location = 'index.php?searchFormTab='+searchTab+'_search&module=Documents&action=index&query=true&category_id_'+searchTab+'='+escape(new_category_id)+'&subcategory_id_'+searchTab+'='+escape(new_subcategory_id);
118 function populate_search(treeid) {
119 var node=YAHOO.namespace(treeid).selectednode;
122 new_subcategory_id=node.data.id;
123 if (new_subcategory_id == 'null') new_subcategory_id='';
124 new_category_id=node.parent.data.id;
125 if (new_category_id == 'null') new_category_id='';
127 new_category_id=node.data.id;
128 if (new_category_id == 'null') new_category_id='';
129 new_subcategory_id='';
133 document.popup_query_form.subcategory_id.value=new_subcategory_id;
134 document.popup_query_form.category_id.value=new_category_id;
136 document.popup_query_form.submit();
140 <table cellpadding="0" cellspacing="0" style="border-left:1px solid; border-right:1px solid; border-bottom:1px solid" width="100%" class="edit view">
143 <td width="100%" valign="top" style="border-right: 1px">
150 <!-- END: TreeView -->
154 <!-- END: SearchHeader -->
155 <table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
156 <!-- BEGIN: list_nav_row -->
158 <!-- END: list_nav_row -->
160 <td scope="col" width="33%" nowrap="nowrap"><a href="{ORDER_BY}document_name" class="listViewThLinkS1">{MOD.LBL_LIST_DOCUMENT}{arrow_start}{name_arrow}{arrow_end}</a></td>
161 <td scope="col" width="33%" nowrap="nowrap">{MOD.LBL_LIST_REVISION}</td>
162 <td scope="col" width="34%" nowrap="nowrap">{MOD.LBL_LIST_STATUS}</td>
165 <tr height="20" class="{ROW_COLOR}S1">
166 <td scope="row" valign="top"><a href="#" onclick="send_back('Documents','{DOCUMENT.ID}');" >{DOCUMENT.DOCUMENT_NAME}</a></td>
167 <td valign="top">{DOCUMENT.LATEST_REVISION}</td>
168 <td valign="top">{DOCUMENT.STATUS_ID}</td>
173 {ASSOCIATED_JAVASCRIPT_DATA}