PageRenderTime 54ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/gui/templates/mainPageLeft.tpl

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