@@ -29,13 +29,21 @@ Purpose: smarty template - View all platforms
2929{ $tprjid =$gui -> tproject_id }
3030{ $managerURL =" lib/platforms/platformsEdit.php?tproject_id=$tprjid" }
3131{ $viewAction =" lib/platforms/platformsView.php?tproject_id=$tprjid" }
32+
33+ { $managerAction =" $basehref$managerURL" }
34+
35+ { $createAction =" $managerAction&doAction=create" }
36+
3237{ $dummy =" lib/platforms/platformsImport.php?tproject_id=" }
3338{ $importAction =" $basehref$dummy$tprjid" }
3439
40+ { $dummy =" lib/platforms/platformsExport.php?tproject_id=" }
41+ { $exportAction =" $basehref$dummy$tprjid" }
42+
3543<script type =" text/javascript" >
3644<!--
3745/* All this stuff is needed for logic contained in inc_del_onclick.tpl */
38- var del_action= fRoot+ ' { $managerURL } ' + ' &action =do_delete&id=' ;
46+ var del_action= fRoot+ ' { $managerURL } ' + ' &doAction =do_delete&id=' ;
3947// -->
4048 </script >
4149
@@ -47,90 +55,95 @@ var del_action=fRoot+'{$managerURL}'+'&action=do_delete&id=';
4755<div class =" page-content" >
4856{ if $gui -> platforms != ' ' }
4957 <form method =" post" id =" platformsView"
50- name =" platformsView" action =" { $managerURL } " >
51- <input type =" hidden" name =" action" id =" action" value =" " >
58+ name =" platformsView" action =" { $managerAction } " >
59+
60+ <!-- this will be setted by the onclick -->
61+ <input type =" hidden" name =" doAction" id =" doAction" value =" " >
62+
5263 <input type =" hidden" name =" platform_id" id =" platform_id" value =" " >
5364 <input type =" hidden" name =" tplan_id" id =" tplan_id" value =" { $gui -> tplan_id } " >
5465 <table class =" table table-bordered sortable" >
55- <thead class =" thead-dark" >
56- <tr >
57- <th width =" 30%" >{ $tlImages .toggle_api_info} { $tlImages .sort_hint} { $labels .th_platform} </th >
58- <th >{ $tlImages .sort_hint} { $labels .th_notes} </th >
59- <th >{ $labels .on_design} </th >
60- <th >{ $labels .on_exec} </th >
61- { if $gui -> canManage != " " }
62- <th class =" { $noSortableColumnClass } " width =" 10%" >{ $labels .th_delete} </th >
63- { /if }
64- </tr >
65- </thead >
66- { * <tbody> *}
67- { section name= platform loop= $gui -> platforms }
68- { $oplat =$gui -> platforms [platform]}
69- <tr >
70- <td >
71- <span class =" api_info" style =' display :none ' >{ $tlCfg -> api -> id_format |replace :" %s" :$oplat .id} </span >
72- { if $gui -> canManage != " " }
73- <a href =" { $managerURL } &action=edit&id={ $oplat .id} " >
74- { /if }
75- { $oplat .name|escape }
76- { if $gui -> canManage != " " }
77- </a >
78- { /if }
79- </td >
80- { * when using rich webeditor strip_tags is needed *}
81- <td >{ if $gui -> editorType == ' none' } { $oplat .notes|nl2br } { else } { $oplat .notes|strip_tags|strip|truncate :#PLATFORM_NOTES_TRUNCATE_LEN#} { /if } </td >
82- <td class =" clickable_icon" >
83- { if $oplat .enable_on_design== 1}
84- <input type =" image" style =" border :none "
66+ <thead class =" thead-dark" >
67+ <tr >
68+ <th width =" 30%" >{ $tlImages .toggle_api_info} { $tlImages .sort_hint} { $labels .th_platform} </th >
69+ <th >{ $tlImages .sort_hint} { $labels .th_notes} </th >
70+ <th >{ $labels .on_design} </th >
71+ <th >{ $labels .on_exec} </th >
72+ { if $gui -> canManage != " " }
73+ <th class =" { $noSortableColumnClass } "
74+ width =" 10%" >{ $labels .th_delete}
75+ </th >
76+ { /if }
77+ </tr >
78+ </thead >
79+ { section name= platform loop= $gui -> platforms }
80+ { $oplat =$gui -> platforms [platform]}
81+ <tr >
82+ <td >
83+ <span class =" api_info" style =' display :none ' >{ $tlCfg -> api -> id_format |replace :" %s" :$oplat .id} </span >
84+ { if $gui -> canManage != " " }
85+ <a href =" { $managerURL } &doAction=edit&id={ $oplat .id} " >
86+ { /if }
87+ { $oplat .name|escape }
88+ { if $gui -> canManage != " " }
89+ </a >
90+ { /if }
91+ </td >
92+ { * when using rich webeditor strip_tags is needed *}
93+ <td >{ if $gui -> editorType == ' none' } { $oplat .notes|nl2br } { else } { $oplat .notes|strip_tags|strip|truncate :#PLATFORM_NOTES_TRUNCATE_LEN#} { /if } </td >
94+ <td class =" clickable_icon" >
95+ { if $oplat .enable_on_design== 1}
96+ <input type =" image" style =" border :none "
8597 id =" disableDesign_{ $oplat .id} "
8698 name =" disableDesign"
8799 title =" { $labels .active_click_to_change} " alt =" { $labels .active_click_to_change} "
88- onClick = " platform_id.value={ $oplat .id} ;action .value='enableDesign ';"
100+ onClick = " platform_id.value={ $oplat .id} ;doAction .value='disableDesign ';"
89101 src =" { $tlImages .on} " />
90- { else }
91- <input type =" image" style =" border :none "
102+ { else }
103+ <input type =" image" style =" border :none "
92104 id =" enableDesign_{ $oplat .id} "
93105 name =" enableDesign"
94106 title =" { $labels .inactive_click_to_change} " alt =" { $labels .inactive_click_to_change} "
95- onClick = " action .value='enableDesign';platform_id.value={ $oplat .id} ;"
107+ onClick = " doAction .value='enableDesign';platform_id.value={ $oplat .id} ;"
96108 src =" { $tlImages .off} " />
97- { /if }
98- </td >
99- <td class =" clickable_icon" >
100- { if $oplat .enable_on_execution== 1}
101- <input type =" image" style =" border :none "
109+ { /if }
110+ </td >
111+ <td class =" clickable_icon" >
112+ { if $oplat .enable_on_execution== 1}
113+ <input type =" image" style =" border :none "
102114 id =" disableExec_{ $oplat .id} "
103115 title =" { $labels .active_click_to_change} " alt =" { $labels .active_click_to_change} "
104- onClick = " action .value='disableExec';platform_id.value={ $oplat .id} ;"
116+ onClick = " doAction .value='disableExec';platform_id.value={ $oplat .id} ;"
105117 src =" { $tlImages .on} " />
106- { else }
107- <input type =" image" style =" border :none "
118+ { else }
119+ <input type =" image" style =" border :none "
108120 id =" enableExec_{ $oplat .id} "
109121 title =" { $labels .inactive_click_to_change} " alt =" { $labels .inactive_click_to_change} "
110- onClick = " action .value='enableExec';platform_id.value={ $oplat .id} ;"
122+ onClick = " doAction .value='enableExec';platform_id.value={ $oplat .id} ;"
111123 src =" { $tlImages .off} " />
112- { /if }
113- </td >
114- { if $gui -> canManage != " " }
115- <td class =" clickable_icon" >
116- { if $oplat .linked_count eq 0}
117- <img style =" border :none ;cursor : pointer ;" alt =" { $labels .alt_delete_platform} "
124+ { /if }
125+ </td >
126+ { if $gui -> canManage != " " }
127+ <td class =" clickable_icon" >
128+ { if $oplat .linked_count eq 0}
129+ <img style =" border :none ;cursor : pointer ;" alt =" { $labels .alt_delete_platform} "
118130 title =" { $labels .alt_delete_platform} " src =" { $tlImages .delete} "
119131 onclick =" delete_confirmation({ $oplat .id} ,
120132 '{ $oplat .name|escape :' javascript' |escape } ', '{ $del_msgbox_title |escape :' javascript' } ','{ $warning_msg |escape :' javascript' } ');" />
121- { else }
122- <img style =" border :none ;cursor : pointer ;" alt =" { $labels .alt_delete_platform} "
133+ { else }
134+ <img style =" border :none ;cursor : pointer ;"
135+ alt =" { $labels .alt_delete_platform} "
123136 title =" { $labels .alt_delete_platform} " src =" { $tlImages .delete_disabled} "
124137 onclick =" alert_message_html('{ $del_msgbox_title |escape :' javascript' } ','{ $warning_msg_cannot_del |replace :' %s' :$oplat .name|escape :' javascript' } ');" />
125- { /if }
126- </td >
127- { /if }
128- </tr >
129- { /section }
130- { * </tbody> *}
138+ { /if }
139+ </td >
140+ { /if }
141+ </tr >
142+ { /section }
131143 </table >
132- { /if }
144+ { /if }
133145
146+ <!-- controls -->
134147{ include file= " platforms/{$tplBN}Controls.inc.tpl" suffix= " Bottom" }
135148</div >
136149</form >
0 commit comments