Skip to content

Commit

Permalink
Merge branch 'proof-of-concept' of github.com:nationalarchives/ds-etn…
Browse files Browse the repository at this point in the history
…a-frontend into proof-of-concept
  • Loading branch information
ahosgood committed Jan 15, 2024
2 parents cc16d08 + 4f1ae58 commit 6fcfd4b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/catalogue/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@bp.route("/id/<id>/")
@cache.cached(key_prefix=cache_key_prefix)
def info(id):
def details(id):
records_api = RecordAPI(id)
record_data = records_api.get_results()
type = record_data["type"]
Expand Down
2 changes: 1 addition & 1 deletion app/templates/catalogue/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h3 class="tna-heading-m" id="collection-{{ agent }}">{{ agent | capitalize }} (
<ul class="tna-ul">
{% for item in data.agents[agent] %}
<li>
<a href="{{ url_for('catalogue.info', id=item.id) }}">{{ item.name }}</a>
<a href="{{ url_for('catalogue.details', id=item.id) }}">{{ item.name }}</a>
{% if item.places %}
{{ ', '.join(item.places) }}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/catalogue/record.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2 class="tna-heading-l">Description and record details</h2>
{% endif %}
{% if data.held_by %}
<dt>Held by</dt>
<dd><a href="{{ url_for('catalogue.info', id=data.held_by.id) }}">{{ data.held_by.name }}</a></dd>
<dd><a href="{{ url_for('catalogue.details', id=data.held_by.id) }}">{{ data.held_by.name }}</a></dd>
{% endif %}
{% if data.legal_status %}
<dt>Legal status</dt>
Expand Down
4 changes: 2 additions & 2 deletions app/templates/explore/record-article.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ <h2 class="tna-heading-l">Why this record matters</h2>
<dt>Catalogue reference</dt>
<dd>
<a class="record-matters__text record-matters__text--bold"
href="https://discovery.nationalarchives.gov.uk/details/r/{{ page_data['record'] }}">{{ page_data['record'] }}</a>
href="{{ url_for('catalogue.details', id=page_data['record']) }}">{{ page_data['record'] }}</a>
</dd>
</dl>
{{ page_data['about'] | safe }}
<div class="tna-button-group tna-button-group--full">
{{ tnaButton({
'text': 'View record details',
'href': 'https://discovery.nationalarchives.gov.uk/details/r/' + page_data['record'],
'href': url_for('catalogue.details', id=page_data['record']),
'accent': True
}) }}
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/templates/macros/article-blocks.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ <h3 class="tna-heading-s">
'height': image['height'],
'collection': "TS 11/45/167",
'title': i['descriptive_title'],
'href': 'https://discovery.nationalarchives.gov.uk/details/r/' + i['record'],
'href': url_for('catalogue.details', id=i['record']),
'date': i['record_dates']
}) or "" }}
{% endwith %}
{% else %}
{{ items.append({
'collection': "TS 11/45/167",
'title': i['descriptive_title'],
'href': 'https://discovery.nationalarchives.gov.uk/details/r/' + i['record'],
'href': url_for('catalogue.details', id=i['record']),
'date': i['record_dates']
}) or "" }}
{% endif %}
Expand Down
12 changes: 6 additions & 6 deletions app/templates/search/catalogue.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,16 +398,16 @@ <h2 class="tna-heading-xl tna-!--hide-on-large tna-!--hide-on-medium tna-!--marg
'title': result.title,
'headingLevel': 3,
'headingSize': 's',
'href': url_for('catalogue.info', id=result.id),
'href': url_for('catalogue.details', id=result.id),
'body': '<p>' + result.description + '</p>' if result.description else '',
'meta': [
{
'text': result.held_by.name
} if result.held_by else None,
{
'text': result.covering_date,
'text': result.date,
'icon': 'calendar'
} if result.covering_date else None,
} if result.date else None,
{
'text': 'Reference ' + result.ref
} if result.ref else None
Expand All @@ -426,7 +426,7 @@ <h2 class="tna-heading-xl tna-!--hide-on-large tna-!--hide-on-medium tna-!--marg
{% for result in results.results %}
<article>
<h3 class="tna-heading-m">
<a href="{{ url_for('catalogue.info', id=result.id) }}">{{ result.title }}</a>
<a href="{{ url_for('catalogue.details', id=result.id) }}">{{ result.title }}</a>
</h3>
<dl class="tna-dl tna-dl--plain tna-dl--icon-padding">
{% if result.held_by %}
Expand All @@ -436,12 +436,12 @@ <h3 class="tna-heading-m">
</dt>
<dd>{{ result.held_by.name }}</dd>
{% endif %}
{% if result.covering_date %}
{% if result.date %}
<dt>
<i class="fa-solid fa-calendar"></i>
Date
</dt>
<dd>{{ result.covering_date }}</dd>
<dd>{{ result.date }}</dd>
{% endif %}
{% if result.ref %}
<dt>
Expand Down

0 comments on commit 6fcfd4b

Please sign in to comment.