root/trunk/Vanilla/templates/vanilla+comments/comment_preview.mtml @ 986

Revision 986, 6.4 kB (checked in by bsmith, 15 months ago)

adding loggedin state for comment preview and comment response templates

Line 
1<mt:IncludeBlock module="Wrapper">
2   
3    <mt:setvarblock name="html_head" append="1">
4        <style type="text/css" media="screen">
5            form {
6                width: 50%;
7            }
8        </style>
9        <script type="text/javascript">
10        /* <![CDATA[ */
11        var user = <$mt:UserSessionState$>;
12        var is_preview = true;
13        /* ]]> */
14        </script>
15    </mt:SetVarBlock>
16
17    <h1><__trans phrase="Previewing your Comment"></h1>
18
19    <div id="comments">
20       
21        <ol class="comments-content">
22            <li>
23                <div class="comment-header">
24                    <$mt:CommentAuthorIdentity$>
25                    <mt:IfCommentParent>
26                        <__trans phrase="[_1] replied to [_2]<a href="[_3]">comment from [_4]</a>[_5]" params="<$mt:CommentAuthorLink$>%%<mt:CommentParent>%%<$mt:CommentLink$>%%<$mt:CommentAuthor$>%%</mt:CommentParent>">
27                    <mt:Else>
28                        <$mt:CommentAuthorLink$>
29                    </mt:IfCommentParent>
30                    | <a href="<$mt:CommentLink$>"><abbr class="published" title="<$mt:CommentDate format_name="iso8601"$>"><$mt:CommentDate$></abbr></a>
31                </div>
32                <div class="comment-body">
33                    <$mt:CommentBody$>
34                </div>
35            </li>
36        </ol>
37
38        <mt:IfCommentsAccepted>
39        <div id="comments-open">
40            <h2 class="comments-open-header"><__trans phrase="Leave a comment"></h2>
41            <div class="comments-open-content">
42                <div id="comment-greeting"></div>
43                <form method="post" action="<$mt:CGIPath$><$mt:CommentScript$>" name="comments_form" id="comments-form" onsubmit="return mtCommentOnSubmit(this)">
44                    <input type="hidden" name="static" value="1" />
45                    <input type="hidden" name="entry_id" value="<$mt:EntryID$>" />
46                    <input type="hidden" name="__lang" value="<$mt:BlogLanguage$>" />
47                    <input type="hidden" name="parent_id" value="<$mt:CommentParentID$>" id="comment-parent-id" />
48                    <input type="hidden" name="armor" value="1" />
49                    <input type="hidden" name="preview" value="" />
50                    <input type="hidden" name="sid" value="" />
51                    <div id="comments-open-data">
52                        <div>
53                            <label for="comment-author"><__trans phrase="Name"></label>
54                            <input id="comment-author" name="author" size="30" value="<$mt:CommentAuthor encode_html="1"$>" onfocus="mtCommentFormOnFocus()" />
55                        </div>
56                        <div>
57                            <label for="comment-email"><__trans phrase="Email Address"></label>
58                            <input id="comment-email" name="email" size="30" value="<$mt:CommentEmail encode_html="1"$>" onfocus="mtCommentFormOnFocus()" />
59                        </div>
60                        <div>
61                            <label for="comment-url"><__trans phrase="URL"></label>
62                            <input id="comment-url" name="url" size="30" value="<$mt:CommentURL encode_html="1"$>" onfocus="mtCommentFormOnFocus()" />
63                        </div>
64                    </div>
65                    <div id="comment-form-reply"<mt:IfCommentParent><mt:Else> style="display:none"</mt:IfCommentParent>>
66                        <input type="checkbox" id="comment-reply" name="comment_reply" value="<$mt:CommentParentID$>"<mt:IfCommentParent> checked="checked"</mt:IfCommentParent> onclick="mtSetCommentParentID()" />
67                        <label for="comment-reply" id="comment-reply-label"><mt:IfCommentParent><__trans phrase="Replying to comment from [_1]" params="<mt:CommentParent><$mt:CommentAuthor$></mt:CommentParent>"></mt:IfCommentParent></label>
68                    </div>
69                    <div id="comments-open-text">
70                        <label for="comment-text"><__trans phrase="Comments">
71                        <mt:IfAllowCommentHTML><__trans phrase="(You may use HTML tags for style)"></mt:IfAllowCommentHTML></label>
72                        <textarea id="comment-text" name="text" rows="15" cols="50" onfocus="mtCommentFormOnFocus()"><$mt:CommentBody autolink="0" sanitize="0" convert_breaks="0" encode_html="1"$></textarea>
73                    </div>
74                    <div id="comments-open-captcha"></div>
75                    <div id="comments-open-footer">
76                        <input type="submit" accesskey="v" name="preview_button" id="comment-preview" value="<__trans phrase="Preview">" onclick="this.form.preview.value='1';" />
77                        <input type="submit" accesskey="s" name="post" id="comment-submit" value="<__trans phrase="Submit">" />
78                        <input type="button" name="cancel" id="comment-cancel" value="<__trans phrase="Cancel">" onclick="window.location='<$mt:EntryPermalink$>'" />
79                    </div>
80                </form>
81            </div>
82        </div>
83        <script type="text/javascript">
84        <!--
85        mtAttachEvent("load", mtEntryOnLoad);
86        mtAttachEvent("unload", mtEntryOnUnload);
87        //-->
88        </script>
89        </mt:IfCommentsAccepted>
90
91        <mt:Comments>
92            <mt:CommentsHeader>
93        <h2 class="comments-header"><__trans phrase="Comments"></h2>
94        <ol class="comments-content">
95            </mt:CommentsHeader>
96            <li id="comment-<$mt:CommentID$>">
97                <div class="comment-header">
98                    <$mt:CommentAuthorIdentity$>
99                    <mt:IfCommentParent>
100                        <__trans phrase="[_1] replied to [_2]<a href="[_3]">comment from [_4]</a>[_5]" params="<$mt:CommentAuthorLink$>%%<mt:CommentParent>%%<$mt:CommentLink$>%%<$mt:CommentAuthor$>%%</mt:CommentParent>">
101                    <mt:Else>
102                        <$mt:CommentAuthorLink$>
103                    </mt:IfCommentParent>
104                    | <a href="<$mt:CommentLink$>"><abbr class="published" title="<$mt:CommentDate format_name="iso8601"$>"><$mt:CommentDate$></abbr></a>
105                    <mt:IfCommentsAccepted>
106                    | <$mt:CommentReplyToLink$>
107                    </mt:IfCommentsAccepted>
108                </div>
109                <div class="comment-body">
110                    <$mt:CommentBody$>
111                </div>
112            </li>
113            <mt:CommentsFooter>
114        </ol>
115            </mt:CommentsFooter>
116        </mt:Comments>
117
118    </div>
119
120</mt:IncludeBlock>
Note: See TracBrowser for help on using the browser.