Skip to content

Commit

Permalink
Merge pull request #44 from liip/fix/display-that-dataset-is-private
Browse files Browse the repository at this point in the history
Fix/display that dataset is private
  • Loading branch information
bellisk authored Jan 29, 2024
2 parents 419587a + 03f9819 commit 9710de9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 28 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,5 @@ jobs:
docker exec test_ckan $WORKDIR/bin/install_test_requirements.sh
- name: Run tests
run: |
docker ps
docker exec test_ckan pytest --ckan-ini=$WORKDIR/test.ini --disable-warnings --cov=ckanext.switzerland \
$WORKDIR/ckanext/switzerland/tests
2 changes: 1 addition & 1 deletion bin/install_test_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Install requirements and ckanext
pip install -r /__w/ckanext-switzerland/ckanext-switzerland/requirements.txt
pip install -r /__w/ckanext-switzerland/ckanext-switzerland/dev-requirements.txt
pip install --ignore-installed -r /__w/ckanext-switzerland/ckanext-switzerland/dev-requirements.txt
pip install -e /__w/ckanext-switzerland/ckanext-switzerland/

# Install ckanext dependencies
Expand Down
1 change: 1 addition & 0 deletions ckanext/switzerland/harvester/s3_storage_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
...
`
"""

import datetime
import logging
import os
Expand Down
34 changes: 11 additions & 23 deletions ckanext/switzerland/templates/package/read.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@

{% block maintag_class %}dataset-detail{% endblock %}

{% block page_title %}
{% if pkg.private %}
<span><i class="fa fa-lock"></i> {{ _('Private') }}</span>
{% endif %}
<h1>
{{ h.dataset_display_name(pkg) }}
{% if pkg.state.startswith('draft') %}
[{{ _('Draft') }}]
{% endif %}
{% if pkg.state == 'deleted' %}
[{{ _('Deleted') }}]
{% endif %}
</h1>
{% endblock %}

{% block primary_content_inner %}

{% block package_revision_info %}
Expand All @@ -34,17 +19,20 @@ <h1>
{% endif %}
{% endblock %}

<h1>
{% block page_heading %}
{{ h.dataset_display_name(pkg) }}
{% if pkg.state.startswith('draft') %}
[{{ _('Draft') }}]
{% endif %}
{% if pkg.state == 'deleted' %}
[{{ _('Deleted') }}]
{% if pkg.private %}
<span><i class="fa fa-lock"></i> {{ _('Private') }}</span>
{% endif %}
<h1>
{{ h.dataset_display_name(pkg) }}
{% if pkg.state.startswith('draft') %}
[{{ _('Draft') }}]
{% endif %}
{% if pkg.state == 'deleted' %}
[{{ _('Deleted') }}]
{% endif %}
</h1>
{% endblock %}
</h1>

{% block package_description %}
{% snippet "package/snippets/description.html", pkg=pkg %}
Expand Down
7 changes: 4 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
black==22.12.0
flake8==6.1.0
black==24.1.1
flake8==7.0.0
fs==2.4.16
isort==5.12.0
isort==5.13.2
mock==5.1.0
numpy==1.25.2
pycodestyle==2.11.1
pytest==7.1.3
pytest-ckan==0.0.12
pytest-cov==3.0.0
Expand Down

0 comments on commit 9710de9

Please # to comment.