Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jean-Francois Dockes
recoll-webui
Commits
740f507c
Commit
740f507c
authored
Mar 03, 2013
by
koniu
Browse files
py/tpl: fix
#4
('..' breaks WSGI, use './' instead)
Thanks to nberelidze@github for spotting and providing solution.
parent
7824cd35
Changes
5
Hide whitespace changes
Inline
Side-by-side
views/pages.tpl
View file @
740f507c
%q = dict(query)
%def page_href(page):
%q['page'] = page
%return '.
.
/results?%s' % urllib.urlencode(q)
%return './results?%s' % urllib.urlencode(q)
%end
%if nres > 0:
%import math, urllib
...
...
views/results.tpl
View file @
740f507c
...
...
@@ -7,8 +7,8 @@
</div>
%if len(res) > 0:
<div
id=
"downloads"
>
<a
href=
".
.
/json?{
{
query_string
}
}"
>
JSON
</a>
<a
href=
".
.
/csv?{
{
query_string
}
}"
>
CSV
</a>
<a
href=
"./json?{
{
query_string
}
}"
>
JSON
</a>
<a
href=
"./csv?{
{
query_string
}
}"
>
CSV
</a>
</div>
%end
<br
style=
"clear: both"
>
...
...
views/search.tpl
View file @
740f507c
...
...
@@ -7,7 +7,7 @@
<b>
Query
</b>
<input
tabindex=
"0"
type=
"search"
name=
"query"
value=
"{
{
query
[
'query'
]
}
}"
autofocus
><br><br>
<input
type=
"submit"
value=
"Search"
>
<a
href=
".
.
"
tabindex=
"-1"
><input
type=
"button"
value=
"Reset"
></a>
<a
href=
".
/
"
tabindex=
"-1"
><input
type=
"button"
value=
"Reset"
></a>
<a
href=
"settings"
tabindex=
"-1"
><input
type=
"button"
value=
"Settings"
></a>
</td>
<td
width=
"30%"
>
...
...
views/settings.tpl
View file @
740f507c
...
...
@@ -23,7 +23,7 @@
%end
<br><br><hr>
<input
type=
"submit"
value=
"Save"
>
<a
href=
".
.
"
><input
type=
"button"
value=
"Cancel"
></a>
<a
href=
".
/
"
><input
type=
"button"
value=
"Cancel"
></a>
</form>
</div>
%include footer
webui.py
View file @
740f507c
...
...
@@ -274,7 +274,7 @@ def set():
for
d
in
config
[
'dirs'
]:
cookie_name
=
'mount_%s'
%
urllib
.
quote
(
d
,
''
)
bottle
.
response
.
set_cookie
(
cookie_name
,
str
(
bottle
.
request
.
query
.
get
(
'mount_%s'
%
d
)),
max_age
=
3153600000
)
bottle
.
redirect
(
'.
.
'
)
bottle
.
redirect
(
'.
/
'
)
#}}}
#}}}
# vim: fdm=marker:tw=80:ts=4:sw=4:sts=4:et
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment