<mtapp:listing empty_message="<__trans phrase="No log records could be found." escape="html">">
<mt:if name="__first__">
  <mt:setvarblock name="table_header">
    <tr>
      <th class="col head log-message primary"><span class="col-label"><__trans phrase="Log Message"></span></th>
    <mt:unless name="is_blog">
      <th class="col head blog"><span class="col-label"><__trans phrase="Website/Blog"></span></th>
    </mt:unless>
      <th class="col head action-by"><span class="col-label"><__trans phrase="_LOG_TABLE_BY"></span></th>
      <th class="col head datetime"><span class="col-label"><__trans phrase="Date"></span></th>
    </tr>
  </mt:setvarblock>
  <thead>
    <mt:var name="table_header">
  </thead>
  <tfoot>
    <mt:var name="table_header">
  </tfoot>
  <tbody>
</mt:if>
    <tr class="<mt:if name="log_detail">log-detail-parent </mt:if><mt:if name="__odd__">odd<mt:else>even</mt:if>"<mt:if name="log_detail"> id="log-detail-parent-<$mt:var name="id"$>"</mt:if>>
      <td class="col log-message">
      <mt:if name="log_detail">
         <span class="toggle-link icon-left icon-spinner detail-link"><mt:var name="log_message" escape="html"></span>
      <mt:else>
        <mt:var name="log_message" escape="html"> 
      </mt:if>
      <mt:if name="system_overview_nav">
        <mt:if name="log_ip"> (<__trans phrase="IP: [_1]" params="<$mt:var name="log_ip"$>">)</mt:if>
      </mt:if>
      </td>
    <mt:unless name="is_blog">
      <td class="col blog">
        <a href="<$mt:var name="script_url"$>?__mode=list&amp;_type=log&amp;blog_id=<$mt:var name="blog_id"$>"><$mt:var name="weblog_name" escape="html"$></a>
      </td>
    </mt:unless>
      <td class="col action-by">
      <mt:if name="username">
        <mt:var name="username" escape="html">
      <mt:else>
        <__trans phrase="[_1]" params="<$mt:var name="log_ip"$>">
      </mt:if>
      </td>
      <td class="col datetime">
      <mt:if name="is_last">
        <a name="last"></a>
      </mt:if>
        <span title="<mt:var name="created_on_formatted">">
        <mt:if name="created_on_relative">
          <mt:if name="dates_relative">
          <mt:var name="created_on_relative">
          <mt:else>
          <mt:var name="created_on_formatted">
          </mt:if>
        <mt:else>
          <mt:var name="created_on_formatted">
        </mt:if>
        </span>
      </td>
    </tr>
  <mt:if name="log_detail">
    <tr class="log-detail hidden <mt:if name="__odd__">odd<mt:else>even</mt:if>" id="log-detail-<$mt:var name="id"$>">
      <td class="col detail" colspan="<mt:unless name="is_blog">4<mt:else>3</mt:unless>">
        <pre><code><mt:var name="log_detail" escape="html"></code></pre>
      </td>
    </tr>
  </mt:if>
<mt:if name="__last__">
  </tbody>
</mt:if>
</mtapp:listing>

<mt:setvarblock name="jq_js_include" append="1">
    jQuery('tr.log-detail-parent').click(function() {
        jQuery(this).toggleClass('active').next('tr.log-detail').toggleClass('hidden');
    });
</mt:setvarblock>

