Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-dgu
Commits
98d1f6b8
Commit
98d1f6b8
authored
Oct 15, 2014
by
Tom Mortimer-Jones
Browse files
[noticket] Display search term at the top of results
parent
c5a9c662
Changes
2
Hide whitespace changes
Inline
Side-by-side
ckanext/dgu/controllers/publisher.py
View file @
98d1f6b8
...
...
@@ -415,10 +415,13 @@ class PublisherController(OrganizationController):
if
request
.
params
.
get
(
'org_name'
):
q
=
q
.
filter_by
(
name
=
request
.
params
.
get
(
'org_name'
))
org
=
model
.
Session
.
query
(
model
.
Group
).
filter_by
(
name
=
request
.
params
.
get
(
'org_name'
)).
one
()
c
.
search_term
=
org
.
title
elif
request
.
params
.
get
(
'parent_name'
):
parent
=
model
.
Session
.
query
(
model
.
Group
).
filter_by
(
name
=
request
.
params
.
get
(
'parent_name'
)).
one
()
child_ids
=
[
ch
[
0
]
for
ch
in
parent
.
get_children_group_hierarchy
(
type
=
'organization'
)]
q
=
q
.
filter
(
model
.
Group
.
id
.
in_
([
parent
.
id
]
+
child_ids
))
c
.
search_term
=
parent
.
title
c
.
count
=
q
.
count
()
...
...
ckanext/dgu/theme/templates/publisher/report_publishers_and_users.html
View file @
98d1f6b8
...
...
@@ -27,6 +27,8 @@
</select>
</form>
<h1
py:if=
"c.search_term"
>
You selected: ${c.search_term}
</h1>
${paginator(c.page)}
<table
py:if=
"c.count"
width=
"100%"
class=
"table table-bordered"
>
...
...
Write
Preview
Markdown
is supported
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