Skip to content

Commit

Permalink
refactore templates
Browse files Browse the repository at this point in the history
  • Loading branch information
devketanpro committed Jan 15, 2024
1 parent 3f8906d commit 5b2efc0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
8 changes: 4 additions & 4 deletions server/theme/email_agenda.fr_ca.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ <h3>Élément de couverture:</h3>
<p><b>Statut de couverture: </b>{{get_coverage_status(cov)}}</p>
<p><b>Date et heure d’échéance de la couverture: </b>{{get_coverage_date(cov)}}</p>
<p><b>Affecté à: </b>
{{cov['assigned_desk_name']}}
{{cov['assigned_desk_email']}}
{{cov['assigned_user_name']}}
{{cov['assigned_user_email']}}
{% if cov.get('assigned_desk_name') %}{{cov['assigned_desk_name']}}{% endif %}
{% if cov.get('assigned_desk_email') %}<a href="mailto:{{cov['assigned_desk_email']}}?subject=Demande de couverture d’une utilisatrice de PC NouvellesPro: {{item.headline or item.name}}">{{cov['assigned_desk_email']}}</a>{% endif %}
{% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %}
{% if cov.get('assigned_user_email') %}<a href="mailto:{{cov['assigned_desk_email']}}?subject=Demande de couverture d’une utilisatrice de PC NouvellesPro: {{item.headline or item.name}}">{{cov['assigned_user_email']}}</a>{% endif %}
</p>
</div>
{% endfor %}
Expand Down
6 changes: 5 additions & 1 deletion server/theme/email_agenda.fr_ca.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ Couverture:
Type de couverture: {{get_coverage_content_type(cov,recipient_language)}}
Statut de couverture: {{get_coverage_status(cov)}}
Date et heure d’échéance de la couverture: {{get_coverage_date(cov)}}
Affecté à: {{cov['assigned_desk_name']}} {{cov['assigned_desk_email']}} {{cov['assigned_user_name']}} {{cov['assigned_user_email']}}
Affecté à:
{% if cov.get('assigned_desk_name')%}{{cov['assigned_desk_name']}}{% endif %}
{% if cov.get('assigned_desk_email') %}{{cov['assigned_desk_email']}}{% endif %}
{% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %}
{% if cov.get('assigned_user_email') %}{{cov['assigned_user_email']}}{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
12 changes: 7 additions & 5 deletions server/theme/email_agenda.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ <h3>Planning item:</h3>
<p><b>Type of coverage: </b>{{get_coverage_content_type(cov,recipient_language)}}</p>
<p><b>Coverage status: </b>{{get_coverage_status(cov)}}</p>
<p><b>Coverage due date & time: </b>{{get_coverage_date(cov)}}</p>
<p><b>Assigned to: </b>
{{cov['assigned_desk_name']}}
{{cov['assigned_desk_email']}}
{{cov['assigned_user_name']}}
{{cov['assigned_user_email']}}
{% if cov.get('assigned_desk_name') or cov.get('assigned_desk_email') or cov.get('assigned_user_name') or cov.get('assigned_user_email') %}
<p><b>Assigned to:</b>
{% if cov.get('assigned_desk_name') %}{{cov['assigned_desk_name']}}{% endif %}
{% if cov.get('assigned_desk_email') %}<a href="mailto:{{cov['assigned_desk_email']}}?subject=Coverage inquiry from CP NewsPro user: {{item.headline or item.name}}">{{cov['assigned_desk_email']}}</a>{% endif %}
{% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %}
{% if cov.get('assigned_user_email') %}<a href="mailto:{{cov['assigned_desk_email']}}?subject=Coverage inquiry from CP NewsPro user: {{item.headline or item.name}}">{{cov['assigned_user_email']}}</a>{% endif %}
</p>
{% endif %}
</div>
{% endfor %}
</p>
Expand Down
6 changes: 5 additions & 1 deletion server/theme/email_agenda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ Coverages:
Type of coverage:{{get_coverage_content_type(cov,recipient_language)}}
Coverage status: {{get_coverage_status(cov)}}
Coverage due date & time: {{get_coverage_date(cov)}}
Assigned to: {{cov['assigned_desk_name']}} {{cov['assigned_desk_email']}} {{cov['assigned_user_name']}} {{cov['assigned_user_email']}}
Assigned to:
{% if cov.get('assigned_desk_name') %}{{cov['assigned_desk_name']}}{% endif %}
{% if cov.get('assigned_desk_email') %}{{cov['assigned_desk_email']}}{% endif %}
{% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %}
{% if cov.get('assigned_user_email') %}{{cov['assigned_user_email']}}{% endif %}
{% endfor %}
{% endif %}
{% endfor %}

0 comments on commit 5b2efc0

Please sign in to comment.