yacy_search_server/htroot/Table_YMark_p.html
orbiter abb35addb8 added
accept-charset="UTF-8"
to all forms
this applies patches from http://forum.yacy-websuche.de/viewtopic.php?p=20891#p20891

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7482 6c8d7289-2bf4-0310-a012-ef5d649a1542
2011-02-14 22:57:43 +00:00

213 lines
7.0 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]#': Table Viewer</title>
#(showtable)#::
<link rel="alternate" type="application/xml" title="Tables" href="Tables.rss?table=#[table]#" />
#(/showtable)#
#%env/templates/metas.template%#
<script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/yacy/ui/js/jquery.dimensions.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/sorttable.js"></script>
<script type="text/javascript">
<!--
function setall(name, check){
var selectForm = document.forms.namedItem(name);
var count = selectForm.elements["num"].value;
if (check) for(i = 0; i < count; i++) {
if (selectForm.elements["item_" + i].checked) {
check = false;
break;
}
}
for(i = 0; i < count; i++) {
selectForm.elements["item_" + i].checked = check;
}
};
$(function() {
$(window).resize(function(){
var width = document.documentElement.clientWidth;
var height = document.documentElement.clientHeight;
width = width - 490;
height = height - 250;
$("#table").width(width);
$("#table").height(height);
$("#content_area").width(width);
});
$(window).trigger("resize");
});
-->
</script>
</head>
<body id="YMark">
#%env/templates/header.template%#
#%env/templates/submenuConfig.template%#
<h2>YMark Table Administration</h2>
<div id="content_area" style="float: left;">
#(showtable)#::
<form action="Table_YMark_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8" id="tablelisting">
<fieldset>
<legend><label for="tablelisting">Table Editor: showing table '#[table]#' containing #[bmksize]# bookmarks with #[tagsize]# tags in #[foldersize]# folders
</label></legend>
<p>
<input type="hidden" name="table" value="#[table]#" />
<input type="hidden" name="num" value="#[num]#" />
<input type="submit" name="editrow" value="Edit Selected Row" />
<input type="submit" name="addrow" value="Add a new Row" disabled="disabled"/>
<input type="submit" name="deleterows" value="Delete Selected Rows" />
<input type="submit" name="deletetable" value="Delete Table" />
<input type="submit" name="rebuildindex" value="Rebuild Index" />
</p>
<div id="table" style="float:left; overflow:auto;">
<table class="sortable" border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader" valign="bottom">
<td><input type="checkbox" name="allswitch" onclick="setall(this.form.name, this.value)" /></td>
<td>PK</td>
#{columns}#
<td>#[header]#</td>
#{/columns}#
</tr>
#{list}#
<tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#">
<td align="left"><input type="checkbox" name="item_#[count]#" value="mark_#[pk]#" /></td>
<td>#[pk]#</td>
#{columns}#
<td align="left">#[cell]#</td>
#{/columns}#
</tr>
#{/list}#
</table>
</div>
</fieldset>
</form>
#(/showtable)#
#(showedit)#::
<div>
<form action="Table_YMark_p.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset><legend>Row Editor</legend>
<dl>
<dt class="TableCellLight">Primary Key</dt>
<dd>#[pk]#</dd>
#{list}#
<dt class="TableCellLight">#[key]#</dt>
<dd>
<input type="text" name="col_#[key]#" value="#[value]#" size="65"/>
</dd>
#{/list}#
<dt class="TableCellLight"></dt>
<dd>
<input type="hidden" name="table" value="#[table]#" />
<input type="hidden" name="pk" value="#[pk]#" />
<input type="submit" name="commitrow" value="Commit" />
</dd>
</dl>
</fieldset>
</form>
</div>
#(/showedit)#
</div>
#(showselection)#::
<div style="width:310px; float:right;">
<form action="Table_YMark_p.html" method="get" accept-charset="UTF-8">
<fieldset><legend>Table Selection</legend>
<dl>
<dt>
<label>Select Table:</label>
</dt>
<dd>
<select name="table" onchange='this.form.submit()'>
#{tables}#
<option value="#[name]#" #(selected)#::selected="selected"#(/selected)#>#[name]#</option>
#{/tables}#
</select>
</dd>
<dt>
<label for="count">show max. entries</label>
</dt>
<dd>
<select name="count" id="count" onchange='this.form.submit()'>
<option value="10">10</option>
<option value="100">100</option>
<option value="1000">1000</option>
<option value="all" selected="selected">all</option>
</select>
</dd>
<dt>
<label>Display columns:</label>
</dt>
<dd>
#{columns}#
<input type="checkbox" name="col_#[col]#" #(checked)#::checked="checked"#(/checked)# />#[col]#<br/>
#{/columns}#
</dd>
</dl>
<input type="submit" value="load" />
</fieldset>
<fieldset>
<legend>Search/Filter Table</legend>
<dl>
<dt>
<label for="search">search rows for</label>
</dt>
<dd>
<input type="text" name="search" value="#[pattern]#" id="search" />
<input type="submit" name="edittable" value="Search" />
</dd>
<dt>
<label for="tags">Tags</label>
</dt>
<dd>
<select name="tags" style="width: 180px" onchange='this.form.submit()' id="tags">
<option value="" selected="selected">select a tag</option>
#{tags}#
<option value="#[tagName]#">#[tagName]# [#[tagCount]#]</option>
#{/tags}#
</select>
</dd>
<dt>
<label for="folders">Folders</label>
</dt>
<dd>
<select name="folders" style="width: 180px" onchange='this.form.submit()' id="folders">
<option value="" selected="selected">select a folder</option>
#{folders}#
<option value="#[folderName]#">#[folderName]# [#[folderCount]#]</option>
#{/folders}#
</select>
</dd>
</dl>
</fieldset>
</form>
<fieldset>
<legend>Import Bookmarks</legend>
<form action="/api/ymarks/import_ymark.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset>
<input type="hidden" name="table" value="#[table]#" />
<input type="hidden" name="redirect" value="/Table_YMark_p.html?table=#[table]#&amp;count=100" />
<dl>
<dt>
<label for="importer">Importer:</label>
</dt>
<dd>
<select name="importer" id="importer">
<option value="xbel">XBEL Importer</option>
<option value="html">Netscape HTML Importer</option>
</select>
</dd>
<dt>
<label for="bmkfile">File:</label>
</dt>
<dd>
<input type="file" name="bmkfile" id="bmkfile" size="10"/>
</dd>
</dl>
<input type="submit" name="importbookmarks" value="import" />
</fieldset>
</form>
</fieldset>
</div>
#(/showselection)#
#%env/templates/footer.template%#
</body>
</html>