Skip to content

Commit

Permalink
Merge branch 'uat'
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCalvert committed Feb 26, 2024
2 parents 8ffc69c + 7cdf5a7 commit dfeeef4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 45 deletions.
2 changes: 1 addition & 1 deletion ckanext/qdes_schema/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def _build_and_clean_up_qld_cdp(des_package_dict, external_package_dict=None, re
qld_cdp_pkg_dict['license_id'] = helpers.map_license(des_package_dict['license_id'],
constants.PUBLISH_EXTERNAL_IDENTIFIER_QLD_CDP_SCHEMA)
qld_cdp_pkg_dict['owner_org'] = os.getenv(constants.get_owner_org(constants.PUBLISH_EXTERNAL_IDENTIFIER_QLD_CDP_SCHEMA))
qld_cdp_pkg_dict['data_custodian'] = "department-of-environment-and-science"
qld_cdp_pkg_dict['data_custodian'] = "environment-science-and-innovation"
qld_cdp_pkg_dict['publisher'] = "Department of Environment and Science"
contact_point = get_action('get_secure_vocabulary_record')(
{'user': site_user}, {'vocabulary_name': 'point-of-contact', 'query': des_package_dict.get('contact_point')})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<article class="unpublish-wrapper">
<input id="unpublish-wrapper" type="checkbox" name="tabs" aria-controls="unpublish-wrapper-content" aria-expanded="true"
role="checkbox" tabindex="-1" checked>
<input id="unpublish-wrapper" type="checkbox" name="tabs" aria-controls="unpublish-wrapper-content"
aria-expanded="true" role="checkbox" tabindex="-1" checked>
<button class="acc-heading">
<label for="unpublish-wrapper" class="no-colon">
<span class="title">Unpublish records from external portals</span>
Expand All @@ -9,67 +9,71 @@
</button>

<div class="collapsing-section" id="unpublish-wrapper-content">
<form method="post" action="{{ h.url_for('qdes_schema.unpublish_external_dataset_resource', id=pkg.id) }}" novalidate>
<div class="row">
<div class="col-md-4">
<label for="unpublish-resource">Select distribution to unpublish</label>
</div>
<div class="col-md-8">
<div class="form-group">
{% if not published_distributions %}
<form method="post" action="{{ h.url_for('qdes_schema.unpublish_external_dataset_resource', id=pkg.id) }}"
novalidate>
<div class="row">
<div class="col-md-4">
<label for="unpublish-resource">Select distribution to unpublish</label>
</div>
<div class="col-md-8">
<div class="form-group">
{% if not published_distributions %}
No distributions.
{% else %}
<table class="table">
<thead>
<tr>
<th> Distribution </th>
<th> Portal </th>
<th> Select </th>
</tr>
</thead>
<tbody>
{% for distribution, publish_logs in published_distributions.items() %}
{% else %}
<table class="table">
<thead>
<tr>
<th> Distribution </th>
<th> Portal </th>
<th> Select </th>
</tr>
</thead>
<tbody>
{% for distribution, publish_logs in published_distributions.items() %}
{% for publish_log in publish_logs %}
<tr>
{% set ns = namespace() %}
{% for resource in pkg.resources %}
{% if resource.id == publish_log.resource_id %}
{% set ns.resource = resource %}
{% endif %}
{% if resource.id == publish_log.resource_id %}
{% set ns.resource = resource %}
{% endif %}
{% endfor %}
{% set schema_resources = h.dump_json({"resource_id":publish_log.resource_id, "destination": publish_log.destination}) %}
{% set schema_resources = h.dump_json({"resource_id":publish_log.resource_id, "destination":
publish_log.destination}) %}
<td><label class="no-colon"> {{ h.get_distribution_naming(pkg, ns.resource) }}</label> </td>
<td><label class="no-colon"> {{ h.get_portal_naming(publish_log.destination) }} </label> </td>
<td> <label class="no-colon"> <input class="resources" id="{{publish_log.id}}" type="checkbox" name="schema_resources" value="{{schema_resources}}"/> </label></td>
<td> <label class="no-colon"> <input class="resources" id="{{publish_log.id}}" type="checkbox"
name="schema_resources" value="{{schema_resources}}" /> </label></td>
</tr>
</tbody>
{% endfor %}
</tbody>
{% endfor %}
</table>
{% endif %}
{% endfor %}
</table>
{% endif %}
</div>
</div>
</div>
</div>


<div class="row form-group">
<div class="col-md-10">
{% if unpublish == 1 %}
<div class="row form-group">
<div class="col-md-10">
{% if unpublish == 1 %}
<div class="alert alert-info" role="alert">
The distribution(s) has been queued for unpublishing.
</div>
{% elif unpublish == 0 %}
{% elif unpublish == 0 %}
<div class="alert alert-error" role="alert">
The distribution(s) could not be queued for unpublishing.
</div>
{% endif %}
</div>
<div class="col-md-2">
<button
class="btn btn-default btn-block unpublish"
type="submit" name="action" value="unpublish" disabled>Unpublish</button>
{% endif %}
</div>
<div class="col-md-2">
<button class="btn btn-default btn-block unpublish" type="submit" name="action" value="unpublish" disabled
data-module="confirm-action"
data-module-content="Before unpublishing this record please ensure you have approval from the appropriate authority"
data-module-with-data=true>Unpublish</button>
</div>
</div>
</div>
</form>
</form>
</div>
</article>
</article>

0 comments on commit dfeeef4

Please sign in to comment.