Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into py3-run-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Jan 17, 2020
2 parents f5f4a40 + f3cb180 commit e4529d7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
37 changes: 18 additions & 19 deletions ckan/templates/organization/bulk_process.html
Expand Up @@ -9,7 +9,7 @@
{% block primary_content_inner %}
<div class="row">
<h1 class="hide-heading">{{ _('Edit datasets') }}</h1>
<div class="primary col-md-8">
<div class="primary col-md-12">
<h3 class="page-heading">
{% block page_heading %}
{%- if page.item_count -%}
Expand All @@ -21,6 +21,16 @@ <h3 class="page-heading">
{%- endif -%}
{% endblock %}
</h3>

{% block search_form %}
{% set sorting = [
(_('Name Ascending'), 'title_string asc'),
(_('Name Descending'), 'title_string desc'),
(_('Last Modified'), 'data_modified desc') ]
%}
{% snippet 'snippets/search_form.html', form_id='organization-datasets-search-form', type='dataset', query=q, count=page.item_count, sorting=sorting, sorting_selected=sort_by_selected, no_title=true, search_class=' ' %}
{% endblock %}

{% block form %}
{% if page.item_count %}
<form method="POST" data-module="basic-form">
Expand Down Expand Up @@ -89,24 +99,13 @@ <h3 class="dataset-heading">
{% endif %}
{% endblock %}
</div>
<aside class="tertiary col-md-4">
{% block tertiary_content %}

{% block search_form %}
{% set sorting = [
(_('Name Ascending'), 'title_string asc'),
(_('Name Descending'), 'title_string desc'),
(_('Last Modified'), 'data_modified desc') ]
%}
{% snippet 'snippets/search_form.html', form_id='organization-datasets-search-form', type='dataset', query=q, count=page.item_count, sorting=sorting, sorting_selected=sort_by_selected, no_title=true, search_class=' ' %}
{% endblock %}

{#{% snippet 'snippets/simple_search.html', q=q, sort=sort_by_selected, placeholder=_('Search datasets...'), extra_sort=[(_('Last Modified'), 'data_modified asc')], input_class='search-normal', form_class='search-aside' %}#}
{% for facet in facet_titles %}
{{ h.snippet('snippets/facet_list.html', title=facet_titles[facet], name=facet, extras={'id':group_dict.id}) }}
{% endfor %}
{% endblock %}
</aside>
</div>
{{ page.pager() }}
{% endblock %}

{% block secondary_content %}
{{ super() }}
{% for facet in c.facet_titles %}
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':group_dict.id}) }}
{% endfor %}
{% endblock %}
11 changes: 6 additions & 5 deletions ckan/tests/controllers/test_organization.py
Expand Up @@ -238,7 +238,7 @@ def test_delete_organization_with_datasets(self, app, initial_data):
data={"delete": ""}
)

assert text in response.body
assert helpers.body_contains(response, text)

def test_delete_organization_with_unknown_dataset_true(self, initial_data):
""" Test deletion of organization that has datasets and unknown
Expand Down Expand Up @@ -266,7 +266,7 @@ def test_make_private(self, app):
self.organization = factories.Organization(user=self.user)

datasets = [
factories.Dataset(owner_org=self.organization["id"])
factories.Dataset(owner_org=self.organization["id"], private=False)
for i in range(0, 5)
]
form = {'dataset_' + d["id"]: "on" for d in datasets}
Expand Down Expand Up @@ -322,6 +322,7 @@ def test_delete(self, app):
"organization.bulk_process", id=self.organization["id"]
),
extra_environ=self.user_env,

data=form
)

Expand Down Expand Up @@ -395,9 +396,9 @@ def test_organization_search_no_results(self, app):
org_names = [n.string for n in org_names]

assert len(org_names) == 0
assert (
assert helpers.body_contains(
search_response,
'No organizations found for "No Results Here"'
in search_response.body
)


Expand Down Expand Up @@ -488,7 +489,7 @@ def test_organization_search_within_org_no_results(self, app):
query_string={"q": "Nout"}
)

assert 'No datasets found for "Nout"' in search_response.body
assert helpers.body_contains(search_response, 'No datasets found for "Nout"')

search_response_html = BeautifulSoup(search_response.body)

Expand Down
2 changes: 1 addition & 1 deletion ckan/views/group.py
Expand Up @@ -322,7 +322,7 @@ def pager_url(q=None, page=None):
and len(value) and not param.startswith(u'_'):
if not param.startswith(u'ext_'):
fields.append((param, value))
q += u' %s: "%s"' % (param, value)
fq += u' %s: "%s"' % (param, value)
if param not in fields_grouped:
fields_grouped[param] = [value]
else:
Expand Down

0 comments on commit e4529d7

Please sign in to comment.