<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="log-message primary-col"><__trans phrase="Log Message"></th>
        <mt:unless name="is_blog">
            <th class="blog">
              <__trans phrase="Website/Blog">
            </th>
        </mt:unless>
            <th class="action-by"><__trans phrase="_LOG_TABLE_BY"></th>
            <th class="datetime"><__trans phrase="Date"></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="log-message">
    <mt:if name="log_detail">
                <span class="toggle-button" title="<__trans phrase="Show Datail">"><img alt="<__trans phrase="Show Datail">" src="<mt:var name="static_uri">/images/spinner-big-bottom.gif" /></span>
    </mt:if>
                <$mt:var name="log_message" escape="html"$><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="blog">
                <a href="<$mt:var name="script_url"$>?__mode=view_log&amp;blog_id=<$mt:var name="blog_id"$>"><$mt:var name="weblog_name" escape="html"$></a>
            </td>
    </mt:unless >
            <td class="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="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 colspan="<mt:unless name="is_blog">4<mt:else>3</mt:unless>">
              <pre><samp><$mt:var name="log_detail" escape="html"$></samp></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>

