... | in searcher.naml |
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
|
<macro name="searcher" requires="servlet">
<n.searcher_tool.>
<n.if.not.visitor.is_sysadmin>
<then>
<n.login.><t>Only authorized users can
proceed in this area.</t></n.login.>
</then>
</n.if.not.visitor.is_sysadmin>
<n.if.both condition1="[n.is_submitted_form/]"
condition2="[n.not.is_null.get_parameter name='results'/]">
<then>
<n.get_parameter_values. name="results">
<n.if.has_more_strings>
<then>
<n.loop.>
<n.if.is_valid_node
node_id="[n.current_parameter_value/]">
<then>
<n.get_node_from_id.
node_id="[n.current_parameter_value/]">
<n.log.>Deleted
<n.id/></n.log.>
<n.delete_recursively/>
</n.get_node_from_id.>
</then>
</n.if.is_valid_node>
</n.loop.>
<n.redirect_to.get_parameter
name='url'/>
</then>
</n.if.has_more_strings>
</n.get_parameter_values.>
</then>
</n.if.both>
<n.define_search_query_field/>
<n.node_page.search_namespace.>
<n.set_var name='didSearch' value="false" />
<n.catch_exception. id="search-block">
<n.do_search_using_params />
<n.set_var name='didSearch' value="true" />
</n.catch_exception.>
<n.html>
<head>
<meta name="robots"
content="noindex,nofollow"/>
<n.search_page_title/>
<n.set_cookies did_search="[n.var
name='didSearch'/]" />
<n.search_page_style/>
<script type="text/javascript">
function countChecked() {
var authors = $("input.remove_author:checked" );
var n = authors.length;
console.log( n + (n === 1 ? " is" : " are") + " checked!" );
var names = " NOT author:(";
authors.each(function() {
names += "\""+$( this ).val()+"\" OR ";
});
names += ")"
console.log(names);
};
$(document).ready(function() {
$('div.clickable').each(function() {
var $this = $(this);
var $checkbox = $this.prev
().children().eq(0);
$this.click(function() {
var checked = $checkbox.attr
('checked');
if (checked) {
$this.removeClass('info-message');
$checkbox.removeAttr('checked');
} else {
$this.addClass('info-message');
$checkbox.attr('checked', true);
}
});
});
var results = $('.result');
console.log(results.length);
$("#results_shown").html("Results shown: "+results.length);
});
function selectAll() {
$('input[type=checkbox]').attr
('checked', true).parent().next().addClass('info-message');;
};
</script>
</head>
<body>
<n.show_search_form/>
<n.show_search_error/>
<div class="search-results-header">
<n.if.has_resort>
<then.sort_controls/>
</n.if.has_resort>
<img src="/images/search.png" class="image16"/>
Found <n.total_posts/>
<n.search_description/>
</div>
<br/>
<span id="results_shown"></span>
<br/>
<button onclick="selectAll()">Select all</button>
<n.form.>
<n.results.loop.current_node.>
<n.int. i="[n.topic_node.replies/]">
User's Posts: <n.owner.node_count/>
<div style="margin-bottom:1.5em" class="result">
<div style="margin-bottom:.2em">
<input type="checkbox" name="results" value="[n.id/]"/>
<n.search_result_topic_subject/>
<n.search_result_post_subject/>
</div>
<div class="clickable">
<div style="margin-bottom:.2em">
<n.search_result_message_fragment/>
</div>
<div class="weak-color" style="font-size:80%">
<n.search_result_in_app/>
<n.search_result_on_date/>
<n.if.not.is_author_search>
<then>
by
<n.owner.user_link/>
User's Posts: <n.owner.node_count/>
</then>
</n.if.not.is_author_search>
—
<n.topic_node.replies/> replies in thread
id: <n.owner.id/>
</div>
</div>
<n.comment.>
remove author : <input onclick="countChecked();" class="remove_author" type="checkbox" name="authors" value="[n.owner.name/]"/>
</n.comment.>
</div>
</n.int.>
</n.results.loop.current_node.>
<input type="submit" value="Delete Posts Recursively"/>
<input type="hidden" name="url" value="[n.current_url/]"/>
</n.form.>
<n.search_pagination/>
<n.if.not.lucene_is_ready>
<then.index_rebuilt_notice/>
</n.if.not.lucene_is_ready>
</body>
</n.html>
</n.node_page.search_namespace.>
</n.searcher_tool.>
</macro>
|
Free forum by Nabble | Edit this page |