<mt:setvarblock name="page_title"><__trans phrase="Edit Comment"></mt:setvarblock>
<$mt:setvar name="position_actions_bottom" value="1"$>
<mt:setvarblock name="system_msg">
    <mt:if name="saved">
        <mtapp:statusmsg
           id="saved"
            class="success">
            <__trans phrase="Your changes have been saved.">
        </mtapp:statusmsg>
    </mt:if>
    <mt:if name="approved">
        <mtapp:statusmsg
            id="approved"
            class="success">
            <__trans phrase="The comment has been approved.">
        </mtapp:statusmsg>
    </mt:if>
    <mt:if name="error">
        <mtapp:statusmsg
            id="generic-error"
            class="error">
            <mt:var name="error">
        </mtapp:statusmsg>
    </mt:if>
</mt:setvarblock>
<mt:setvartemplate name="action_buttons">
    <button
        type="submit"
        accesskey="s"
        title="<__trans phrase="Save changes to this comment (s)">"
        class="save action primary-button"
        ><__trans phrase="Save Changes"></button>
    <button
        onclick="doRemoveItems(this.form, '<__trans phrase="comment">', '<__trans phrase="comments">', 'id', {'return_args' : '__mode=list_comment&amp;blog_id=<mt:var name="blog_id">'})"
        type="submit"
        accesskey="x"
        title="<__trans phrase="Delete this comment (x)">"
        class="delete action"
        ><__trans phrase="Delete"></button>
    <mt:if name="is_ip_filter">
        <mt:if name="blog_id">
    <button
        onclick="doBanIP('<mt:var name="filter_val" escape="js">', '<mt:var name="blog_id">', '<mt:var name="magic_token">')"
        class="action">
        ><__trans phrase="Ban This IP"></button>
        </mt:if>
    </mt:if>
</mt:setvartemplate>
<mt:setvarblock name="related_content">
    <mtapp:widget
        id="useful-links"
        label="<__trans phrase="Useful links">">
        <ul>
            <li><a href="<mt:var name="script_url">?__mode=list_comment&amp;blog_id=<mt:var name="blog_id" escape="url">"><__trans phrase="Manage Comments"></a></li>
            <li><mt:if name="entry_permalink"><a href="<mt:var name="entry_permalink">" target="<__trans phrase="_external_link_target">"><__trans phrase="View [_1] comment was left on" params="<mt:var name="entry_class_label" lower_case="1">"></a></mt:if></li>
        <mt:if name="comment_approved">
            <li><a href="<mt:var name="script_url">?__mode=dialog_post_comment&amp;reply_to=<mt:var name="id" escape="url">&amp;magic_token=<mt:var name="magic_token" escape="url">&amp;blog_id=<mt:var name="blog_id" escape="url">&amp;return_args=<mt:var name="return_args" escape="url">" class="mt-open-dialog"><__trans phrase="Reply to this comment"></a></li>
        </mt:if>
        </ul>
    </mtapp:widget>
    <$mtapp:PageActions$>
</mt:setvarblock>

<mt:setvarblock name="object_nav">
    <ul class="object-nav">
        <li id="previous-link"><mt:if name="previous_comment_id"><a href="<mt:var name="script_url">?__mode=view&amp;_type=comment&amp;id=<mt:var name="previous_comment_id" escape="url">&amp;blog_id=<mt:var name="blog_id" escape="url">"><__trans phrase="Previous"></a><mt:else><span><__trans phrase="Previous"></span></mt:if></li>
        <li id="next-link"><mt:if name="next_comment_id"><a href="<mt:var name="script_url">?__mode=view&amp;_type=comment&amp;id=<mt:var name="next_comment_id" escape="url">&amp;blog_id=<mt:var name="blog_id" escape="url">"><__trans phrase="Next"></a><mt:else><span><__trans phrase="Next"></span></mt:if></li>
    </ul>
</mt:setvarblock>

<mt:include name="include/header.tmpl">

<form method="post" action="<mt:var name="script_url">">
    <input type="hidden" name="id" value="<mt:var name="id" escape="html">" />
    <input type="hidden" name="blog_id" value="<mt:var name="blog_id" escape="html">" />
    <input type="hidden" name="__mode" value="save" />
    <input type="hidden" name="action_name" value="" />
    <input type="hidden" name="itemset_action_input" value="" />
    <input type="hidden" name="_type" value="comment" />
    <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
    <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />

<mt:if name="position_actions_top">
    <mt:include name="include/actions_bar.tmpl" bar_position="top" hide_pager="1">
</mt:if>

<mt:if name="comment_pending">
    <$mt:setvar name="comment_status" value="comment-status-unapproved"$>
<mt:else>
    <mt:if name="is_junk">
        <$mt:setvar name="comment_status" value="comment-status-spam"$>
    <mt:else>
        <$mt:setvar name="comment_status" value="comment-status-approved"$>
    </mt:if>
</mt:if>

    <mtapp:setting
        id="status"
        label="<__trans phrase="Status">"
        label_class="left-label <$mt:var name="comment_status"$>"
        hint="<__trans phrase="Update the status of this comment">"
        show_hint="0">
        <mt:if name="has_publish_access">
        <select id="status" name="status" class="comment-status">
            <option value="publish" <mt:if name="comment_approved">selected="selected"</mt:if>><__trans phrase="Approved"></option>
            <option value="moderate" <mt:if name="comment_pending">selected="selected"</mt:if>><__trans phrase="Unapproved"></option>
            <option value="junk" <mt:if name="is_junk">selected="selected"</mt:if>><__trans phrase="Reported as Spam"></option>
        </select>
        <mt:else>
            <mt:if name="comment_approved">
        <span><__trans phrase="Approved"></span><input type="hidden" name="status" value="publish" />
        <mt:else>
            <mt:if name="comment_pending">
        <span><__trans phrase="Unapproved"></span><input type="hidden" name="status" value="moderate" />
            <mt:else>
                <mt:if name="is_junk">
        <span><__trans phrase="Reported as Spam"></span><input type="hidden" name="status" value="junk" />
                </mt:if>
            </mt:if>
        </mt:if>
        </mt:if>
        <a title="<__trans phrase="View all comments with this status">" href="<mt:var name="script_url">?__mode=list_comment&amp;blog_id=<mt:var name="blog_id">&amp;filter=status&amp;filter_val=<mt:if name="comment_approved">approved</mt:if><mt:if name="comment_pending">pending</mt:if><mt:if name="is_junk">junk</mt:if>"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a>

        <mt:if name="junk_log_loop">
        <div class="comment-spam-info">
            <a href="javascript:void(0)" onclick="toggleHidden('comment-feedback-rating'); toggleActive('spam-details-toggle'); return true" id="spam-details-toggle"><__trans phrase="Details"></a>
        </div>
        <div id="comment-feedback-rating" class="hidden">
            <strong><__trans phrase="Total Feedback Rating: [_1]" params="<$mt:var name="junk_score"$>"></strong>
            <div id="spam-log-listing" class="listing">
                <table class="spam-log-listing-table" cellspacing="0">
                    <thead>
                    <tr>
                        <th id="jl-test"><__trans phrase="Test"></th>
                        <th id="jl-score"><__trans phrase="Score"></th>
                        <th id="jl-results"><__trans phrase="Results"></th>
                    </tr>
                    </thead>
                    <tbody>
            <mt:loop name="junk_log_loop">
                    <tr valign="top" class="<mt:if name="__odd__">odd<mt:else>even</mt:if>">
                        <td><mt:var name="test" escape="html"></td>
                        <td><mt:var name="score"></td>
                        <td><mt:var name="log"></td>
                    </tr>
            </mt:loop>
                    </tbody>
                </table>
            </div>
        </div>
        </mt:if>
    </mtapp:setting>

    <mtapp:setting
        id="author"
        label="<__trans phrase="Commenter">"
        content_class="field-content-text"
        hint="<__trans phrase="The name of the person who posted the comment">"
        show_hint="0">
    <mt:if name="commenter_id">

        <mt:if name="auth_icon_url">
        <img style="background-image: none" src="<mt:var name="auth_icon_url">" height="9" width="9" alt="" border="0" />
        </mt:if>

        <mt:if name="commenter_approved">
            <mt:if name="commenter_url">
        <a href="<mt:var name="commenter_url">" class="commenter-link"><mt:var name="author" escape="html"></a>
            <mt:else>
        <mt:var name="nickname" escape="html"><mt:var name="author" escape="html">
            </mt:if>

            <mt:if name="can_edit_commenters">
        <a href="<mt:var name="script_url">?__mode=view&amp;_type=commenter&amp;blog_id=<mt:var name="blog_id">&amp;id=<mt:var name="commenter_id">" class="commenter-detail-link" title="<__trans phrase="View this commenter detail">">
            <img src="<mt:var name="static_uri">images/status_icons/trusted.gif" alt="<__trans phrase="Trusted">" />
        </a>
            <mt:else>
        <img src="<mt:var name="static_uri">images/status_icons/trusted.gif" alt="<__trans phrase="Trusted">" />
            </mt:if>
        <span class="hint"><__trans phrase="(Trusted)"></span>

            <mt:unless name="is_mine">
        <span class="commenter-actions">
                <mt:unless name="type_author">
            <a href="<mt:var name="script_url">?__mode=save_commenter_perm&amp;action=untrust&amp;blog_id=<mt:var name="blog_id">&amp;commenter_id=<mt:var name="commenter_id">&amp;return_args=<mt:var name="return_args" escape="url">&amp;magic_token=<mt:var name="magic_token">" class="button commenter-neutral"><__trans phrase="Untrust Commenter"></a>
                </mt:unless>
            <a href="<mt:var name="script_url">?__mode=save_commenter_perm&amp;action=ban&amp;blog_id=<mt:var name="blog_id">&amp;commenter_id=<mt:var name="commenter_id">&amp;return_args=<mt:var name="return_args" escape="url">&amp;magic_token=<mt:var name="magic_token">" class="button commenter-ban"><__trans phrase="Ban Commenter"></a>
        </span>
            </mt:unless>

        <mt:else name="commenter_banned">
            <mt:if name="commenter_url">
        <a href="<mt:var name="commenter_url">" class="commenter-link"><mt:var name="author" escape="html"></a>
            <mt:else>
        <mt:var name="nickname" escape="html"><mt:var name="author" escape="html">
            </mt:if>

            <mt:if name="can_edit_commenters">
        <a href="<mt:var name="script_url">?__mode=view&amp;_type=commenter&amp;blog_id=<mt:var name="blog_id">&amp;id=<mt:var name="commenter_id">" class="commenter-detail-link"  title="<__trans phrase="View this commenter detail">">
            <img src="<mt:var name="static_uri">images/status_icons/banned.gif" alt="<__trans phrase="Banned">" />
        </a>
            <mt:else>
        <img src="<mt:var name="static_uri">images/status_icons/banned.gif" alt="<__trans phrase="Banned">" />
            </mt:if>
        <span class="hint"><__trans phrase="(Banned)"></span>

            <mt:unless name="is_mine">
        <span class="commenter-actions">
                <mt:unless name="type_author">
            <a href="<mt:var name="script_url">?__mode=save_commenter_perm&amp;action=trust&amp;blog_id=<mt:var name="blog_id">&amp;commenter_id=<mt:var name="commenter_id">&amp;return_args=<mt:var name="return_args" escape="url">&amp;magic_token=<mt:var name="magic_token">" class="button commenter-trust"><__trans phrase="Trust Commenter"></a>
                </mt:unless>
            <a href="<mt:var name="script_url">?__mode=save_commenter_perm&amp;action=unban&amp;blog_id=<mt:var name="blog_id">&amp;commenter_id=<mt:var name="commenter_id">&amp;return_args=<mt:var name="return_args" escape="url">&amp;magic_token=<mt:var name="magic_token">" class="button commenter-neutral"><__trans phrase="Unban Commenter"></a>
        </span>
            </mt:unless>

        <mt:else>
            <mt:if name="commenter_url">
        <a href="<mt:var name="commenter_url">" class="commenter-link"><mt:var name="author" escape="html"></a>
            <mt:else>
        <mt:var name="nickname" escape="html"><mt:var name="author" escape="html">
            </mt:if>

            <mt:if name="can_edit_commenters">
        <a href="<mt:var name="script_url">?__mode=view&amp;_type=commenter&amp;blog_id=<mt:var name="blog_id">&amp;id=<mt:var name="commenter_id">" class="commenter-detail-link" title="<__trans phrase="View this commenter detail">">
            <img src="<mt:var name="static_uri">images/status_icons/authenticated.gif" alt="<__trans phrase="Pending">" />
        </a>
            <mt:else>
        <img src="<mt:var name="static_uri">images/status_icons/authenticated.gif" alt="<__trans phrase="Pending">" />
            </mt:if>
        <span class="hint"><__trans phrase="(Pending)"></span>

            <mt:unless name="is_mine">
        <span class="commenter-actions">
                <mt:unless name="type_author">
            <a href="<mt:var name="script_url">?__mode=save_commenter_perm&amp;action=trust&amp;blog_id=<mt:var name="blog_id">&amp;commenter_id=<mt:var name="commenter_id">&amp;return_args=<mt:var name="return_args" escape="url">&amp;magic_token=<mt:var name="magic_token">" class="button commenter-trust"><__trans phrase="Trust Commenter"></a>
                </mt:unless>
            <a href="<mt:var name="script_url">?__mode=save_commenter_perm&amp;action=ban&amp;blog_id=<mt:var name="blog_id">&amp;commenter_id=<mt:var name="commenter_id">&amp;return_args=<mt:var name="return_args" escape="url">&amp;magic_token=<mt:var name="magic_token">" class="button commenter-ban"><__trans phrase="Ban Commenter"></a>
        </span>
            </mt:unless>

        </mt:if>

    <mt:else>
        <input type="text" name="author" id="author" value="<mt:var name="author" escape="html">" />
    </mt:if>

    <mt:if name="commenter_id">
        <a title="<__trans phrase="View all comments by this commenter">" href="<mt:var name="script_url">?__mode=list&amp;_type=comment&amp;filter_key=_comments_by_user&amp;blog_id=<mt:var name="blog_id">&amp;filter_val=<mt:var name="commenter_id" escape="html">"><img src="<mt:var name="static_uri">images/filter.gif" alt="" width="8" height="8" /></a>
    <mt:else>
        <a title="<__trans phrase="View all comments by this commenter">" href="<mt:var name="script_url">?__mode=search_replace&amp;_type=comment&amp;blog_id=<mt:var name="blog_id">&amp;is_limited=1&amp;search_cols=author&amp;search=<mt:var name="author" escape="html">&amp;do_search=1"><img src="<mt:var name="static_uri">images/filter.gif" alt="" width="8" height="8" /></a>
    </mt:if>
    </mtapp:setting>

        <mt:if name="email">
            <$mt:setvar name="email_content_class" value="field-content-text"$>
        <mt:else>
            <mt:if name="commenter_id">
                <$mt:setvar name="email_content_class" value="field-content-text"$>
            </mt:if>
        </mt:if>
        <mtapp:setting
            id="email"
            label="<__trans phrase="Email">"
            hint="<__trans phrase="Email address of commenter">"
            content_class="$email_content_class"
            show_hint="0">
            <mt:if name="commenter_id">
                <mt:if name="email">
                    <a href="mailto:<mt:var name="email" escape="html">" title="<mt:var name="email" escape="html">"><mt:var name="email" escape="html"></a>
                <mt:else>
                    <em><__trans phrase="Unavailable for OpenID user"></em>
                </mt:if>
            <mt:else>
                <input type="text" name="email" id="email" value="<mt:var name="email" escape="html">" />
            </mt:if>
            <mt:if name="email">
                <a href="mailto:<mt:var name="email" escape="html">" title="<mt:var name="email" escape="html">"><img src="<mt:var name="static_uri">images/status_icons/email.gif" alt="<__trans phrase="Email">" width="16" height="9" /></a>
                <a title="<__trans phrase="View all comments with this email address">" href="<mt:var name="script_url">?__mode=search_replace&amp;_type=comment&amp;blog_id=<mt:var name="blog_id">&amp;search=<mt:var name="email" escape="url">&amp;do_search=1"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a>
            </mt:if>
        </mtapp:setting>

        <mt:if name="url">
            <$mt:setvar name="url_content_class" value="field-content-text"$>
        </mt:if>
        <mtapp:setting
            id="url"
            label="<__trans phrase="URL">"
            hint="<__trans phrase="URL of commenter">"
            content_class="$url_content_class"
            show_hint="0">
            <mt:if name="commenter_id">
                <mt:if name="url">
                    <a href="<mt:var name="url" escape="html">"><$mt:Var name="url" escape="html"$></a>
                <mt:else>
                    <__trans phrase="No url in profile">
                </mt:if>
            <mt:else>
                <input type="text" name="url" id="url" value="<mt:var name="url" escape="html">" />
            </mt:if>
            <mt:if name="url">
                <a href="<mt:var name="url" escape="html">" title="<mt:var name="url" escape="html">"><img src="<mt:var name="static_uri">images/status_icons/link.gif" alt="<__trans phrase="Link">" width="16" height="9" /></a>
                <mt:unless name="commenter_id">
                <a title="<__trans phrase="View all comments with this URL">" href="<mt:var name="script_url">?__mode=search_replace&amp;blog_id=<mt:var name="blog_id" escape="url">&amp;_type=comment&amp;search=<mt:var name="url" escape="url">&amp;do_search=1"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a>
                </mt:unless>
            </mt:if>
        </mtapp:setting>

    <mtapp:setting
        id="entry"
        label="$entry_class_label"
        content_class="field-content-text"
        hint="<__trans phrase="[_1] this comment was made on" params="$entry_class_label">"
        show_hint="0">
        <mt:if name="no_entry">[<__trans phrase="[_1] no longer exists" params="<mt:var name="entry_class_label">">]<mt:else><a href="<mt:var name="script_url">?__mode=view&amp;_type=<mt:var name="entry_class" escape="url">&amp;id=<mt:var name="entry_id" escape="url">&amp;blog_id=<mt:var name="blog_id" escape="url">"><mt:var name="entry_title" escape="html"></a></mt:if>
        <a title="<__trans phrase="View all comments on this [_1]" params="<mt:var name="entry_class_label" lower_case="1">">" href="<mt:var name="script_url">?__mode=list&amp;_type=comment&amp;blog_id=<mt:var name="blog_id">&amp;filter_key=_comments_by_entry&amp;filter_val=<mt:var name="entry_id" escape="url">"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a>
    </mtapp:setting>

    <mtapp:setting
        id="date"
        label="<__trans phrase="Date">"
        content_class="field-content-text"
        hint="<__trans phrase="Date this comment was made">"
        show_hint="0">
        <mt:var name="created_on_time_formatted">
        <a title="<__trans phrase="View all comments created on this day">" href="<mt:var name="script_url">?__mode=search_replace&amp;_type=comment&amp;from=<mt:date ts="$created_on" format="%Y%m%d">&amp;to=<mt:date ts="$created_on" format="%Y%m%d">&amp;show_all=1&amp;blog_id=<mt:var name="blog_id">&amp;do_search=1"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a>
    </mtapp:setting>
    
    <mtapp:setting
        id="ip"
        label="<__trans phrase="IP">"
        content_class="field-content-text"
        hint="<__trans phrase="IP Address of the commenter">"
        show_hint="0">
        <mt:var name="ip" escape="html">
        <a title="<__trans phrase="View all comments from this IP address">" href="<mt:var name="script_url">?__mode=search_replace&amp;_type=comment&amp;blog_id=<mt:var name="blog_id">&amp;is_limited=1&amp;search_cols=ip&amp;search=<mt:var name="ip" escape="html">&amp;do_search=1"><img alt="" src="<mt:var name="static_uri">images/filter.gif" width="8" height="8" border="0" /></a>
    </mtapp:setting>
    
    <mtapp:setting
        id="text"
        label="<__trans phrase="Comment Text">"
        hint="<__trans phrase="Fulltext of the comment entry">"
        show_hint="0">
        <textarea rows="" cols="" name="text" id="text" class="full-width medium"><mt:var name="text" escape="html"></textarea>
    </mtapp:setting>

<mt:if name="position_actions_bottom">
    <mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1">
</mt:if>

</form>

<mt:ignore>
                                <mt:if name="object_loop">
                                <h2><__trans phrase="Responses to this comment"></h2>
                                <mt:include name="include/comment_table.tmpl">
                                </mt:if>
</mt:ignore>

<mt:include name="include/footer.tmpl">
