Skip to content

Commit

Permalink
Use absolute URLs in show emails, fix #565
Browse files Browse the repository at this point in the history
  • Loading branch information
GKFX committed Jan 15, 2019
1 parent fd75bea commit 8268b3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/Resources/views/email/show_created.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"publisher": {
"@type": "Organization",
"name": "Camdram",
"url": "http://www.camdram.net/"
"url": "https://www.camdram.net/"
}
}
</script>

<!-- Email text -->
<p>A new show has been added to <a href = 'http://www.camdram.net/'>camdram.net</a> by {% if owners | length > 0 %}by {% endif %}{% for owner in owners %}{{ owner.name }} (<a href="mailto:{{ owner.email }}">{{ owner.email }}</a>){% if not loop.last %}, {% endif %}{% endfor %} and must be manually authorised before it is shown in any public areas. This process ensures all shows are checked over by the producing society or venue before they are advertised. In particular, please check the following details are correct:
<p>A new show has been added to <a href = 'https://www.camdram.net/'>camdram.net</a> by {% if owners | length > 0 %}by {% endif %}{% for owner in owners %}{{ owner.name }} (<a href="mailto:{{ owner.email }}">{{ owner.email }}</a>){% if not loop.last %}, {% endif %}{% endfor %} and must be manually authorised before it is shown in any public areas. This process ensures all shows are checked over by the producing society or venue before they are advertised. In particular, please check the following details are correct:
<ul>
<li>Dates</li>
<li>Venue</li>
Expand All @@ -31,13 +31,13 @@

before authorizing.</p>

<p>A summary of the show is given below. You can edit, authorise or delete the show as appropriate by visiting: <a href = '{{ url('get_show', {identifier: show.slug}) }}'>{{ url('get_show', {identifier: show.slug}) }}</a></p>
<p>A summary of the show is given below. You can edit, authorise or delete the show as appropriate by visiting: <a href = 'https:{{ url('get_show', {identifier: show.slug}, true) }}'>{{ url('get_show', {identifier: show.slug}) }}</a></p>

{% include 'email/signature.html.twig' %}

<h3>Show details follow</h3 >

{% include 'show/advert_header.html.twig' %}
{% include 'show/advert_header.html.twig' with { full_urls: true } %}
<p>
{{ show.description }}
</p>
Expand Down
9 changes: 5 additions & 4 deletions app/Resources/views/show/advert_header.html.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{# A common template for displaying information of about a show in any kind
of advert i.e. auditions, production team vancancies, and applications to
direct or produce. #}
<h4><a href="{{ path('get_show',
direct or produce.
Uses url() so it's safe to include in emails. #}
<h4><a href="{{ url('get_show',
{identifier: show.slug}) }}">{{ show.name }}</a>
{% for society in show.prettysocdata %}
{{- loop.index == 1 ? "" -}}
{%- if society.id is defined -%}
<a href="{{ path('get_society', {identifier: society.slug}) }}">{{ society.shortname ?: society.name }}</a>
<a href="{{ url('get_society', {identifier: society.slug}) }}">{{ society.shortname ?: society.name }}</a>
{%- else -%}
{{ society.name }}
{%- endif -%}
Expand All @@ -17,7 +18,7 @@
{% endif -%}
{% endfor %}
</h4>
<p>{% include 'performance/show.html.twig' with { 'performances' : show.performances} %}
<p>{% include 'performance/show.html.twig' with { 'performances' : show.performances } %}
{% if show.weeks is not empty %}
<em>{{ show.weeks }}</em>
{% endif %}
Expand Down

0 comments on commit 8268b3f

Please sign in to comment.