Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3cb180

Browse files
authored
Merge pull request #5147 from Zharktas/refactor_broken_bulk_process_layout
Fix broken layout in organization bulk_process
2 parents 090bc82 + 0482b44 commit f3cb180

2 files changed

Lines changed: 22 additions & 23 deletions

File tree

ckan/templates/organization/bulk_process.html

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% block primary_content_inner %}
1010
<div class="row">
1111
<h1 class="hide-heading">{{ _('Edit datasets') }}</h1>
12-
<div class="primary col-md-8">
12+
<div class="primary col-md-12">
1313
<h3 class="page-heading">
1414
{% block page_heading %}
1515
{%- if page.item_count -%}
@@ -21,6 +21,16 @@ <h3 class="page-heading">
2121
{%- endif -%}
2222
{% endblock %}
2323
</h3>
24+
25+
{% block search_form %}
26+
{% set sorting = [
27+
(_('Name Ascending'), 'title_string asc'),
28+
(_('Name Descending'), 'title_string desc'),
29+
(_('Last Modified'), 'data_modified desc') ]
30+
%}
31+
{% 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=' ' %}
32+
{% endblock %}
33+
2434
{% block form %}
2535
{% if page.item_count %}
2636
<form method="POST" data-module="basic-form">
@@ -89,24 +99,13 @@ <h3 class="dataset-heading">
8999
{% endif %}
90100
{% endblock %}
91101
</div>
92-
<aside class="tertiary col-md-4">
93-
{% block tertiary_content %}
94-
95-
{% block search_form %}
96-
{% set sorting = [
97-
(_('Name Ascending'), 'title_string asc'),
98-
(_('Name Descending'), 'title_string desc'),
99-
(_('Last Modified'), 'data_modified desc') ]
100-
%}
101-
{% 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=' ' %}
102-
{% endblock %}
103-
104-
{#{% 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' %}#}
105-
{% for facet in facet_titles %}
106-
{{ h.snippet('snippets/facet_list.html', title=facet_titles[facet], name=facet, extras={'id':group_dict.id}) }}
107-
{% endfor %}
108-
{% endblock %}
109-
</aside>
110102
</div>
111103
{{ page.pager() }}
112104
{% endblock %}
105+
106+
{% block secondary_content %}
107+
{{ super() }}
108+
{% for facet in c.facet_titles %}
109+
{{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, extras={'id':group_dict.id}) }}
110+
{% endfor %}
111+
{% endblock %}

ckan/tests/controllers/test_organization.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def test_make_private(self, app):
297297
self.organization = factories.Organization(user=self.user)
298298

299299
datasets = [
300-
factories.Dataset(owner_org=self.organization["id"])
300+
factories.Dataset(owner_org=self.organization["id"], private=False)
301301
for i in range(0, 5)
302302
]
303303
response = app.get(
@@ -306,7 +306,7 @@ def test_make_private(self, app):
306306
),
307307
extra_environ=self.user_env,
308308
)
309-
form = response.forms[1]
309+
form = response.forms[2]
310310
for v in form.fields.values():
311311
try:
312312
v[0].checked = True
@@ -338,7 +338,7 @@ def test_make_public(self, app):
338338
),
339339
extra_environ=self.user_env,
340340
)
341-
form = response.forms[1]
341+
form = response.forms[2]
342342
for v in form.fields.values():
343343
try:
344344
v[0].checked = True
@@ -369,7 +369,7 @@ def test_delete(self, app):
369369
),
370370
extra_environ=self.user_env,
371371
)
372-
form = response.forms[1]
372+
form = response.forms[2]
373373
for v in form.fields.values():
374374
try:
375375
v[0].checked = True

0 commit comments

Comments
 (0)