Advertisement
Guest User

tiki proposals/5.x tiki-admin_tracker_fields.tpl

a guest
Aug 11th, 2010
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 15.03 KB | None | 0 0
  1. {* $Id: tiki-admin_tracker_fields.tpl 28446 2010-08-11 11:35:56Z xavidp $ *}
  2.  
  3. {title help="Adding+fields+to+a+tracker" url="tiki-admin_tracker_fields.php?trackerId=$trackerId"}{tr}Admin Tracker:{/tr} {$tracker_info.name|escape}{/title}
  4.  
  5. <div  class="navbar">
  6.     {button href="tiki-list_trackers.php" _text="{tr}List Trackers{/tr}"}
  7.    
  8.     {if $tiki_p_admin_trackers eq 'y'}
  9.         {button href="tiki-admin_trackers.php" _text="{tr}Admin Trackers{/tr}"}
  10.         {button href="tiki-admin_trackers.php?trackerId=$trackerId&show=mod" _text="{tr}Edit This Tracker{/tr}"}
  11.     {/if}
  12.     {button href="tiki-view_tracker.php?trackerId=$trackerId" _text="{tr}View This Tracker's Items{/tr}"}
  13. </div>
  14.  
  15. {tabset}
  16. <!-- {$plug} -->
  17. <a name="list"></a>
  18. {tab name="{tr}Tracker fields{/tr}"}
  19.  
  20. <table class="findtable">
  21. <tr><td>{tr}Find{/tr}</td>
  22. <td>
  23. <form method="get" action="tiki-admin_tracker_fields.php">
  24. <input type="text" name="find" value="{$find|escape}" />
  25. <input type="submit" value="{tr}Find{/tr}" name="search" />
  26. <input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />
  27. <input type="hidden" name="trackerId" value="{$trackerId|escape}" />
  28. &nbsp;
  29. <input type="text" name="max" value="{$max|escape}" size="5"/>
  30. {tr}Rows{/tr}
  31. </form>
  32. </td>
  33. </tr>
  34. </table>
  35.  
  36. <form>
  37. <table class="normal">
  38. <tr>
  39. <th>&nbsp;</th>
  40. <th>{self_link _sort_arg='sort_mode' _sort_field='fieldId'}{tr}Id{/tr}{/self_link}</th>
  41. <th>{self_link _sort_arg='sort_mode' _sort_field='name'}{tr}Name{/tr}{/self_link}</th>
  42. <th>{self_link _sort_arg='sort_mode' _sort_field='type'}{tr}Type{/tr}{/self_link}</th>
  43. <th>{self_link _sort_arg='sort_mode' _sort_field='options'}{tr}Options{/tr}{/self_link}</th>
  44. <th>{self_link _sort_arg='sort_mode' _sort_field='position'}{tr}Position{/tr}{/self_link}</th>
  45. <th>{self_link _sort_arg='sort_mode' _sort_field='isMandatory'}{tr}Mandatory{/tr}{/self_link}</th>
  46. <th>{self_link _sort_arg='sort_mode' _sort_field='isTblVisible' _title="{tr}Is column visible when listing tracker items?{/tr}"}{tr}Tbl vis{/tr}{/self_link}</th>
  47. <th>{self_link _sort_arg='sort_mode' _sort_field='isMain' _title="{tr}Column links to edit/view item?{/tr}"}{tr}isMain{/tr}{/self_link}</th>
  48. <th>{self_link _sort_arg='sort_mode' _sort_field='isMultilingual'}{tr}Multilingual{/tr}{/self_link}</th>
  49. <th>{self_link _sort_arg='sort_mode' _sort_field='isSearchable'}{tr}Searchable{/tr}{/self_link}</th>
  50. <th>{self_link _sort_arg='sort_mode' _sort_field='isPublic' _title="{tr}Field is public? (viewed in trackerlist plugin){/tr}"}{tr}Public{/tr}{/self_link}</th>
  51. <th>{self_link _sort_arg='sort_mode' _sort_field='isHidden'}{tr}Hidden{/tr}{/self_link}</th>
  52. <th>{self_link _sort_arg='sort_mode' _sort_field='description'}{tr}Description{/tr}{/self_link}</th>
  53. <th>{select_all checkbox_names='action[]'}</th>
  54. </tr>
  55. {cycle values="odd,even" print=false}
  56. {section name=user loop=$channels}
  57. <tr class="{cycle}">
  58. <td>{if $tracker_info.useRatings ne 'y' or $channels[user].name ne "Rating"}
  59. {self_link _icon='page_edit' cookietab='2' _anchor="anchor2" fieldId=$channels[user].fieldId}{tr}Edit{/tr}{/self_link}
  60. {/if}</td>
  61. <td>{if $tracker_info.useRatings ne 'y' or $channels[user].name ne "Rating"}
  62. {self_link cookietab='2' _anchor="anchor2" fieldId=$channels[user].fieldId _title="{tr}Edit{/tr}"}{$channels[user].fieldId}{/self_link}{else}{$channels[user].fieldId}{/if}</td>
  63. <td>{$channels[user].name|escape}</td>
  64. <td>{assign var=x value=$channels[user].type}{$field_types[$x].label}</td>
  65. <td>{$channels[user].options|truncate:42:"..."|escape}</td>
  66. <td>{$channels[user].position}</td>
  67. <td>{if $channels[user].isMandatory eq 'y'}<a title="{tr}Mandatory{/tr}">*</a>{else}-{/if}</td>
  68. <td>{if $channels[user].isTblVisible eq 'y'}{icon _id='table' title="{tr}Is column visible when listing tracker items?{/tr}"}{else}-{/if}</td>
  69. <td>{$channels[user].isMain}</td>
  70. <td>{$channels[user].isMultilingual}</td>
  71. <td>{if $channels[user].isSearchable eq 'y'}{icon _id='magnifier' title="{tr}Searchable{/tr}"}{else}-{/if}</td>
  72. <td>{$channels[user].isPublic}</td>
  73. <td>{$channels[user].isHidden}
  74. {if !empty($channels[user].visibleBy)}<br />{icon _id=magnifier width=10 height=10}{foreach from=$channels[user].visibleBy item=g}{$g|escape} {/foreach}{/if}
  75. {if !empty($channels[user].editableBy)}<br />{icon _id=page_edit width=10 height=10}{foreach from=$channels[user].editableBy item=g}{$g|escape} {/foreach}{/if}
  76. </td>
  77. <td>{$channels[user].description|truncate:14|escape}</td>
  78. <td>{if $tracker_info.useRatings ne 'y' or $channels[user].name ne "Rating"}
  79. {self_link trackerId=$trackerId fieldId=$channels[user].fieldId up=1 delta=-1}{icon _id='resultset_up'}{/self_link}
  80. {self_link trackerId=$trackerId fieldId=$channels[user].fieldId up=1}{icon _id='resultset_down'}{/self_link}
  81. <a class="link" href="tiki-admin_tracker_fields.php?trackerId={$trackerId}{if $max and $max ne $prefs.maxRecords}&amp;max={$max}{/if}{if $offset}&amp;offset={$offset}{/if}&amp;sort_mode={$sort_mode}&amp;remove={$channels[user].fieldId}" title="{tr}Remove{/tr}">{icon _id='cross' alt="{tr}Remove{/tr}"}</a>
  82. <input type="checkbox" name="action[]" value='{$channels[user].fieldId}' />
  83. {/if}</td>
  84. </tr>
  85. {/section}
  86. </table>
  87.  
  88. <div style="text-align:right">
  89. {tr}Perform action with checked{/tr}:
  90. <select name="batchaction">
  91. <option value="">{tr}...{/tr}</option>
  92. <option value="delete">{tr}Delete{/tr}</option>
  93. </select>
  94. <input type="hidden" name="trackerId" value="{$trackerId}" />
  95. <input type="submit" name="act" value="{tr}OK{/tr}" />
  96. </div>
  97. </form>
  98.  
  99. {pagination_links cant=$cant step=$max offset=$offset}{/pagination_links}
  100. {/tab}
  101.  
  102. {if $fieldId eq "0"}
  103. {assign var='title' value="{tr}New tracker field{/tr}"}
  104. {else}
  105. {assign var='title' value="{tr}Edit tracker field{/tr}"}
  106. {/if}
  107. {tab name=$title}
  108. {if $error}
  109.     {remarksbox  type="warning" title="{tr}Errors{/tr}"}{tr}{$error}{/tr}{/remarksbox}
  110. {/if}
  111. <form action="tiki-admin_tracker_fields.php" method="post">
  112. {if $find}<input type="hidden" name="find" value="{$find|escape}" />{/if}
  113. {if $max and $max ne $prefs.maxRecords}<input type="hidden" name="max" value="{$max|escape}" />{/if}
  114. {if $offset}<input type="hidden" name="offset" value="{$offset|escape}" />{/if}
  115. {if $sort_mode}<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />{/if}
  116. <input type="hidden" name="fieldId" value="{$fieldId|escape}" />
  117. <input type="hidden" name="trackerId" value="{$trackerId|escape}" />
  118. <table class="normal">
  119. <tr class="formcolor"><td>{tr}Name{/tr}:</td><td><input type="text" name="name" value="{$name|escape}" /></td></tr>
  120. <tr class="formcolor"><td>{tr}Type{/tr}:
  121. {assign var=fld value="z"}
  122. {foreach key=fk item=fi from=$field_types name=foreachname}
  123. {if $fi.help}
  124. <div id='{$fk}' {if $type eq $fk or (($type eq 'o' or $type eq '') and $smarty.foreach.foreachname.first)}style="display:block;font-style:italic;"{else}style="display:none;font-style:italic;"{/if}>{$fi.help}</div>
  125. {assign var=fld value=$fld|cat:$fk}
  126. {/if}
  127. {/foreach}
  128. </td><td>
  129. <select name="type" id='trkfldtype' onchange='javascript:chgTrkFld("{$fld}",this.options[selectedIndex].value);javascript:chgTrkFld("{$fld}",this.options[selectedIndex].value);javascript:chgTrkLingual(this.options[selectedIndex].value);'>
  130. {sortlinks case=false}
  131. {foreach key=fk item=fi from=$field_types}
  132. <option value="{$fk}" {if $type eq $fk}selected="selected"{/if}{if $fi.opt and ($type eq $fk or $type  eq 'o' or $type eq '')}{assign var=showit value=true}{/if}>{$fi.label}</option>
  133. {/foreach}
  134. {/sortlinks}
  135. </select>
  136.  
  137. {if $prefs.feature_help eq 'y'}
  138. <a href="{$prefs.helpurl}Tracker+Field+Type" target="tikihelp" class="tikihelp" title="{tr}Trackers{/tr}">
  139. {icon _id='help' alt="{tr}help{/tr}"}</a>{/if}
  140.  
  141. <div  id='z' {if $showit}style="display:block;"{else}style="display:none;"{/if}><input type="text" name="options" value="{$options|escape}" size="50" /></div>
  142. </td></tr>
  143.  
  144. {* Section that allows to reduce the user list item choices through a multiselect list of all list items of this field type (if supported by this fieldtype) *}
  145.  
  146. <tr class="formcolor" id='itemChoicesRow' {if empty($field_types.$type.itemChoicesList)}style="display:none;"{/if}><td>{tr}Select list items that will be displayed:{/tr}</td><td>
  147. {foreach key=fk item=fi from=$field_types name=foreachname}
  148. {if isset($fi.itemChoicesList)}
  149. <select name="itemChoices[]" id='{$fk}itemChoices' {if $type eq $fk or (($type eq 'o' or $type eq '') and $smarty.foreach.foreachname.first)}style="display:block;"{else}style="display:none;"{/if} size="{math equation="min(10,x)" x=$fi.itemChoicesList|@count}" multiple="multiple">
  150. <option value="">&nbsp;</option>
  151. {sortlinks case=false}
  152. {foreach key=choice_k item=choice_i from=$fi.itemChoicesList}
  153. {$choice_k}
  154. <option value="{$choice_k|escape}"{if !empty($itemChoices) and in_array($choice_k, $itemChoices)} selected="selected"{/if}>{if $type eq 'u'}{$choice_i|username}{else}{tr}{$choice_i}{/tr}{/if}</option>
  155. {/foreach}
  156. {/sortlinks}
  157. </select>
  158. {/if}
  159. {/foreach}
  160. </td></tr>
  161.  
  162. <tr class="formcolor"><td>{tr}Order{/tr}:</td><td><input type="text" size="5" name="position" value="{$position}" /></td></tr>
  163. <tr class="formcolor"><td>{tr}Field is mandatory?{/tr}</td><td><input type="checkbox" name="isMandatory" {if $isMandatory eq 'y'}checked="checked"{/if} /></td></tr>
  164. <tr class="formcolor"><td>{tr}Is column visible when listing tracker items?{/tr}</td><td><input type="checkbox" name="isTblVisible" {if empty($fieldId) || $isTblVisible eq 'y'}checked="checked"{/if} /></td></tr>
  165. <tr class="formcolor"><td colspan="2">{remarksbox type="info" title="{tr}Important note{/tr}"}{tr}The first field in the tracker to have column links to edit/view item (i.e. isMain) will be what is shown as the name of the item in category and search listings{/tr}{/remarksbox}</td></tr>
  166. <tr class="formcolor"><td>{tr}Column links to edit/view item?{/tr}</td><td><input type="checkbox" name="isMain" {if empty($fieldId) ||$isMain eq 'y'}checked="checked"{/if} /></td></tr>
  167. <tr class="formcolor" id='multilabelRow'{if $type neq 'a' && $type neq 't' && $type neq 'o' && $type neq '' && $type neq 'C'} style="display:none;"{/if}><td>{tr}Multilingual content{/tr}:</td><td><input type="checkbox" name="isMultilingual" {if $isMultilingual eq 'y'}checked="checked"{/if} /></td></tr>
  168. <tr class="formcolor"><td>{tr}Column is searchable?{/tr}</td><td><input type="checkbox" name="isSearchable" {if $isSearchable eq 'y'}checked="checked"{/if} /></td></tr>
  169. <tr class="formcolor"><td>{tr}Field is public? (viewed in trackerlist plugin){/tr}</td><td><input type="checkbox" name="isPublic" {if empty($fieldId) || $isPublic eq 'y'}checked="checked"{/if} /></td></tr>
  170. <tr class="formcolor"><td>{tr}Field is hidden?{/tr}</td><td>
  171. <select name="isHidden">
  172. <option value="n"{if $isHidden eq 'n'} selected="selected"{/if}>{tr}not hidden{/tr}</option>
  173. <option value="y"{if $isHidden eq 'y'} selected="selected"{/if}>{tr}visible to admin only{/tr}</option>
  174. <option value="p"{if $isHidden eq 'p'} selected="selected"{/if}>{tr}editable by admin only{/tr}</option>
  175. <option value="c"{if $isHidden eq 'c'} selected="selected"{/if}>{tr}visible by creator &amp; admin only{/tr}</option>
  176. </select><br /><i>{tr}The option creator needs a field of type user selector and option 1{/tr}</i><br />
  177. {tr}Visible by:{/tr}
  178. <select name="visibleBy[]" size="3" multiple>
  179. <option value="">&nbsp;</option>
  180. {foreach item=group from=$allGroups}
  181. <option value="{$group|escape}"{if in_array($group, $visibleBy)} selected="selected"{/if}>{$group|escape}</option>
  182. {/foreach}
  183. </select><br />
  184. {tr}Editable by:{/tr}
  185. <select name="editableBy[]" size="3" multiple>
  186. <option value="">&nbsp;</option>
  187. {foreach item=group from=$allGroups}
  188. <option value="{$group|escape}"{if in_array($group, $editableBy)} selected="selected"{/if}>{$group|escape}</option>
  189. {/foreach}
  190. </select>
  191. </td></tr>
  192. <tr class="formcolor"><td>{tr}Description{/tr}:
  193. </td><td><div id='zDescription' {if $type eq 'S'}style="display:none;"{else}style="display:block;"{/if}style="display:block;" >{if $type ne 'S'}{tr}Description text is wiki-parsed:{/tr} <input type="checkbox" name="descriptionIsParsed" {if $descriptionIsParsed eq 'y'}checked="checked"{/if} />{/if}
  194. <textarea style="width:95%;" rows="4" name="description">{$description|escape}</textarea></div>
  195. <div id='zStaticText' {if $type neq 'S'}style="display:none;"{/if}>
  196. <div id="zStaticTextToolbars" {if $type neq 'S'}style="display:none;"{/if}>
  197.     {toolbars qtnum="staticText" area_name="staticTextArea"}
  198. </div>
  199. <textarea id="staticTextArea" name="descriptionStaticText" rows="20" cols="80" >{$description|escape}</textarea></div></td></tr>
  200. <tr class="formcolor"><td>{tr}Error message:{/tr}</td><td><input type="text" name="errorMsg" value="{$errorMsg|escape}" /></td></tr>
  201. <tr class="formcolor"><td>&nbsp;</td><td><input type="submit" name="save" value="{tr}Save{/tr}" /></td></tr>
  202. </table>
  203. </form>
  204. {/tab}
  205.  
  206.  
  207. {tab name="{tr}Import/Export Trackers Fields{/tr}"}
  208.  
  209. <form action="tiki-admin_tracker_fields.php" method="post">
  210. {if $find}<input type="hidden" name="find" value="{$find|escape}" />{/if}
  211. {if $max and $max ne $prefs.maxRecords}<input type="hidden" name="max" value="{$max|escape}" />{/if}
  212. {if $offset}<input type="hidden" name="offset" value="{$offset|escape}" />{/if}
  213. {if $sort_mode}<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />{/if}
  214. <input type="hidden" name="trackerId" value="{$trackerId|escape}" />
  215. {tr}Export fieldId also{/tr}
  216. <input type="checkbox" name="exportAll"{if $export_all eq 'y'} checked="checked"{/if}/>
  217. <input type="submit" name="refresh" value="{tr}Refresh{/tr}" />
  218. {remarksbox}{tr}Check the box to re-import in this tracker and change the fields.{/tr}<br />{tr}Uncheck the box to import in another database.{/tr}{/remarksbox}
  219. </form>
  220.  
  221. <form action="tiki-admin_tracker_fields.php" method="post">
  222. {if $find}<input type="hidden" name="find" value="{$find|escape}" />{/if}
  223. {if $max and $max ne $prefs.maxRecords}<input type="hidden" name="max" value="{$max|escape}" />{/if}
  224. {if $offset}<input type="hidden" name="offset" value="{$offset|escape}" />{/if}
  225. {if $sort_mode}<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />{/if}
  226. <input type="hidden" name="trackerId" value="{$trackerId|escape}" />
  227. <input type="hidden" name="import" value="1" />
  228. <textarea name="rawmeat" cols="62" rows="32" wrap="soft">
  229. {section name=user loop=$channels}
  230. {if $tracker_info.useRatings ne 'y' or $channels[user].name ne "Rating"}
  231. [FIELD{$channels[user].fieldId}]
  232. {if $export_all eq 'y'}
  233. fieldId = {$channels[user].fieldId}
  234. {/if}
  235. name = {$channels[user].name|escape}
  236. position = {$channels[user].position}
  237. type = {$channels[user].type}
  238. options = {$channels[user].options}
  239. isMain = {$channels[user].isMain}
  240. isTblVisible = {$channels[user].isTblVisible}
  241. isSearchable = {$channels[user].isSearchable}
  242. isPublic = {$channels[user].isPublic}
  243. isHidden = {$channels[user].isHidden}
  244. isMandatory = {$channels[user].isMandatory}
  245. {if $channels[user].type eq 'S'}descriptionStaticText = {$channels[user].descriptionStaticText}{else}description = {$channels[user].description}
  246. descriptionIsParsed = {$channels[user].descriptionIsParsed}{/if}
  247.  
  248. {/if}
  249. {/section}
  250. </textarea><br />
  251. <input type="submit" name="save" value="{tr}Import{/tr}" />
  252. </form>
  253. {/tab}
  254. {/tabset}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement