Skip to content

Commit

Permalink
Merge pull request #1804 from uktrade/release
Browse files Browse the repository at this point in the history
Prod Release
  • Loading branch information
webbyfox authored Jun 21, 2022
2 parents c3373e2 + 4988f5c commit e88c1bc
Show file tree
Hide file tree
Showing 40 changed files with 154 additions and 1,451 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python_node_browsers: &python_node_browsers
image: circleci/python:3.9.5-node-browsers

node: &node
image: circleci/node:12
image: cimg/node:16.13

postgres: &postgres
- image: circleci/postgres:10.11-alpine
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,23 @@

### Bugs fixed

- GLS-223 - Multiple office for single region

### Enhancements

- GLS-257 - rollout Market Guide v1 with data pipeline stats
- CHORE - Update node requirement to v16

## [2.9.0](https://github.com/uktrade/great-cms/releases/tag/2.9.0)

[Full Changelog](https://github.com/uktrade/great-cms/compare/2.8.3...2.9.0)

### Enhancements

- GLS-186 - Use data from API for statistics visualisations
- GLS-228 - Add hardcoded visualisations data for Liechtenstein and Portugal
- GLS-241 - Update visualisations data to latest ONS release

## [2.8.3](https://github.com/uktrade/great-cms/releases/tag/2.8.3)

[Full Changelog](https://github.com/uktrade/great-cms/compare/2.8.2...2.8.3)
Expand Down Expand Up @@ -62,7 +77,6 @@
- GLS-180 - Add trade visualisations to Country guide pages
- GLS-189 - Add feature flag for brand homepage banner
- GLS-180 - Extend visualisations to top 5 most visited market guides
- GLS-186 - Use data from API for statistics visualisations

## [2.6.0](https://github.com/uktrade/great-cms/releases/tag/2.6.0)

Expand Down
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![gitflow-image]][gitflow]
[![calver-image]][calver]

**CMS for the GREAT platform - the Department for International Trade (DIT)**
**CMS for the GREAT platform - The Department for International Trade (DIT)**

---

Expand All @@ -23,7 +23,7 @@

### Requirements

* [Python 3.9](https://www.python.org/downloads/release/python-391/)
* [Python 3.9](https://www.python.org/downloads/release/python-3913/)
* [Postgres 10](https://www.postgresql.org/)
* [Redis](https://redis.io/)
* Any [browser based on Chromium](https://en.wikipedia.org/wiki/Chromium_(web_browser)#Browsers_based_on_Chromium)
Expand Down Expand Up @@ -91,13 +91,6 @@ You can also use regular pytest filters:
HEADLESS=false make ARGUMENTS="-k test_anonymous_user_should" pytest
```

### Getting started

$ make ARGUMENTS=bootstrap_great manage

It creates the Great domestic empty homepage and assigns it to the site root. It also creates a superuser `test` with
password `password`, for local development.

## Geolocation data

This project includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com/
Expand Down
1 change: 0 additions & 1 deletion config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@
FEATURE_SHOW_REPORT_BARRIER_CONTENT = env.bool('FEATURE_SHOW_REPORT_BARRIER_CONTENT', False)
FEATURE_SHOW_MARKET_GUIDE_BAU_LINKS = env.bool('FEATURE_SHOW_MARKET_GUIDE_BAU_LINKS', False)
FEATURE_SHOW_MARKET_GUIDE_VISUALISATIONS = env.bool('FEATURE_SHOW_MARKET_GUIDE_VISUALISATIONS', False)
FEATURE_DATA_PIPELINE_STATS = env.bool('FEATURE_DATA_PIPELINE_STATS', False)
FEATURE_SHOW_BRAND_BANNER = env.bool('FEATURE_SHOW_BRAND_BANNER', False)
FEATURE_SHOW_MAGNA_LINKS_IN_HEADER = env.bool('FEATURE_SHOW_MAGNA_LINKS_IN_HEADER', False)
FEATURE_SHOW_INTERNATIONAL_FOOTER_LINK = env.bool('FEATURE_SHOW_INTERNATIONAL_FOOTER_LINK', False)
Expand Down
3 changes: 2 additions & 1 deletion contact/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def retrieve_regional_office(postcode):
def extract_regional_office_details(all_offices):
matches = [office for office in all_offices if office['is_match']]
formatted_office_details = format_office_details(matches)
return formatted_office_details[0] if formatted_office_details else None
return formatted_office_details if formatted_office_details else None


def extract_other_offices_details(all_offices):
Expand All @@ -35,6 +35,7 @@ def format_office_details(office_list):
address.append(office['address_postcode'])
office = {'address': '\n'.join(address), **office}
offices.append(office)

return offices if len(offices) > 0 else None


Expand Down
38 changes: 24 additions & 14 deletions contact/templates/domestic/contact/office-finder.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,45 @@ <h1 class="heading-large">Find your local trade office</h1>
</form>
</section>

{% if not office_details and other_offices %}
<p> We couldn’t find an exact match for your postcode. You can contact a DIT office near you.</p>
{% endif %}
{% if not office_details and other_offices %}
<p> We couldn’t find an exact match for your postcode. You can contact a DIT office near you.</p>
{% endif %}

{% if office_details %}
{% if not office_details.override_office_details %}

<section class="width-half" id="results">

<h2 class="heading-medium">Your local Trade office{%if office_details|length > 1 %}s{% endif %} for {{ form.cleaned_data.postcode }} is</h2>
<hr>
</section>

{% for office in office_details %}
{% if not office.override_office_details %}
<section class="width-half" id="results">
<h2 class="heading-medium">Your local Trade office for {{ form.cleaned_data.postcode }} is</h2>
<hr>
<h3 class="heading-medium" id="office-name">{{ office_details.name }}</h3>
{{ office_details.address|linebreaks }}
<h3 class="heading-medium" id="office-name">{{ office.name }}</h3>
{{ office.address|linebreaks }}
<h3 class="heading-medium">Telephone</h3>
<p><a class="link" href="tel:{{ office_details.phone }}">{{ office_details.phone }}</a></p>
<p><a class="link" href="tel:{{ office.phone }}">{{ office.phone }}</a></p>
{% if office_details.phone_other %}
<h3 class="heading-medium">{{ office_details.phone_other_comment }}</h3>
<p><a class="link" href="tel:{{ office_details.phone_other }}">{{ office_details.phone_other }}</a></p>
<h3 class="heading-medium">{{ office.phone_other_comment }}</h3>
<p><a class="link" href="tel:{{ office.phone_other }}">{{ office.phone_other }}</a></p>
{% endif %}
<br>
<a href="{% url 'contact:office-finder-contact' postcode=form.cleaned_data.postcode %}" class="button">Contact {{ office_details.name }} office</a>
<a href="{% url 'contact:office-finder-contact' postcode=form.cleaned_data.postcode %}" class="button">Contact {{ office.name }} office</a>

</section>
{% else %}
<section class="width-half" id="results">
<h2 class="heading-medium">Your local Trade office for {{ form.cleaned_data.postcode }} is</h2>
<hr>
<h3 class="heading-medium" id="office-name">{{ office_details.name }}</h3>
{{ office_details.override_office_details|safe }}
<h3 class="heading-medium" id="office-name">{{ office.name }}</h3>
{{ office.override_office_details|safe }}
<hr>
</section>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>

Expand Down
Loading

0 comments on commit e88c1bc

Please sign in to comment.