|
a/views/result.tpl |
|
b/views/result.tpl |
|
... |
|
... |
5 |
%url = d['url'].replace('file://', '')
|
5 |
%url = d['url'].replace('file://', '')
|
6 |
%for dr, prefix in config['mounts'].items():
|
6 |
%for dr, prefix in config['mounts'].items():
|
7 |
%url = url.replace(dr, prefix)
|
7 |
%url = url.replace(dr, prefix)
|
8 |
%end
|
8 |
%end
|
9 |
<div class="search-result-title" id="r{{d['sha']}}" title="{{d['abstract']}}">
|
9 |
<div class="search-result-title" id="r{{d['sha']}}" title="{{d['abstract']}}">
|
|
|
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:
|
10 |
<a href="download/{{number-1}}?{{query_string}}">{{d['label']}}</a>
|
17 |
<a href="download/{{number-1}}?{{query_string}}">{{d['label']}}</a>
|
|
|
18 |
%end
|
11 |
</div>
|
19 |
</div>
|
12 |
%if len(d['ipath']) > 0:
|
20 |
%if len(d['ipath']) > 0:
|
13 |
<div class="search-result-ipath">[{{d['ipath']}}]</div>
|
21 |
<div class="search-result-ipath">[{{d['ipath']}}]</div>
|
14 |
%end
|
22 |
%end
|
15 |
%if d.has_key('author') and len(d['author']) > 0:
|
23 |
%if d.has_key('author') and len(d['author']) > 0:
|
|
... |
|
... |
20 |
%for r in config['dirs']:
|
28 |
%for r in config['dirs']:
|
21 |
%urllabel = urllabel.replace(r.rsplit('/',1)[0] + '/' , '')
|
29 |
%urllabel = urllabel.replace(r.rsplit('/',1)[0] + '/' , '')
|
22 |
%end
|
30 |
%end
|
23 |
<a href="{{os.path.dirname(url)}}">{{urllabel}}</a>
|
31 |
<a href="{{os.path.dirname(url)}}">{{urllabel}}</a>
|
24 |
</div>
|
32 |
</div>
|
25 |
%if hasrclextract:
|
|
|
26 |
<div class="search-result-links">
|
33 |
<div class="search-result-links">
|
|
|
34 |
<a href="{{url}}">Open</a>
|
|
|
35 |
<a href="download/{{number-1}}?{{query_string}}">Download</a>
|
|
|
36 |
%if hasrclextract:
|
27 |
<a href="preview/{{number-1}}?{{query_string}}" target="_blank">Preview</a>
|
37 |
<a href="preview/{{number-1}}?{{query_string}}" target="_blank">Preview</a>
|
|
|
38 |
%end
|
28 |
</div>
|
39 |
</div>
|
29 |
%end
|
|
|
30 |
<div class="search-result-date">{{d['time']}}</div>
|
40 |
<div class="search-result-date">{{d['time']}}</div>
|
31 |
<div class="search-result-snippet">{{!d['snippet']}}</div>
|
41 |
<div class="search-result-snippet">{{!d['snippet']}}</div>
|
32 |
</div>
|
42 |
</div>
|
33 |
<!-- vim: fdm=marker:tw=80:ts=4:sw=4:sts=4:et:ai
|
43 |
<!-- vim: fdm=marker:tw=80:ts=4:sw=4:sts=4:et:ai
|
34 |
-->
|
44 |
-->
|