added links from result headline to details, CSS style to make headline links
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 4 Sep 2003 13:47:36 +0000 (13:47 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 4 Sep 2003 13:47:36 +0000 (13:47 +0000)
and links in index non-underlined

git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@126 13eb9ef6-21d5-0310-b721-a9d68796d827

WebPac.pm
public_html/style.css
template_html/index_res.html
template_html/results.html

index 4f3f692..7299822 100644 (file)
--- a/WebPac.pm
+++ b/WebPac.pm
@@ -79,6 +79,7 @@ sub show_results_list {
        my $full = $q->param('full');
 
        my @persist_vars = ( 'rm' ); 
+       my @url_params = ( 'rm=results', 'show_full=1', 'last_PAGER_offset='.$q->param('PAGER_offset') || 0 );
 
        for(my $i = 1; $i <=30; $i++) {
 
@@ -90,6 +91,9 @@ sub show_results_list {
                push @persist_vars, "f$i";
                push @persist_vars, "v$i";
 
+               push @url_params,"f$i=".$q->url_param("f$i");
+               push @url_params,"v$i=".$q->url_param("v$i");
+
                # re-write query from +/- to and/and not
                my @param_vals = $q->param("v$i");
                my @swish_q;
@@ -125,7 +129,7 @@ sub show_results_list {
                push @s_arr, $q->param("f$i")."_swish=(".join(" or ",@swish_q).")";
        }
 
-       my $tmpl = $self->load_tmpl('results.html');
+       my $tmpl = $self->load_tmpl('results.html', global_vars => 1);
 
        sub esc_html {
                my $html = shift;
@@ -174,6 +178,8 @@ sub show_results_list {
        $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);
        $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);
 
+       $tmpl->param('url_params',"?".join("&",@url_params));
+
        # create a Pager object
        my $pager = HTML::Pager->new(
                # required parameters
index 1c0093c..67e43ea 100644 (file)
-body {\r
-       background: #FFFFE8 none;\r
-       color: black;\r
-       font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;\r
-} \r
-\r
-p {\r
-       font-size: 75%;\r
-}\r
-\r
-h2 {  \r
-       font-size: 16px; font-weight: bold; \r
-       color: #000080;\r
-}\r
-\r
-.tdH1 {\r
-       font-size: 75%;\r
-}\r
-\r
-.navigacija {\r
-       font-size : 11px;\r
-       margin: 0px 0px 0px 0px;\r
-       padding: 0px 0px 0px 0px;\r
-       border-width: 1px;\r
-       width: 19%;\r
-       color: #000080;\r
-       background-color: #FFFFFF;\r
-       border-color: #000080;\r
-       border-top-color: #8080f0;\r
-       border-left-color: #8080f0;\r
-       border-right-color: #000080;\r
-       border-bottom-color: #000080;\r
-}\r
-\r
-\r
-.submit {\r
-       font-size : 17px;\r
-       margin: 0px 0px 0px 0px;\r
-       padding: 0px 0px 0px 0px;\r
-       color: #000080;\r
-       background-color: #ffffff;\r
-        border-color: #000080;\r
-       border-top-color: #8080f0;\r
-       border-left-color: #8080f0;\r
-       border-right-color: #000080;\r
-       border-bottom-color: #000080;\r
-        \r
-}\r
-\r
-.reset {\r
-       font-size : 12px;\r
-       margin: 0px 0px 0px 0px;\r
-       padding: 0px 0px 0px 0px;\r
-       color: #000080;\r
-       background-color: #ffffff;\r
-        border-color: #000080;\r
-       border-top-color: #8080f0;\r
-       border-left-color: #8080f0;\r
-       border-right-color: #000080;\r
-       border-bottom-color: #000080;\r
-}\r
-\r
-\r
-.navigacijaDISABLED {\r
-       font-size : 11px;\r
-       margin: 0px 0px 0px 0px;\r
-       padding: 0px 0px 0px 0px;\r
-       border-width: 1px;\r
-       width: 19%;\r
-       color: #8080f0;\r
-       background-color: #ffffff;\r
-       border-top-color: #8080f0;\r
-       border-left-color: #8080f0;\r
-       border-right-color: #000080;\r
-       border-bottom-color: #000080;\r
-}\r
-\r
-\r
-.label1 {  \r
-        font-size: 75%;\r
-       text-align: right;\r
-}\r
-\r
-.label2 {  \r
-         font-size: 75%;\r
-        vertical-align: top;\r
-}\r
-\r
-\r
-.example {  \r
-       font-size: 70%; \r
-        font-style: italic;\r
-}\r
-\r
-.limiter {  \r
-       vertical-align: top;\r
-       font-size: 75%;\r
-}\r
-\r
-.results {\r
-       font-size: 70%\r
-}\r
-\r
-.small {\r
-       font-size: 70%;\r
-}\r
-       \r
-\r
+body {
+       background: #FFFFE8 none;
+       color: black;
+       font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
+} 
+
+p {
+       font-size: 75%;
+}
+
+h2 {  
+       font-size: 16px; font-weight: bold; 
+       color: #000080;
+}
+
+.tdH1 {
+       font-size: 75%;
+}
+
+.navigacija {
+       font-size : 11px;
+       margin: 0px 0px 0px 0px;
+       padding: 0px 0px 0px 0px;
+       border-width: 1px;
+       width: 19%;
+       color: #000080;
+       background-color: #FFFFFF;
+       border-color: #000080;
+       border-top-color: #8080f0;
+       border-left-color: #8080f0;
+       border-right-color: #000080;
+       border-bottom-color: #000080;
+}
+
+
+.submit {
+       font-size : 17px;
+       margin: 0px 0px 0px 0px;
+       padding: 0px 0px 0px 0px;
+       color: #000080;
+       background-color: #ffffff;
+        border-color: #000080;
+       border-top-color: #8080f0;
+       border-left-color: #8080f0;
+       border-right-color: #000080;
+       border-bottom-color: #000080;
+        
+}
+
+.reset {
+       font-size : 12px;
+       margin: 0px 0px 0px 0px;
+       padding: 0px 0px 0px 0px;
+       color: #000080;
+       background-color: #ffffff;
+        border-color: #000080;
+       border-top-color: #8080f0;
+       border-left-color: #8080f0;
+       border-right-color: #000080;
+       border-bottom-color: #000080;
+}
+
+
+.navigacijaDISABLED {
+       font-size : 11px;
+       margin: 0px 0px 0px 0px;
+       padding: 0px 0px 0px 0px;
+       border-width: 1px;
+       width: 19%;
+       color: #8080f0;
+       background-color: #ffffff;
+       border-top-color: #8080f0;
+       border-left-color: #8080f0;
+       border-right-color: #000080;
+       border-bottom-color: #000080;
+}
+
+
+.label1 {  
+        font-size: 75%;
+       text-align: right;
+}
+
+.label2 {  
+         font-size: 75%;
+        vertical-align: top;
+}
+
+
+.example {  
+       font-size: 70%; 
+        font-style: italic;
+}
+
+.limiter {  
+       vertical-align: top;
+       font-size: 75%;
+}
+
+.results {
+       font-size: 70%
+}
+
+.small {
+       font-size: 70%;
+}
+       
+/* links in headline shouldn't have underline (it looks ugly) */
+.headline {
+       text-decoration: none
+}
index 6d0c715..6fca294 100644 (file)
@@ -29,7 +29,7 @@
 <TMPL_LOOP NAME="PAGER_DATA_LIST">
   <TR>
        <td>
-       <a href="?rm=results&f1=<TMPL_VAR name="field" escape="URL">&v1=<TMPL_VAR name="item" escape="URL">"><TMPL_VAR NAME="item"></a>
+       <a href="?rm=results&f1=<TMPL_VAR name="field" escape="URL">&v1=<TMPL_VAR name="item" escape="URL">" class="headline"><TMPL_VAR NAME="item"></a>
        <!-- ordinal number in index -->
        <!--
        <small>[<TMPL_VAR NAME="ord">]</small>
index 6511d10..b8975ef 100644 (file)
@@ -74,7 +74,7 @@ PAGER_offset: <TMPL_VAR PAGER_offset>
   <TR>
        <td class="results" nowrap width="1%"><input type=checkbox name="path" value="<TMPL_VAR NAME="path">"><TMPL_VAR NAME="nr"></td>
        <td class="results" width="99%">
-       <TMPL_VAR NAME="headline">
+       <a href="<TMPL_VAR NAME="url_params">&path=<TMPL_VAR NAME="path" escape="URL">" class="headline"><TMPL_VAR NAME="headline"></a>
        <!--
        <i><TMPL_VAR NAME="path"></i>
        <b><TMPL_VAR NAME="rank"></b>