*) added login link at bottom of page

*) empty tags will not be displayed any longer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4372 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 17 years ago
parent 4ce6fab428
commit 089faf1a00

@ -1,146 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>YaCy '#[clientname]#': Bookmarks</title> <title>YaCy '#[clientname]#': Bookmarks</title>
#%env/templates/metas.template%# #%env/templates/metas.template%#
<script src="/js/ajax.js" type="text/javascript"></script> <script src="/js/ajax.js" type="text/javascript"></script>
<script src="/js/Bookmarks.js" type="text/javascript"></script> <script src="/js/Bookmarks.js" type="text/javascript"></script>
<link rel="alternate" type="application/rss+xml" title="RSS" href="Bookmarks.rss" /> <link rel="alternate" type="application/rss+xml" title="RSS" href="Bookmarks.rss" />
</head> </head>
<body id="Bookmarks" onload="treeMenu_init(document.getElementById('folder'), '')"> <body id="Bookmarks" onload="treeMenu_init(document.getElementById('folder'), '')">
#%env/templates/header.template%# #%env/templates/header.template%#
#(mode)# #(mode)#
<!-- SubMenu (mode=0) --> <!-- SubMenu (mode=0) -->
<div class="SubMenu"> <div class="SubMenu">
<h3>Bookmarks</h3> <h3>Bookmarks</h3>
<ul class="SubMenu"> <ul class="SubMenu">
<li> <li>
<a href="Bookmarks.html?login=true&mode=add" class="MenuItemLink lock">Add Bookmark</a> <a href="Bookmarks.html?login=true&mode=add" class="MenuItemLink lock">Add Bookmark</a>
</li> </li>
<li> <li>
<a href="Bookmarks.html?login=true&mode=importxml" class="MenuItemLink lock">Import XML Bookmarks</a> <a href="Bookmarks.html?login=true&mode=importxml" class="MenuItemLink lock">Import XML Bookmarks</a>
</li> </li>
</ul> </ul>
<p/> <p/>
</div> </div>
:: <!-- Submenu isAdmin (mode=1) --> :: <!-- Submenu isAdmin (mode=1) -->
<div class="SubMenu"> <div class="SubMenu">
<h3>Bookmarks</h3> <h3>Bookmarks</h3>
<ul class="SubMenu"> <ul class="SubMenu">
<li> <li>
<a href="Bookmarks.html?mode=add" class="MenuItemLink lock">Add Bookmark</a> <a href="Bookmarks.html?mode=add" class="MenuItemLink lock">Add Bookmark</a>
</li> </li>
<li> <li>
<a href="Bookmarks.html?mode=importxml" class="MenuItemLink lock">Import XML Bookmarks</a> <a href="Bookmarks.html?mode=importxml" class="MenuItemLink lock">Import XML Bookmarks</a>
</li> </li>
</ul> </ul>
<p/> <p/>
</div> </div>
:: <!-- add or edit Bookmark (mode=2) --> :: <!-- add or edit Bookmark (mode=2) -->
<form action="Bookmarks.html" method="get"> <form action="Bookmarks.html" method="get">
<fieldset> <fieldset>
<legend>#(edit)#Add Bookmark::Edit Bookmark#(/edit)#</legend> <legend>#(edit)#Add Bookmark::Edit Bookmark#(/edit)#</legend>
<dl> <dl>
<dt> <dt>
<label for="url">URL:</label> <label for="url">URL:</label>
</dt> </dt>
<dd> <dd>
<input type="text" name="url" id="url" value="#[url]#" onblur="loadTitle()" size="80" /> <input type="text" name="url" id="url" value="#[url]#" onblur="loadTitle()" size="80" />
</dd> </dd>
<dt> <dt>
<label for="title">Title:</label> <label for="title">Title:</label>
</dt> </dt>
<dd> <dd>
<input type="text" name="title" id="title" value="#[title]#" size="80" /> <input type="text" name="title" id="title" value="#[title]#" size="80" />
</dd> </dd>
<dt> <dt>
<label for="description">Description:</label> <label for="description">Description:</label>
</dt> </dt>
<dd> <dd>
<input type="text" name="description" id="description" value="#[description]#" size="80" /> <input type="text" name="description" id="description" value="#[description]#" size="80" />
</dd> </dd>
<dt> <dt>
<label for="tags">Tags (comma separated):</label> <label for="tags">Tags (comma separated):</label>
</dt> </dt>
<dd> <dd>
<input type="text" name="tags" id="tags" value="#[tags]#" size="80" /> <input type="text" name="tags" id="tags" value="#[tags]#" size="80" />
</dd> </dd>
<dt> <dt>
<label for="public">Public:</label> <label for="public">Public:</label>
</dt> </dt>
<dd> <dd>
<select name="public" id="public"> <select name="public" id="public">
<option value="public" #(public)#::selected="selected"#(/public)#>yes</option> <option value="public" #(public)#::selected="selected"#(/public)#>yes</option>
<option value="private" #(public)#selected="selected"::#(/public)#>no</option> <option value="private" #(public)#selected="selected"::#(/public)#>no</option>
</select> </select>
</dd> </dd>
<dt> <dt>
<input type="checkbox" value="true" name="feed" id="feed" #(feed)#::checked#(/feed)# /> <input type="checkbox" value="true" name="feed" id="feed" #(feed)#::checked#(/feed)# />
<label for="feed">Bookmark is a newsfeed</label> <label for="feed">Bookmark is a newsfeed</label>
</dt> </dt>
</dl> </dl>
#(edit)# #(edit)#
<p><input type="submit" name="add" value="create" /></p> <p><input type="submit" name="add" value="create" /></p>
:: ::
<p><input type="submit" name="add" value="edit" /></p> <p><input type="submit" name="add" value="edit" /></p>
#(/edit)# #(/edit)#
<img src="/env/grafics/empty.gif" name="ajax" /> <img src="/env/grafics/empty.gif" name="ajax" />
</fieldset> </fieldset>
</form> </form>
:: <!-- import XML Bookmarks (mode=3) --> :: <!-- import XML Bookmarks (mode=3) -->
<form action="Bookmarks.html" method="post" enctype="multipart/form-data"> <form action="Bookmarks.html" method="post" enctype="multipart/form-data">
<fieldset> <fieldset>
<legend>Import XML Bookmarks</legend> <legend>Import XML Bookmarks</legend>
<dl> <dl>
<dt> <dt>
<label for="xmlfile">File:</label> <label for="xmlfile">File:</label>
</dt> </dt>
<dd> <dd>
<input type="file" name="xmlfile" id="xmlfile" /> <input type="file" name="xmlfile" id="xmlfile" />
</dd> </dd>
<dt> <dt>
<label for="public">import as Public:</label> <label for="public">import as Public:</label>
</dt> </dt>
<dd> <dd>
<select name="public" id="public"> <select name="public" id="public">
<option value="public">yes</option> <option value="public">yes</option>
<option value="private">no</option> <option value="private">no</option>
</select> </select>
</dd> </dd>
</dl> </dl>
<input type="submit" name="importxml" value="import" /> <input type="submit" name="importxml" value="import" />
</fieldset> </fieldset>
</form> </form>
:: <!-- import Netscape Bookmarks (mode=4) --> :: <!-- import Netscape Bookmarks (mode=4) -->
<form action="Bookmarks.html" method="post" enctype="multipart/form-data"> <form action="Bookmarks.html" method="post" enctype="multipart/form-data">
<fieldset> <fieldset>
<legend>Import Bookmarks</legend> <legend>Import Bookmarks</legend>
<dl> <dl>
<dt> <dt>
<label for="bookmarksfile">File:</label> <label for="bookmarksfile">File:</label>
</dt> </dt>
<dd> <dd>
<input type="file" name="bookmarksfile" id="bookmarksfile" /> <input type="file" name="bookmarksfile" id="bookmarksfile" />
</dd> </dd>
<dt> <dt>
<label for="tags">Default Tags:</label> <label for="tags">Default Tags:</label>
</dt> </dt>
<dd> <dd>
<input type="text" name="tags" id="tags" value="imported" /> <input type="text" name="tags" id="tags" value="imported" />
</dd> </dd>
<dt> <dt>
<label for="public">import as Public:</label> <label for="public">import as Public:</label>
</dt> </dt>
<dd> <dd>
<select name="public" id="public"> <select name="public" id="public">
<option value="public">yes</option> <option value="public">yes</option>
<option value="private">no</option> <option value="private">no</option>
</select> </select>
</dd> </dd>
</dl> </dl>
<input type="submit" name="importbookmarks" value="import" /> <input type="submit" name="importbookmarks" value="import" />
</fieldset> </fieldset>
</form> </form>
#(/mode)# #(/mode)#
<!-- show Folders --> <!-- show Folders -->
<div class="TagList"> <div class="TagList">
@ -157,25 +157,25 @@
</ul> </ul>
</fieldset> </fieldset>
<!-- show TagList --> <!-- show TagList -->
<fieldset> <fieldset>
<legend>Tags</legend> <legend>Tags</legend>
<p> <p>
<form action="Bookmarks.html" name="choosetag" method="get" accept-charset="UTF-8"> <form action="Bookmarks.html" name="choosetag" method="get" accept-charset="UTF-8">
<select size="1" name="tag" onChange="document.choosetag.submit();"> <select size="1" name="tag" onChange="document.choosetag.submit();">
<option value=""#[selected]#>All (#[num-bookmarks]#)</option> <option value=""#[selected]#>All (#[num-bookmarks]#)</option>
#{optlist}#<option value="#[name]#"#[selected]#>#[name]# (#[num]#)</option> #{optlist}#<option value="#[name]#"#[selected]#>#[name]# (#[num]#)</option>
#{/optlist}# #{/optlist}#
</select> </select>
<input type="submit" value=" ... "> <input type="submit" value=" ... ">
</form> </form>
</p> </p>
<p> <p>
#{taglist}#<span style="font-size:#[size]#em"><a href="Bookmarks.html?tag=#[name]#">#[name]#</a></span> #{taglist}#<span style="font-size:#[size]#em"><a href="Bookmarks.html?tag=#[name]#">#[name]#</a></span>
#{/taglist}# #{/taglist}#
</p> </p>
</fieldset> </fieldset>
</div> </div>
<!-- show BookmarkList --> <!-- show BookmarkList -->
<div class="bookmarkList"> <div class="bookmarkList">
@ -187,42 +187,42 @@
with Firefox2 (Linux) and Safari (Mac OS X). Please report any issues with other browsers or with Firefox2 (Linux) and Safari (Mac OS X). Please report any issues with other browsers or
operating systems. [apfelmaennchen] operating systems. [apfelmaennchen]
</dd> </dd>
<h3>Bookmark List</h3> <h3>Bookmark List</h3>
#{bookmarks}# #{bookmarks}#
<div class="bookmark #(public)#public::private#(/public)#"> <div class="bookmark #(public)#public::private#(/public)#">
<h4 class="bookmarkTitle"> <h4 class="bookmarkTitle">
#(public)# #(public)#
<img class="bookmarkIcon" src="env/grafics/bookmarkpriv.png" alt="private bookmark" title="private bookmark"/> <img class="bookmarkIcon" src="env/grafics/bookmarkpriv.png" alt="private bookmark" title="private bookmark"/>
:: ::
<img class="bookmarkIcon" src="env/grafics/bookmarkpub.png" alt="public bookmark" title="public bookmark"/> <img class="bookmarkIcon" src="env/grafics/bookmarkpub.png" alt="public bookmark" title="public bookmark"/>
#(/public)# #(/public)#
<a href="#[link]#" class="bookmarkTitle">#[title]#</a> <a href="#[link]#" class="bookmarkTitle">#[title]#</a>
</h4> </h4>
<p class="bookmarkDescription">#[description]#</p> <p class="bookmarkDescription">#[description]#</p>
<p class="tags">Tagged with | #{tags}#<a href="Bookmarks.html?tag=#[tag]#" class="bookmarkTags">#[tag]#</a> | #{/tags}#</p> <p class="tags">Tagged with | #{tags}#<a href="Bookmarks.html?tag=#[tag]#" class="bookmarkTags">#[tag]#</a> | #{/tags}#</p>
<p class="bookmarkActions"> <p class="bookmarkActions">
<a href="Bookmarks.html?edit=#[hash]#" class="bookmarkAction">Edit</a> <a href="Bookmarks.html?edit=#[hash]#" class="bookmarkAction">Edit</a>
/ /
<a href="Bookmarks.html?delete=#[hash]#" class="bookmarkAction">Delete</a> <a href="Bookmarks.html?delete=#[hash]#" class="bookmarkAction">Delete</a>
</p> </p>
</div> </div>
#{/bookmarks}# #{/bookmarks}#
<p class="Navigation"> <p class="Navigation">
#(prev-page)# #(prev-page)#
::<a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=#[num]#">previous page</a> ::<a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=#[num]#">previous page</a>
#(/prev-page)# #(/prev-page)#
#(next-page)# #(next-page)#
::<a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=#[num]#">next page</a> ::<a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=#[num]#">next page</a>
#(/next-page)# #(/next-page)#
</p> </p>
<p class="bookmarkNavigation"> <p class="bookmarkNavigation">
Show Show
<a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=10">10</a> <a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=10">10</a>
<a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=50">50</a> <a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=50">50</a>
<a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=100">100</a> <a href="Bookmarks.html?tag=#[tag]#&amp;start=#[start]#&amp;num=100">100</a>
Bookmarks per page. Bookmarks per page. #(admin)# - <a href="Bookmarks.html?login=true">Login</a>::#(/admin)#
</p> </p>
</div> </div>
#%env/templates/footer.template%# #%env/templates/footer.template%#
</body> </body>
</html> </html>

@ -117,10 +117,13 @@ public class Bookmarks {
prop.put("address", address); prop.put("address", address);
//defaultvalues //defaultvalues
if(isAdmin) if(isAdmin) {
prop.put("mode", "1"); prop.put("mode", "1");
else prop.put("admin", "1");
prop.put("mode", "0"); } else {
prop.put("mode", "0");
prop.put("admin", "0");
}
prop.put("mode_edit", "0"); prop.put("mode_edit", "0");
prop.put("mode_title", ""); prop.put("mode_title", "");
prop.put("mode_description", ""); prop.put("mode_description", "");
@ -315,7 +318,7 @@ public class Bookmarks {
tagCount=0; tagCount=0;
while (tagsIt.hasNext()) { while (tagsIt.hasNext()) {
String tname = tagsIt.next(); String tname = tagsIt.next();
if (!tname.startsWith("/")) { if ((!tname.startsWith("/")) && (!tname.equals(""))) {
prop.put("bookmarks_"+count+"_tags_"+tagCount+"_tag", tname); prop.put("bookmarks_"+count+"_tags_"+tagCount+"_tag", tname);
tagCount++; tagCount++;
} }
@ -389,7 +392,7 @@ public class Bookmarks {
} }
while(it.hasNext()){ while(it.hasNext()){
tag=(Tag) it.next(); tag=(Tag) it.next();
if (!tag.getTagName().startsWith("/")) { if ((!tag.getTagName().startsWith("/")) && (!tag.getTagName().equals(""))) {
prop.putHTML(id+"_"+count+"_name", tag.getFriendlyName()); prop.putHTML(id+"_"+count+"_name", tag.getFriendlyName());
prop.putHTML(id+"_"+count+"_tag", tag.getTagName()); prop.putHTML(id+"_"+count+"_tag", tag.getTagName());
prop.put(id+"_"+count+"_num", tag.size()); prop.put(id+"_"+count+"_num", tag.size());

Loading…
Cancel
Save