File tree Expand file tree Collapse file tree 4 files changed +24
-5
lines changed Expand file tree Collapse file tree 4 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ body { margin: 0; font-family: sans-serif }
76
76
.search-result-url { clear : left; }
77
77
.search-result-url a { color : # 5a5 ; font-size : 8pt ; float : left; margin-right : 1em ;}
78
78
.search-result-links { color : # aaf ; font-size : 8pt ; float : left; margin-right : 1em ; visibility : hidden }
79
+ .search-result-links a { padding-right : 0.5em ; }
80
+ .search-result-links a : hover { text-decoration : underline }
79
81
.search-result : hover > .search-result-links { visibility : visible }
80
82
.search-result-date { color : # 777 ; font-size : 8pt ; float : right; margin-bottom : 7px ; }
81
83
.search-result-size { color : # 777 ; font-size : 8pt ; float : right; display : none; }
@@ -114,7 +116,7 @@ tr { vertical-align: top }
114
116
# settings-box {
115
117
padding : 1em ;
116
118
position : absolute;
117
- top : 10 % ;
119
+ top : 5 % ;
118
120
left : 30% ;
119
121
right : 30% ;
120
122
background : # eee ;
Original file line number Diff line number Diff line change 7
7
%url = url.replace(dr, prefix)
8
8
%end
9
9
<div class =" search-result-title" id =" r{ { d[' sha' ]} } " title =" { { d[' abstract' ]} } " >
10
- <a href =" download/{ { number-1} } ?{ { query_string} } " >{ {d[' label' ]} }</a >
10
+ %if config.has_key('title_link') and config['title_link'] != 'download':
11
+ %if config['title_link'] == 'open':
12
+ <a href =" { { url} } " >{ {d[' label' ]} }</a >
13
+ %elif config['title_link'] == 'preview':
14
+ <a href =" preview/{ { number-1} } ?{ { query_string} } " >{ {d[' label' ]} }</a >
15
+ %end
16
+ %else:
17
+ <a href =" download/{ { number-1} } ?{ { query_string} } " >{ {d[' label' ]} }</a >
18
+ %end
11
19
</div >
12
20
%if len(d['ipath']) > 0:
13
21
<div class =" search-result-ipath" >[{ {d[' ipath' ]} }]</div >
22
30
%end
23
31
<a href =" { { os.path.dirname(url)} } " >{ {urllabel} }</a >
24
32
</div >
25
- %if hasrclextract:
26
33
<div class =" search-result-links" >
27
- <a href =" preview/{ { number-1} } ?{ { query_string} } " target =" _blank" >Preview</a >
34
+ <a href =" { { url} } " >Open</a >
35
+ <a href =" download/{ { number-1} } ?{ { query_string} } " >Download</a >
36
+ %if hasrclextract:
37
+ <a href =" preview/{ { number-1} } ?{ { query_string} } " target =" _blank" >Preview</a >
38
+ %end
28
39
</div >
29
- %end
30
40
<div class =" search-result-date" >{ {d[' time' ]} }</div >
31
41
<div class =" search-result-snippet" >{ {! d[' snippet' ]} }</div >
32
42
</div >
Original file line number Diff line number Diff line change 16
16
<input name =" timefmt" value ={ { timefmt} } >
17
17
<b >Folder depth</b > <small class =" gray" >(number of levels of the folder dropdown)</small >
18
18
<input name =" dirdepth" value ={ { dirdepth} } >
19
+ <b >Default action</b > <small class =" gray" >(action to take when clicking result title)</small >
20
+ <select name =" title_link" >
21
+ <option value =" download" { { ' selected' if title_link == ' download' else ' ' } } >Download</option >
22
+ <option value =" preview" { { ' selected' if title_link == ' preview' else ' ' } } >Preview</option >
23
+ <option value =" open" { { ' selected' if title_link == ' open' else ' ' } } >Open</option >
24
+ </select >
19
25
<hr >
20
26
<b >Locations</b ><br >
21
27
%for d in dirs:
Original file line number Diff line number Diff line change 39
39
'maxresults' : 0 ,
40
40
'perpage' : 25 ,
41
41
'csvfields' : 'filename title author size time mtype url' ,
42
+ 'title_link' : 'download' ,
42
43
}
43
44
44
45
# sort fields/labels
You can’t perform that action at this time.
0 commit comments