{* $Id$ *} {title help="Comments" admpage="comments"}{$title}{/title} {if $comments or ($find ne '') or count($show_types) gt 0 or isset($smarty.request.findfilter_approved)} {include file='find.tpl' types=$show_types find_type=$selected_types types_tag='checkbox' filters=$filters filter_names=$filter_names filter_values=$filter_values} {/if} {if $comments}
{ticket} {query _type='form_input'} {/if} {assign var=numbercol value=2}
{*the table-responsive class cuts off dropdown menus *} {if $comments} {/if} {foreach key=headerKey item=headerName from=$headers} {/foreach} {if $tiki_p_admin_comments eq 'y' and $prefs.feature_comments_moderation eq 'y'} {/if} {section name=ix loop=$comments}{assign var=id value=$comments[ix].threadId} {foreach key=headerKey item=headerName from=$headers}{assign var=val value=$comments[ix].$headerKey} {/foreach} {if $tiki_p_admin_comments eq 'y' and $prefs.feature_comments_moderation eq 'y'} {jq}$(".moderation-post").click(function () { let $this = $(this), $form = $this.parents("form"); $form.find("select[name=action]").val($this.data("action")); $this.parents("tr:first").tikiModal(tr("Saving...")).find("input[type=checkbox]").prop("checked", true); $form.submit(); return false; });{/jq} {/if} {sectionelse} {norecords _colspan=$numbercol} {/section}
{select_all checkbox_names='checked[]'} {assign var=numbercol value=$numbercol+1} {assign var=numbercol value=$numbercol+1} {self_link _sort_arg="sort_mode" _sort_field=$headerKey}{tr}{$headerName}{/tr}{/self_link} {assign var=numbercol value=$numbercol+1} {self_link _sort_arg="sort_mode" _sort_field='approved'}{tr}Approval{/tr}{/self_link}
{actions} {strip} {icon name='view' _menu_text='y' _menu_icon='y' alt="{tr}View{/tr}"} {icon name='edit' _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"} {if $tiki_p_admin_comments eq 'y' and $prefs.comments_archive eq 'y'} {if $comments[ix].archived eq 'y'} {ticket} {else}
{ticket}
{/if} {/if} {icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Delete{/tr}"} {/strip} {/actions}
{* span is used for some themes CSS opacity on some cells content *} {if $headerKey eq 'title'} {if !empty($val)} {$val|truncate:50:"...":true|escape} {else} {tr}(no title){/tr} {/if} {elseif $headerKey eq 'objectType'} {tr}{$val|ucwords}{/tr} {elseif $headerKey eq 'object'} {$val|truncate:50:"...":true|escape} {elseif $headerKey eq 'data'} {$val|truncate:90:"...":true|escape} {elseif $headerKey eq 'commentDate'} {$val|tiki_short_datetime} {elseif $headerKey eq 'userName'} {$val|userlink} {else} {$val} {/if} {if $comments[ix].approved eq 'n'} {icon name='ok'} {icon name='delete'} {elseif $comments[ix].approved eq 'y'}  {tr}Approved{/tr}  {elseif $comments[ix].approved eq 'r'}  {tr}Rejected{/tr}  {/if} {actions title="{tr}More Information{/tr}" icon="information"} {strip} {foreach from=$more_info_headers key=headerKey item=headerName} {if (isset($comments[ix].$headerKey))} {assign var=val value=$comments[ix].$headerKey} {tr}{$headerName}{/tr}: {$val}
{/if} {/foreach} {/strip} {/actions}
{if $comments}
{/if} {pagination_links cant=$cant step=$maxRecords offset=$offset}{/pagination_links}