yacy_search_server/htroot/Blacklist_p.html
low012 4bffe664ca *) moved entry field for new expressions to top of the list as requested in forum (http://forum.yacy-websuche.de/viewtopic.php?f=9&t=1678)
*) added some Javascript to disable list selection on bottom of list in cases it is not needed (edit, delete) and only enable it if needed (move), if JS is turned off everything will work as usual

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5435 6c8d7289-2bf4-0310-a012-ef5d649a1542
2009-01-03 10:18:48 +00:00

174 lines
7.8 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YaCy '#[clientname]#': Blacklist Administration</title>
#%env/templates/metas.template%#
#(disabled)##(edit)#
<script type="text/javascript">
function switchTargetBlacklist(disabled){
document.editBlacklistPatterns.targetBlacklist.disabled=disabled;
}
</script>
::#(/edit)#::#(/disabled)#
</head>
<body id="Blacklist"#(disabled)##(edit)# onload="switchTargetBlacklist(1)"::#(/edit)#::#(/disabled)#>
#%env/templates/header.template%#
#%env/templates/submenuBlacklist.template%#
<h2>Blacklist Administration</h2>
<p>
This function provides an URL filter to the proxy; any blacklisted URL is blocked
from being loaded. You can define several blacklists and activate them separately.
You may also provide your blacklist to other peers by sharing them; in return you may
collect blacklist entries from other peers.
</p>
<h3>Active list: #(disabled)#<em>#[currentBlacklist]#</em>::<span class="error">No blacklist selected</span>#(/disabled)#</h3>
<p>Used Blacklist engine: <span class="settingsValue">#[blacklistEngine]#</span></p>
<!-- blacklist selection -->
<fieldset class="selectList">
<legend>Select list:</legend>
#(disabled)#
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data" name="selectListName">
<select name="selectedListName" size="1" onChange="document.selectListName.submit();">
#{blackLists}#
<option value="#[name]#" #(selected)#::selected="selected"#(/selected)#>#[name]# [#(shared)#not shared::shared#(/shared)#]</option>
#{/blackLists}#
</select>
<input type="hidden" name="selectList" value="select" />
<input type="submit" />
</form>
::
#(/disabled)#
</fieldset>
<fieldset class="createList">
<legend>Create new list:</legend>
#(error)#
::
<p>Unable to create list <strong>#[name]#</strong> since it contains illegal characters.
A legal name is made up from a letter, digit, minus, plus or underscore as the first character
followed by letters, digits, minus, plus, underscores or dots.</p>
::
<p>Unable to create list <strong>#[name]#</strong> since a list of this name exists already.</p>
#(/error)#
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data">
<input type="text" id="newListName" size ="50" name="newListName" />
<input type="submit" name="createNewList" value="create" />
</form>
</fieldset>
<br /><br />
#(disabled)#
<fieldset class="editList">
<legend>Edit this list</legend>
<!-- Blacklist configuration -->
#(edit)#
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data">
<p>Add new pattern:</p>
<div>
<input type="hidden" name="currentBlacklist" value="#[currentBlacklist]#" />
<input type="text" name="newEntry" size="50" />
<input type="submit" name="addBlacklistEntry" value="Add URL pattern" />
</div>
<ul>
<li>domain/fullpath</li>
<li>domain/.* or <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">regexpr</a></li>
<li>*.domain/.* or <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">regexpr</a></li>
<li>domain.*/.* or <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">regexpr</a></li>
<li>*.sub.domain/.* or <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">regexpr</a></li>
<li>sub.domain.*/.* or <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">regexpr</a></li>
</ul>
</form>
<form name="editBlacklistPatterns" action="Blacklist_p.html" method="post" enctype="multipart/form-data">
<p>These are the domain name/path patterns in <strong><em>#[currentBlacklist]#</em></strong>:</p>
<div>
<input type="hidden" name="currentBlacklist" value="#[currentBlacklist]#" />
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader">
<td></td>
<td><strong>Blacklist Pattern</strong></td>
</tr>
#{Itemlist}#
<tr class="TableCell#(dark)#Light::Dark#(/dark)#">
<td><input type="checkbox" name="selectedEntry.#[count]#" id="selectedEntry.#[count]#" value="#[item]#" /></td>
<td><label for="selectedEntry.#[count]#">#[item]#</label></td>
</tr>
#{/Itemlist}#
</table>
<br />
<select name="action" size="1">
<option value="editBlacklistEntry" onclick="switchTargetBlacklist(1)">Edit selected pattern(s)</option>
<option value="deleteBlacklistEntry" onclick="switchTargetBlacklist(1)">Delete selected pattern(s)</option>
<option value="moveBlacklistEntry" onclick="switchTargetBlacklist(0)">Move selected pattern(s) to</option>
</select>
&nbsp;
<select name="targetBlacklist" size="1">
#{blackListsMove}#
<option value="#[name]#">#[name]#</option>
#{/blackListsMove}#
</select>
&nbsp;
<input type="submit" />
</div>
</form>
::
<p>Edit existing pattern(s):</p>
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data">
<div>
<input type="hidden" name="currentBlacklist" value="#[currentBlacklist]#" />
#{editList}#
<input type="text" name="editedBlacklistEntry.#[count]#" size="50" value="#[item]#"/>
<input type="hidden" name="selectedBlacklistEntry.#[count]#" value="#[item]#"/>
#{/editList}#
<input type="hidden" name="action" value="editBlacklistEntry" />
<br /><br />
<input type="submit" value="Save URL pattern(s)" />
</div>
</form>
#(/edit)#
</fieldset>
<fieldset class="listSettings">
<legend>Settings for this list</legend>
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data">
<div>
<input type="hidden" name="selectedListName" value="#[currentBlacklist]#" />
<input type="submit" name="shareList" value="Share/don't share this list" />
<input type="submit" name="deleteList" value="Delete this list" />
</div>
</form>
<form action="Blacklist_p.html" method="post" enctype="multipart/form-data">
<fieldset>
<legend>Activate this list for ...</legend>
<dl>
#{currentActiveFor}#
<dt><label for="activateList4#[blTypeName]#">#[blTypeName]#</label></dt>
<dd>
<input type="checkbox" id="activateList4#[blTypeName]#" name="activateList4#[blTypeName]#" value="on" #(checked)#checked="checked"::#(/checked)# />
</dd>
#{/currentActiveFor}#
</dl>
<input type="hidden" name="selectedListName" value="#[currentBlacklist]#" />
<input type="submit" name="activateList" value="Save" />
</fieldset>
</form>
</fieldset>
::#(/disabled)#
<!--
<div>
<p>
#(status)#
::
<strong>#[item]#</strong> was removed from blacklist
::
<strong>#[item]#</strong> was added to the blacklist
#(/status)#
</p>
</div>
-->
#%env/templates/footer.template%#
</body>
</html>