{* $Id$ *} {title url=$trackerId|sefurl:'tracker' adm="trackers"}{tr}{$tracker_info.name}{/tr}{/title} {if !empty($tracker_info.description)} {if $tracker_info.descriptionIsParsed eq 'y'}
{tr _0=$tracker_sync.provider|cat:'/tracker'|cat:$tracker_sync.source}This tracker is a remote copy of %0.{/tr} {if $tracker_sync.last} {tr _0=$tracker_sync.last|tiki_short_date}It was last updated on %0.{/tr} {/if}
{permission name=tiki_p_admin_trackers} {jq} $('.sync-refresh').submit(function () { var form = this; $.ajax({ type: 'post', url: $(form).attr('action'), dataType: 'json', data: $(form).serialize(), error: function (jqxhr) { $(':submit', form).showError(jqxhr); }, success: function () { document.location.reload(); } }); return false; }); $('.load-items').closest('form').each(function () { var form = this; $(form).hide(); $.getJSON($(this).attr('action'), function (data) { $.each(data.sets, function (k, name) { var list = $(form).find('.load-items.' + name)[0]; $.each(data[name], function (k, info) { var li = $(''); li.append($('') .text(info.title) .prepend($('').attr('value', info.itemId)) ); $.each({localUrl: "{tr}Local{/tr}", remoteUrl: "{tr}Remote{/tr}"}, function (key, label) { if (info[key]) { li .append(' ') .append($('') .attr('href', info[key]) .text(label)); } }); $(list).append(li); }); if (data[name].length === 0) { $(list).closest('.item-block').hide(); } else { $(form).show(); } }); }); }); {/jq} {/permission} {/tab} {/if} {/tabset}