mirror of
https://github.com/koniu/recoll-webui.git
synced 2025-10-03 09:49:25 +02:00
restore open local file function (closes #54)
Signed-off-by: koniu <koniu@riseup.net>
This commit is contained in:
parent
cfb65646f4
commit
4e748d6544
4 changed files with 24 additions and 5 deletions
|
@ -76,6 +76,8 @@ body { margin: 0; font-family: sans-serif }
|
|||
.search-result-url { clear:left; }
|
||||
.search-result-url a { color: #5a5; font-size: 8pt; float: left; margin-right: 1em;}
|
||||
.search-result-links { color: #aaf; font-size: 8pt; float: left; margin-right: 1em; visibility: hidden }
|
||||
.search-result-links a { padding-right: 0.5em; }
|
||||
.search-result-links a:hover { text-decoration: underline }
|
||||
.search-result:hover > .search-result-links { visibility: visible }
|
||||
.search-result-date { color: #777; font-size: 8pt; float: right; margin-bottom: 7px; }
|
||||
.search-result-size { color: #777; font-size: 8pt; float: right; display: none; }
|
||||
|
@ -114,7 +116,7 @@ tr { vertical-align: top }
|
|||
#settings-box {
|
||||
padding: 1em;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
top: 5%;
|
||||
left: 30%;
|
||||
right: 30%;
|
||||
background: #eee;
|
||||
|
|
|
@ -7,7 +7,15 @@
|
|||
%url = url.replace(dr, prefix)
|
||||
%end
|
||||
<div class="search-result-title" id="r{{d['sha']}}" title="{{d['abstract']}}">
|
||||
<a href="download/{{number-1}}?{{query_string}}">{{d['label']}}</a>
|
||||
%if config.has_key('title_link') and config['title_link'] != 'download':
|
||||
%if config['title_link'] == 'open':
|
||||
<a href="{{url}}">{{d['label']}}</a>
|
||||
%elif config['title_link'] == 'preview':
|
||||
<a href="preview/{{number-1}}?{{query_string}}">{{d['label']}}</a>
|
||||
%end
|
||||
%else:
|
||||
<a href="download/{{number-1}}?{{query_string}}">{{d['label']}}</a>
|
||||
%end
|
||||
</div>
|
||||
%if len(d['ipath']) > 0:
|
||||
<div class="search-result-ipath">[{{d['ipath']}}]</div>
|
||||
|
@ -22,11 +30,13 @@
|
|||
%end
|
||||
<a href="{{os.path.dirname(url)}}">{{urllabel}}</a>
|
||||
</div>
|
||||
%if hasrclextract:
|
||||
<div class="search-result-links">
|
||||
<a href="preview/{{number-1}}?{{query_string}}" target="_blank">Preview</a>
|
||||
<a href="{{url}}">Open</a>
|
||||
<a href="download/{{number-1}}?{{query_string}}">Download</a>
|
||||
%if hasrclextract:
|
||||
<a href="preview/{{number-1}}?{{query_string}}" target="_blank">Preview</a>
|
||||
%end
|
||||
</div>
|
||||
%end
|
||||
<div class="search-result-date">{{d['time']}}</div>
|
||||
<div class="search-result-snippet">{{!d['snippet']}}</div>
|
||||
</div>
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
<input name="timefmt" value={{timefmt}}>
|
||||
<b>Folder depth</b> <small class="gray">(number of levels of the folder dropdown)</small>
|
||||
<input name="dirdepth" value={{dirdepth}}>
|
||||
<b>Default action</b> <small class="gray">(action to take when clicking result title)</small>
|
||||
<select name="title_link">
|
||||
<option value="download" {{'selected' if title_link == 'download' else ''}}>Download</option>
|
||||
<option value="preview" {{'selected' if title_link == 'preview' else ''}}>Preview</option>
|
||||
<option value="open" {{'selected' if title_link == 'open' else ''}}>Open</option>
|
||||
</select>
|
||||
<hr>
|
||||
<b>Locations</b><br>
|
||||
%for d in dirs:
|
||||
|
|
1
webui.py
1
webui.py
|
@ -39,6 +39,7 @@ DEFAULTS = {
|
|||
'maxresults': 0,
|
||||
'perpage': 25,
|
||||
'csvfields': 'filename title author size time mtype url',
|
||||
'title_link': 'download',
|
||||
}
|
||||
|
||||
# sort fields/labels
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue