{* $Id$ *} {if !$viewItemPretty.override} {title help="trackers"}{$tracker_item_main_value}{/title} {/if} {if ! isset($print_page) || $print_page ne 'y'} {* --------- navigation ------ *}
{if ! $js}{/if}
{if $canModify && $prefs.tracker_legacy_insert neq 'y'} {if not empty($smarty.request.from) and $prefs.pwa_feature ne 'y'}{$from = $smarty.request.from}{else}{$from=''}{/if} {icon name="edit"} {tr}Edit{/tr} {/if} {* only include actions bar if no custom view template is assigned *} {if !$viewItemPretty.override} {include file="tracker_actions.tpl"} {/if} {* show button back only if tpl has been set with vi_tpl or ei_tpl *} {if $viewItemPretty.override and !empty($referer)} {icon name="arrow-circle-left"} {tr}Back{/tr} {/if}
{if $user and $prefs.feature_user_watches eq 'y' and $category_watched eq 'y'}
{tr}Watched by categories:{/tr} {section name=i loop=$watching_categories} {$watching_categories[i].name|escape}  {/section}
{/if} {* ------- return/next/previous tab --- *} {if $canView} {pagination_links cant=$cant|default:null offset=$offset reloff=$smarty.request.reloff|default:null itemname="{tr}Item{/tr}"} {* Do not specify an itemId in URL used for pagination, because it will use the specified itemId instead of moving to another item *} {$smarty.server.php_self|default:null}?{query itemId=NULL trackerId=$trackerId} {/pagination_links} {/if} {include file='tracker_error.tpl'} {else} {/if} {* print_page *} {tabset name='tabs_view_tracker_item' skipsingle=1 toggle=n} {* when printing, no js is called to select the tab thus no class "active" assigned (would show nothing). print=y sets this class on printing *} {tab name="{tr}View{/tr}" print=y} {* --- tab with view ------------------------------------------------------------------------- *} {* In most cases one will not want this header when viewing an item *} {*

{$tracker_info.name|escape}

*} {if $tracker_is_multilingual}
{tr}Translations{/tr}
{jq} $('.translations a').click(function () { var link = this; $(this).serviceDialog({ title: $(link).text(), data: { controller: 'translation', action: 'manage', type: 'trackeritem', source: "{{$itemId|escape}}" } }); return false; }); {/jq} {/if} {* show item *} {trackerfields mode=view trackerId=$trackerId itemId=$itemId fields=$fields itemId=$itemId viewItemPretty=$viewItemPretty.value} {* -------------------------------------------------- section with comments --- *} {if $tracker_info.useComments eq 'y' and ($tiki_p_tracker_view_comments ne 'n' or $tiki_p_comment_tracker_items ne 'n' or $canViewCommentsAsItemOwner) and $prefs.tracker_show_comments_below eq 'y'}
{jq} var id = '#comment-container-below'; $(id).comment_load($(id).data('bs-target')); $(document).ajaxComplete(function(){ $(id).tiki_popover(); $(id).applyColorbox(); }); {/jq} {/if} {/tab} {* -------------------------------------------------- tab with comments --- *} {if $tracker_info.useComments eq 'y' and ($tiki_p_tracker_view_comments ne 'n' or $tiki_p_comment_tracker_items ne 'n' or $canViewCommentsAsItemOwner) and $prefs.tracker_show_comments_below ne 'y'} {tab name="{tr}Comments{/tr} (`$comCount`)" print=n}
{jq} var id = '#comment-container'; $(id).comment_load($(id).data('bs-target')); $(document).ajaxComplete(function(){$(id).tiki_popover();}); {/jq} {/tab} {/if} {* ---------------------------------------- tab with attachments --- *} {if $tracker_info.useAttachments eq 'y' and $tiki_p_tracker_view_attachments eq 'y'} {tab name="{tr}Attachments{/tr} (`$attCount`)" print=n} {include file='attachments_tracker.tpl'} {/tab} {/if} {* --------------------------------------------------------------- tab with edit --- *} {if (! isset($print_page) || $print_page ne 'y') && $canModify && $prefs.tracker_legacy_insert eq 'y'} {tab name=$editTitle}

{tr}Edit Item{/tr}

{* Added this table tag as a nasty kludge because (after Bootstrappification) the page is breaking without it. *} {include file="tracker_validator.tpl"} {if $tiki_p_admin_trackers eq 'y' and !empty($trackers)}
{/if}
{if $special} {else} {/if} {if $from} {/if} {if $cant} {/if}
{remarksbox type="warning" title="{tr}Warning{/tr}"}{tr}Fields marked with an * are mandatory.{/tr}{/remarksbox}
{if count($fields) >= 5} {* --------------------------- to return to tracker list after saving --------- *} {if $canView} {if not empty($saveAndComment) and $saveAndComment neq 'n'} {/if} {if $canRemove} {icon name='delete' alt="{tr}Delete{/tr}"} {/if} {/if} {/if}
{* ------------------- *} {if $tracker_info.showStatus eq 'y' or ($tracker_info.showStatusAdminOnly eq 'y' and $tiki_p_admin_trackers eq 'y')}
{include file='tracker_status_input.tpl' item=$item_info form_status=edstatus}
{/if} {* no template defined in the tracker *} {if empty($editItemPretty.value)} {foreach from=$ins_fields key=ix item=cur_field}
{if empty($cur_field.options_map.labelasplaceholder)} {/if}
{trackerinput field=$cur_field item=$item_info inTable=formcolor showDescription=y}
{/foreach} {else} {* we have a preset template: it could be a wiki:myPage or a tpl:MyTpl.tpl *} {* Note: tracker plugin usally consumes a pagename or a tpl filename without a prefix of tpl: or wiki: as the tracker definition does *}
{if $editItemPretty.type eq 'wiki'} {wikiplugin _name=tracker trackerId=$trackerId itemId=$itemId view=page wiki=$editItemPretty.value formtag='n'}{/wikiplugin} {else} {wikiplugin _name=tracker trackerId=$trackerId itemId=$itemId view=page tpl=$editItemPretty.value formtag='n'}{/wikiplugin} {/if}
{/if} {if $groupforalert ne ''}
{tr}Choose users to alert{/tr}
{section name=idx loop=$listusertoalert} {if $showeachuser eq ''} {else} {$listusertoalert[idx].user} {/if} {/section}
{/if} {* -------------------- antibot code -------------------- *} {if $prefs.feature_antibot eq 'y' && $user eq ''} {include file='antibot.tpl'} {/if}
{* --------------------------- to return to tracker list after saving --------- *} {if $canView} {/if} {if not empty($saveAndComment) and $saveAndComment neq 'n'} {/if} {if $canRemove} {icon name='remove'} {/if} {if $item_info.logs.cant} {icon name='history'} {/if} {if $tiki_p_admin_trackers eq 'y' && empty($trackers)} {icon name='next'} {/if}
{* ------------------- *}
{foreach from=$ins_fields item=cur_field} {if $cur_field.type eq 'x'} {capture name=trkaction}
{section name=tl loop=$cur_field.options_array start=3} {assign var=valvar value=$cur_field.options_array[tl]|regex_replace:"/^[^:]*:/":""|escape} {if $info.$valvar eq ''} {assign var=valvar value=$cur_field.options_array[tl]|regex_replace:"/^[^\=]*\=/":""|escape} {else} {/if} {/section}
{$cur_field.name|tra}
{/capture} {assign var=trkact value=$trkact|cat:$smarty.capture.trkaction} {/if} {/foreach} {if $trkact}

{tr}Special Operations{/tr}

{$trkact} {/if}
{*important comment to delimit the zone not to highlight in a search result*} {/tab} {/if} {/tabset}

{if isset($print_page) and $print_page eq 'y' and $prefs.print_original_url_tracker eq 'y'} {tr}The original document is available at{/tr} {$base_url|escape}{$itemId|sefurl:trackeritem} {/if}