PageRenderTime 60ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/gui/templates/mainPageLeft.tpl

https://github.com/testlinkjp/testlink-japanese-localization
Smarty Template | 298 lines | 227 code | 38 blank | 33 comment | 27 complexity | 65ab3e514c809366c5b334244cc838f5 MD5 | raw file
  1. {*
  2. Testlink Open Source Project - http://testlink.sourceforge.net/
  3. @filesource mainPageLeft.tpl
  4. @internal revisions
  5. 20110417 - franciscom - BUGID 4429: Code refactoring to remove global coupling as much as possible
  6. on each link enviroment (test project ID,test plan ID) will be added
  7. 20110401 - franciscom - BUGID 3615 - right to allow ONLY MANAGEMENT of requirements link to testcases
  8. 20100501 - Julian - blocks are not draggable anymore
  9. 20100501 - franciscom - BUGID 3410: Smarty 3.0 compatibility
  10. 20100309 - asimon - BUGID 3227, added link for req overview page
  11. 20100106 - asimon - contribution for 2976 req/reqspec search
  12. *}
  13. {lang_get var='labels' s='title_product_mgmt,href_tproject_management,href_admin_modules,
  14. href_assign_user_roles,href_cfields_management,
  15. href_cfields_tproject_assign,href_keywords_manage,
  16. title_user_mgmt,href_user_management,
  17. href_roles_management,title_requirements,
  18. href_req_spec,href_req_assign,
  19. title_test_spec,href_edit_tc,href_browse_tc,href_search_tc,
  20. href_search_req, href_search_req_spec,href_inventory,
  21. href_platform_management, href_inventory_management,
  22. href_print_tc,href_keywords_assign, href_req_overview,
  23. href_print_req, title_documentation'}
  24. {assign var="menuLayout" value=$tlCfg->gui->layoutMainPageLeft}
  25. {assign var="display_left_block_1" value=false}
  26. {assign var="display_left_block_2" value=false}
  27. {assign var="display_left_block_3" value=false}
  28. {assign var="display_left_block_4" value=false}
  29. {assign var="display_left_block_5" value=true}
  30. {if $gui->testprojectID &&
  31. ($gui->grants.project_edit == "yes" || $gui->grants.tproject_user_role_assignment == "yes" ||
  32. $gui->grants.cfield_management == "yes" || $gui->grants.keywords_view == "yes")}
  33. {assign var="display_left_block_1" value=true}
  34. <script type="text/javascript">
  35. function display_left_block_1()
  36. {
  37. var p1 = new Ext.Panel({
  38. title: '{$labels.title_product_mgmt}',
  39. collapsible:false,
  40. collapsed: false,
  41. draggable: false,
  42. contentEl: 'testproject_topics',
  43. baseCls: 'x-tl-panel',
  44. bodyStyle: "background:#c8dce8;padding:3px;",
  45. renderTo: 'menu_left_block_{$menuLayout.testProject}',
  46. width:'100%'
  47. });
  48. }
  49. </script>
  50. {/if}
  51. {if $gui->grants.mgt_users == "yes"}
  52. {assign var="display_left_block_2" value=true}
  53. <script type="text/javascript">
  54. function display_left_block_2()
  55. {
  56. var p1 = new Ext.Panel({
  57. title: '{$labels.title_user_mgmt}',
  58. collapsible:false,
  59. collapsed: false,
  60. draggable: false,
  61. contentEl: 'usermanagement_topics',
  62. baseCls: 'x-tl-panel',
  63. bodyStyle: "background:#c8dce8;padding:3px;",
  64. renderTo: 'menu_left_block_{$menuLayout.userAdministration}',
  65. width:'100%'
  66. });
  67. }
  68. </script>
  69. {/if}
  70. {if $gui->testprojectID && $opt_requirements == TRUE && ($gui->grants.reqs_view == "yes" || $gui->grants.reqs_edit == "yes")}
  71. {assign var="display_left_block_3" value=true}
  72. <script type="text/javascript">
  73. function display_left_block_3()
  74. {
  75. var p3 = new Ext.Panel({
  76. title: '{$labels.title_requirements}',
  77. collapsible:false,
  78. collapsed: false,
  79. draggable: false,
  80. contentEl: 'requirements_topics',
  81. baseCls: 'x-tl-panel',
  82. bodyStyle: "background:#c8dce8;padding:3px;",
  83. renderTo: 'menu_left_block_{$menuLayout.requirements}',
  84. width:'100%'
  85. });
  86. }
  87. </script>
  88. {/if}
  89. {if $gui->testprojectID && $gui->grants.view_tc == "yes"}
  90. {assign var="display_left_block_4" value=true}
  91. <script type="text/javascript">
  92. function display_left_block_4()
  93. {
  94. var p4 = new Ext.Panel({
  95. title: '{$labels.title_test_spec}',
  96. collapsible:false,
  97. collapsed: false,
  98. draggable: false,
  99. contentEl: 'testspecification_topics',
  100. baseCls: 'x-tl-panel',
  101. bodyStyle: "background:#c8dce8;padding:3px;",
  102. renderTo: 'menu_left_block_{$menuLayout.testSpecification}',
  103. width:'100%'
  104. });
  105. }
  106. </script>
  107. {/if}
  108. <script type="text/javascript">
  109. function display_left_block_5()
  110. {
  111. var p5 = new Ext.Panel({
  112. title: '{$labels.title_documentation}',
  113. collapsible:false,
  114. collapsed: false,
  115. draggable: false,
  116. contentEl: 'testlink_application',
  117. baseCls: 'x-tl-panel',
  118. bodyStyle: "background:#c8dce8;padding:3px;",
  119. renderTo: 'menu_left_block_{$menuLayout.general}',
  120. width:'100%'
  121. });
  122. }
  123. </script>
  124. <div class="vertical_menu" style="float: left">
  125. {* ---------------------------------------------------------------------------------------- *}
  126. <div id='menu_left_block_1'></div><br />
  127. <div id='menu_left_block_2'></div><br />
  128. <div id="menu_left_block_3"></div><br />
  129. <div id="menu_left_block_4"></div><br />
  130. <div id="menu_left_block_5"></div><br />
  131. {if $display_left_block_1}
  132. <div id='testproject_topics'>
  133. {if $gui->grants.project_edit == "yes"}
  134. <img src="{$tlImages.bullet}" />
  135. <a href="lib/project/projectView.php?tproject_id={$gui->testprojectID}">{$labels.href_tproject_management}</a>
  136. {/if}
  137. {*
  138. {if $gui->grants.configuration == "yes"}
  139. <br />
  140. <img src="{$tlImages.bullet}" />
  141. <a href="lib/admin/modules.php">{$labels.href_admin_modules}</a>
  142. {/if}
  143. *}
  144. {if $gui->grants.tproject_user_role_assignment == "yes"}
  145. <br />
  146. <img src="{$tlImages.bullet}" />
  147. <a href="lib/usermanagement/usersAssign.php?featureType=testproject&amp;featureID={$gui->testprojectID}">{$labels.href_assign_user_roles}</a>
  148. {/if}
  149. {if $gui->grants.cfield_management == "yes"}
  150. <br />
  151. <img src="{$tlImages.bullet}" />
  152. <a href="lib/cfields/cfieldsView.php?tproject_id={$gui->testprojectID}">{$labels.href_cfields_management}</a>
  153. <br />
  154. <img src="{$tlImages.bullet}" />
  155. <a href="lib/cfields/cfieldsTprojectAssign.php?tproject_id={$gui->testprojectID}">{$labels.href_cfields_tproject_assign}</a>
  156. {/if}
  157. {* --- keywords management --- *}
  158. {if $gui->grants.keywords_view == "yes"}
  159. <br />
  160. <img src="{$tlImages.bullet}" />
  161. <a href="lib/keywords/keywordsView.php?tproject_id={$gui->testprojectID}">{$labels.href_keywords_manage}</a>
  162. {/if} {* view_keys_rights *}
  163. {* --- platforms management --- *}
  164. {if $gui->grants.platform_management == "yes"}
  165. <br />
  166. <img src="{$tlImages.bullet}" />
  167. <a href="lib/platforms/platformsView.php?tproject_id={$gui->testprojectID}">{$labels.href_platform_management}</a>
  168. {/if}
  169. {* --- inventory view --- *}
  170. {if $gui->grants.project_inventory_view}
  171. <br />
  172. <img src="{$tlImages.bullet}" />
  173. <a href="lib/inventory/inventoryView.php?tproject_id={$gui->testprojectID}">{$labels.href_inventory}</a>
  174. {/if}
  175. </div>
  176. {/if}
  177. {* ---------------------------------------------------------------------------------------- *}
  178. {* ------------------------------------------------- *}
  179. {if $display_left_block_2}
  180. <div id='usermanagement_topics'>
  181. <img src="{$tlImages.bullet}" />
  182. <a href="lib/usermanagement/usersView.php">{$labels.href_user_management}</a>
  183. <br />
  184. <img src="{$tlImages.bullet}" />
  185. <a href="lib/usermanagement/rolesView.php">{$labels.href_roles_management}</a>
  186. </div>
  187. {/if}
  188. {* ------------------------------------------------- *}
  189. {* ---------------------------------------------------------------------------------------- *}
  190. {if $display_left_block_3}
  191. <div id="requirements_topics" >
  192. {if $gui->grants.reqs_view == "yes"}
  193. <img src="{$tlImages.bullet}" />
  194. <a href="{$gui->launcher}?feature=reqSpecMgmt&tproject_id={$gui->testprojectID}">{$labels.href_req_spec}</a><br/>
  195. {* BUGID 3227 *}
  196. <img src="{$tlImages.bullet}" />
  197. <a href="lib/requirements/reqOverview.php?tproject_id={$gui->testprojectID}">{$labels.href_req_overview}</a><br/>
  198. {* contribution for 2976 req/reqspec search *}
  199. <img src="{$tlImages.bullet}" />
  200. <a href="{$gui->launcher}?feature=searchReq&tproject_id={$gui->testprojectID}">{$labels.href_search_req}</a><br/>
  201. <img src="{$tlImages.bullet}" />
  202. <a href="{$gui->launcher}?feature=searchReqSpec&tproject_id={$gui->testprojectID}">{$labels.href_search_req_spec}</a>
  203. {/if}
  204. {if $gui->grants.reqs_edit == "yes" || $gui->grants.req_tcase_assignment}
  205. <br />
  206. <img src="{$tlImages.bullet}" />
  207. <a href="lib/general/frmWorkArea.php?feature=assignReqs&tproject_id={$gui->testprojectID}">{$labels.href_req_assign}</a>
  208. <br />
  209. <img src="{$tlImages.bullet}" />
  210. <a href="{$gui->launcher}?feature=printReqSpec&tproject_id={$gui->testprojectID}">{$labels.href_print_req}</a>
  211. {/if}
  212. </div>
  213. {/if}
  214. {* ---------------------------------------------------------------------------------------- *}
  215. {* ---------------------------------------------------------------------------------------- *}
  216. {if $display_left_block_4}
  217. <div id="testspecification_topics" >
  218. <img src="{$tlImages.bullet}" />
  219. <a href="{$gui->launcher}?feature=editTc&tproject_id={$gui->testprojectID}">
  220. {if $gui->grants.modify_tc eq "yes"}
  221. {lang_get s='href_edit_tc'}
  222. {else}
  223. {lang_get s='href_browse_tc'}
  224. {/if}
  225. </a>
  226. {if $gui->hasTestCases}
  227. <br />
  228. <img src="{$tlImages.bullet}" />
  229. <a href="{$gui->launcher}?feature=searchTc&tproject_id={$gui->testprojectID}">{$labels.href_search_tc}</a>
  230. {/if}
  231. {* --- keywords management --- *}
  232. {if $gui->grants.keywords_view == "yes" && $gui->grants.keywords_assignment == "yes"}
  233. <br />
  234. <img src="{$tlImages.bullet}" />
  235. <a href="{$gui->launcher}?feature=keywordsAssign&tproject_id={$gui->testprojectID}">{$labels.href_keywords_assign}</a>
  236. {/if}
  237. {if $gui->grants.modify_tc eq "yes"}
  238. <br />
  239. <img src="{$tlImages.bullet}" />
  240. <a href="{$gui->launcher}?feature=printTestSpec&tproject_id={$gui->testprojectID}">{$labels.href_print_tc}</a>
  241. {/if}
  242. </div>
  243. {/if}
  244. <div id='testlink_application'>
  245. <img src="{$tlImages.bullet}" />
  246. <form style="display:inline;">
  247. <select class="menu_combo" style="font-weight:normal;" name="docs" size="1"
  248. onchange="javascript:get_docs(this.form.docs.options[this.form.docs.selectedIndex].value,
  249. '{$basehref}');" >
  250. <option value="leer"> -{lang_get s='access_doc'}-</option>
  251. {if $gui->docs}
  252. {foreach from=$gui->docs item=doc}
  253. <option value="{$doc}">{$doc}</option>
  254. {/foreach}
  255. {/if}
  256. </select>
  257. </form>
  258. </div>
  259. </div>