root/branches/release-29/tmpl/cms/list_comment.tmpl @ 1309

Revision 1309, 7.7 kB (checked in by ddavis, 22 months ago)

standarize js comment tag escape. BugzID:58265

  • Property svn:keywords set to Author Date Id Revision
Line 
1<mt:setvarblock name="page_title"><__trans phrase="Manage Comments"></mt:setvarblock>
2<mt:setvarblock name="system_msg">
3    <mt:if name="saved">
4        <mtapp:statusmsg
5            id="saved"
6            class="success" rebuild="all">
7            <__trans phrase="Your changes have been saved.">
8        </mtapp:statusmsg>
9    </mt:if>
10    <mt:if name="approved">
11        <mtapp:statusmsg
12            id="approved"
13            class="success">
14            <__trans phrase="The selected comment(s) has been approved.">
15        </mtapp:statusmsg>
16    </mt:if>
17    <mt:if name="emptied">
18        <mtapp:statusmsg
19            id="emptied"
20            class="success">
21            <__trans phrase="All comments reported as spam have been removed.">
22        </mtapp:statusmsg>
23    </mt:if>
24    <mt:if name="unapproved">
25        <mtapp:statusmsg
26            id="unapproved"
27            class="success">
28            <__trans phrase="The selected comment(s) has been unapproved.">
29        </mtapp:statusmsg>
30    </mt:if>
31    <mt:if name="junked">
32        <mtapp:statusmsg
33            id="junked"
34            class="success">
35            <__trans phrase="The selected comment(s) has been reported as spam.">
36        </mtapp:statusmsg>
37    </mt:if>
38    <mt:if name="unjunked">
39        <mtapp:statusmsg
40            id="unjunked"
41            class="success">
42            <__trans phrase="The selected comment(s) has been recovered from spam.">
43        </mtapp:statusmsg>
44    </mt:if>
45    <mt:if name="saved_deleted">
46        <mtapp:statusmsg
47            id="saved-deleted"
48            class="success">
49            <__trans phrase="The selected comment(s) has been deleted from the database.">
50        </mtapp:statusmsg>
51    </mt:if>
52    <mt:if name="unauth">
53        <mtapp:statusmsg
54            id="unaugh"
55            class="alert">
56            <__trans phrase="One or more comments you selected were submitted by an unauthenticated commenter. These commenters cannot be Banned or Trusted.">
57        </mtapp:statusmsg>
58    </mt:if>
59    <mt:if name="no_junk_found">
60        <mtapp:statusmsg
61            id="no-junk-found"
62            class="info">
63            <__trans phrase="No comments appeared to be spam.">
64        </mtapp:statusmsg>
65    </mt:if>
66</mt:setvarblock>
67<mt:setvarblock name="related_content">
68    <mtapp:widget
69        id="quickfilters"
70        label="<__trans phrase="Quickfilters">">
71        <$mtapp:ListFilters$>
72    </mtapp:widget>
73    <mtapp:widget
74        id="useful-links"
75        label="<__trans phrase="Useful links">">
76        <ul>
77            <li>
78            <mt:if name="feed_url">
79                <a href="<mt:var name="feed_url" escape="html">" class="icon-feed icon-left" title="<mt:var name="feed_name" escape="html">"><__trans phrase="[_1] Feed" params="<$mt:var name="object_label_plural"$>"></a>
80            <mt:else>
81                <a href="<mt:var name="mt_url">?__mode=view&amp;_type=author&amp;id=<mt:var name="author_id">" class="icon-feed-disabled icon-left" title="<__trans phrase="[_1] (Disabled)" params="<$mt:var name="feed_name" escape="html"$>">"><__trans phrase="Set Web Services Password"></a>
82            </mt:if>
83            </li>
84        </ul>
85    </mtapp:widget>
86    <$mtapp:PageActions$>
87</mt:setvarblock>
88<mt:setvarblock name="html_body_footer">
89    <$mt:include name="include/display_options.tmpl"$>
90</mt:setvarblock>
91<mt:setvarblock name="html_head" append="1">
92<script type="text/javascript">
93/* <![CDATA[ */
94function enableFilterButton() {
95    getByID("filter-button").style.display = "inline";
96}
97
98function toggleFilter() {
99    var filterActive = getByID("filter-title");
100    if (filterActive.style.display == "none") {
101        filterActive.style.display = "block";
102        getByID("filter-select").style.display = "none";
103    } else {
104        filterActive.style.display = "none";
105        getByID("filter-select").style.display = "block";
106    }
107}
108
109function setFilterCol(choice) {
110    var sel = getByID('filter-select-form');
111    if (!sel) return;
112    sel.className = "filter-" + choice;
113    var fld = getByID('filter-col');
114    if (fld) {
115        if (choice == 'newentry')
116            fld.selectedIndex = 0;
117        else if (choice == 'oldentry')
118            fld.selectedIndex = 1;
119        else if (choice == 'status')
120            fld.selectedIndex = 2;
121        else if (choice == 'commenter')
122            fld.selectedIndex = 3;
123        col_span = getByID("filter-text-col");
124        if (fld.selectedIndex > -1 && col_span)
125            col_span.innerHTML = '<strong>' +
126                fld.options[fld.selectedIndex].text + '</strong>';
127    }
128}
129
130function doBanIP (ip) {
131  window.location = ("<mt:var name="script_url">"
132    + "?__mode=save&amp;_type=banlist"<mt:if name="blog_id">
133    + "&amp;blog_id=<mt:var name="blog_id">"</mt:if>
134    + "&amp;magic_token=<mt:var name="magic_token">&amp;ip=" + ip);
135}
136
137var tableSelect;
138function init()
139{
140        // setup
141        tableSelect = new TC.TableSelect( "comment-listing-table" );
142        tableSelect.rowSelect = true;
143        setFilterCol(<mt:if name="filter">'<mt:var name="filter">'<mt:else>'none'</mt:if>);<mt:if name="filter">
144        setFilterVal('<mt:var name="filter_val">');
145</mt:if>
146}
147
148TC.attachLoadEvent( init );
149/* ]]> */
150</script>
151</mt:setvarblock>
152<mt:setvarblock name="list_filter_form">
153<form id="filter-form" method="get" action="<mt:var name="mt_url">">
154    <input type="hidden" name="__mode" value="list_<$mt:var name="object_type"$>" />
155        <mt:if name="blog_id">
156    <input type="hidden" name="blog_id" value="<mt:var name="blog_id">" />
157        </mt:if>
158    <input id="filter" type="hidden" name="filter" value="" />
159    <input id="filter_val" type="hidden" name="filter_val" value="" />
160</form>
161<div class="listing-filter">
162    <div class="listing-filter-inner inner pkg">
163        <form id="filter-select-form" method="get" onsubmit="execFilter(this)">
164            <div class="filter">
165                <div id="filter-title" class="filter-title">
166            <mt:unless name="filter">
167                    <strong><__trans phrase="All [_1]" params="<$mt:var name="object_label_plural"$>"></strong>
168                    <!-- <a href="javascript:void(0)" onclick="toggleFilter()" class="filter-link">[ <__trans phrase="change"> ]</a> -->
169            <mt:else>
170                <mt:if name="filter_key">
171                    <strong><__trans phrase="Showing only: [_1]" params="<mt:var name="filter_label">"></strong>
172                    <!-- <a href="javascript:void(0)" onclick="toggleFilter()" class="filter-link">[ <__trans phrase="change"> ]</a> -->
173                <mt:else>
174                    <strong>
175                    <mt:if name="filter_newentry">
176                        <__trans phrase="[_1] on entries created within the last [_2] days" params="<$mt:var name="object_label_plural"$>%%<mt:var name="filter_val">">
177                    <mt:else>
178                        <mt:if name="filter_oldentry">
179                        <__trans phrase="[_1] on entries created more than [_2] days ago" params="<$mt:var name="object_label_plural"$>%%<mt:var name="filter_val">">
180                        <mt:else>
181                        <__trans phrase="[_1] where [_2] [_3]" params='<$mt:var name="object_label_plural"$>%%<span id="filter-text-col">&nbsp;</span>%%<span id="filter-text-val"></span>'>
182                        </mt:if>
183                    </mt:if>
184                </strong>
185                <a href="<mt:var name="script_url">?__mode=<mt:var name="mode"><mt:if name="blog_id">&amp;blog_id=<mt:var name="blog_id"></mt:if><mt:if name="is_power_edit">&amp;is_power_edit=1</mt:if>">[ <__trans phrase="Remove filter"> ]</a>
186                </mt:if>
187            </mt:unless>
188                </div>
189            </div>
190        </form>
191    </div>
192</div>
193</mt:setvarblock>
194
195<mt:include name="include/header.tmpl">
196<$mt:var name="list_filter_form"$>
197<mt:include name="include/comment_table.tmpl">
198<mt:include name="include/footer.tmpl">
Note: See TracBrowser for help on using the browser.