From 35fb671721e72bf56051e002f2f0ce6091c30991 Mon Sep 17 00:00:00 2001 From: karlchenofhell Date: Sat, 6 Jan 2007 12:21:13 +0000 Subject: [PATCH] - updated DetailedSearch and ViewFile git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3173 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/DetailedSearch.html | 12 +- htroot/DetailedSearch.java | 19 ++- htroot/ViewFile.html | 147 ++++++++---------- htroot/ViewFile.java | 79 +++++----- skins/dark.css | 6 + skins/default.css | 7 + skins/grey.css | 7 + skins/mint-green.css | 7 + skins/phosphor.css | 7 + .../de/anomic/plasma/plasmaSwitchboard.java | 6 +- 10 files changed, 167 insertions(+), 130 deletions(-) diff --git a/htroot/DetailedSearch.html b/htroot/DetailedSearch.html index ed186b4cf..fcb9ad706 100644 --- a/htroot/DetailedSearch.html +++ b/htroot/DetailedSearch.html @@ -4,14 +4,14 @@ YaCy '#[clientname]#': Search Page #%env/templates/metas.template%# - + #%env/templates/header.template%#

Detailed Search

#(num-results)# ::

#[linkcount]# results from #[orderedcount]# ordered links from #[filteredcount]# filtered links of a total number of #[totalcount]# known.

#(/num-results)# -
+
@@ -20,9 +20,9 @@ Query Attributes
-
+
-
+
@@ -64,6 +64,8 @@
+ + #(type)# #(excluded)# :: @@ -81,9 +83,11 @@ #{results}#
+ #(authorized)#::
delete
+ #(/authorized)#

#[description]#

#(snippet)#::

#[text]#

#(/snippet)#

#[urlname]#

diff --git a/htroot/DetailedSearch.java b/htroot/DetailedSearch.java index 2597c1e66..ee3f43338 100644 --- a/htroot/DetailedSearch.java +++ b/htroot/DetailedSearch.java @@ -110,12 +110,13 @@ public class DetailedSearch { prop.put("localCount", 10); prop.put("localWDist", 999); //prop.put("globalChecked", "checked"); - prop.put("globalChecked", ""); - prop.put("postsortChecked", "checked=\"checked\""); + prop.put("globalChecked", 0); + prop.put("postsortChecked", 1); prop.put("localTime", 6); prop.put("results", ""); prop.put("urlmaskoptions", 0); prop.put("urlmaskoptions_urlmaskfilter", ".*"); + prop.put("jumpToCursor", 1); return prop; } @@ -200,7 +201,8 @@ public class DetailedSearch { if (filtered.size() > 0) { kelondroMSetTools.excludeDestructive(query, plasmaSwitchboard.stopwords); } - + + boolean authenticated = sb.adminAuthenticated(header) >= 2; // if a minus-button was hit, remove a special reference first if (post.containsKey("deleteref")) { if (!sb.verifyAuthentication(header, true)) { @@ -235,6 +237,7 @@ public class DetailedSearch { plasmaSearchTimingProfile remoteTiming = new plasmaSearchTimingProfile(6 * thisSearch.maximumTime / 10, thisSearch.wantedResults); final serverObjects prop = sb.searchFromLocal(thisSearch, localRanking, localTiming, remoteTiming, postsort); + putRanking(prop, localRanking, "local"); // remember the last search expression env.setConfig("last-search", querystring); // process result of search @@ -276,13 +279,19 @@ public class DetailedSearch { } else { prop.put("urlmaskoptions", 1); } + + // if user is not authenticated, he may not vote for URLs + int linkcount = Integer.parseInt(prop.get("num-results_linkcount", "0")); + for (int i=0; i 0) ? 0 : 1); prop.put("urlmaskoptions_urlmaskfilter", urlmask); prop.put("type", "0"); prop.put("localCount", count); prop.put("localWDist", wdist); - prop.put("globalChecked", (global) ? "checked=\"checked\"" : ""); - prop.put("postsortChecked", (postsort) ? "checked=\"checked\"" : ""); + prop.put("globalChecked", (global) ? 1 : 0); + prop.put("postsortChecked", (postsort) ? 1 : 0); prop.put("localTime", searchtime/1000); prop.put("search", post.get("search", "")); prop.putAll(localRanking.toExternalMap("local")); diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html index bd2edda3b..bcac4ee64 100644 --- a/htroot/ViewFile.html +++ b/htroot/ViewFile.html @@ -1,103 +1,90 @@ - - - -YaCy '#[clientname]#': View URL Content -#%env/templates/metas.template%# - - -#%env/templates/header.template%# -

-

View URL Content

+ + + + YaCy '#[clientname]#': View URL Content + #%env/templates/metas.template%# + + + #%env/templates/header.template%# +

View URL Content

-

-#(error)# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
URL#[url]#
Hash#[hash]#
Word Count#[wordCount]#
Description#[desc]#
Size#[size]#
MimeType#[mimeType]#
View as: - Original | - Plain Text | - Parsed Text | - Parsed Sentences | - Link List -
+ #(error)# +

+
View URL Content +
+
URL:
#[url]#
+
Hash:
#[hash]#
+
Word Count:
#[wordCount]#
+
Description:
#[desc]#
+
Size:
#[size]#
#(mimeTypeAvailable)#:: +
MimeType:
#[mimeType]#
#(/mimeTypeAvailable)# +
:
+
+ + +
+
+ + +
+ :: -No URL hash submitted. +No URL hash submitted. :: -Unable to find URL Entry in DB +Unable to find URL Entry in DB :: -Invalid URL +Invalid URL :: -Unable to download resource content.
+

Unable to download resource content.

#[errorText]# :: -Unable to parse resource content.
+

Unable to parse resource content.

#[errorText]# :: -Unsupported protocol. +Unsupported protocol. #(/error)# -
-

+

#(viewMode)# :: -

Plain Resource Content


- #[plainText]# +
Plain Resource Content +

+ #[plainText]# +

+
:: -

Parsed Resource Content


- #[parsedText]# +
Parsed Resource Content +

+ #[parsedText]# +

+
:: -

Parsed Resource Sentences


- - #{sentences}# - - - - - #{/sentences}# -
#[nr]##[text]#
+
Parsed Resource Sentences +
    #{sentences}# +
  1. #[text]#
  2. #{/sentences}# +
+
:: -

Original Resource Content


- +
Original Resource Content +