Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix all occurences of {{ member.profile_pic_url }} with static host #584

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pmg/templates/admin/inline_membership.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div class="col-md-2 text-center">
{% if model and model.member.profile_pic_url %}
<img src="http://pmg-assets.s3-eu-west-1.amazonaws.com/{{ model.member.profile_pic_url }}" style="max-width: 75px;"></img>
<img src="{{ STATIC_HOST }}{{ member.profile_pic_url }}" style="max-width: 75px;"></img>
{% endif %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion pmg/templates/macros/members.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% macro member_badge(member, chairperson=False) -%}
{%- if member.profile_pic_url %}
<a href="{{ member|member_url }}"><img class="member-profile-pic {% if chairperson %}chairperson{% endif %}" src="{{ member.profile_pic_url }}" alt="Profile picture: {{ member.name }}" ></a>
<a href="{{ member|member_url }}"><img class="member-profile-pic {% if chairperson %}chairperson{% endif %}" src="{{ STATIC_HOST }}{{ member.profile_pic_url }}" alt="Profile picture: {{ member.name }}" ></a>
{% else %}
<p class="text-muted">No image available</p>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion pmg/templates/member_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1><i class="fa fa-user"></i> {{ member.name }}</h1>

<div class="row">
<div class="col-md-1">
<img src="{{ member.profile_pic_url }}" alt="{{ member.name }}">
<img src="{{ STATIC_HOST }}{{ member.profile_pic_url }}" alt="{{ member.name }}">
</div>
<div class="col-md-4">
{{ member.bio|safe }}
Expand Down
4 changes: 2 additions & 2 deletions pmg/templates/member_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1><i class="fa fa-icon fa-user"></i> {{ province.name }} Members</h1>
{% for member in provincial_members %}
<div class="single-mp col-xs-12 col-sm-6 col-md-4 col-lg-3">
<a class="content-card flex" href="{{ member | member_url }}">
<img class="member-profile-pic" src="{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<img class="member-profile-pic" src="{{ STATIC_HOST }}{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<div>
<h4 class="card-title name">{{ member.name }}</h4>
{% if member.party %}
Expand Down Expand Up @@ -75,7 +75,7 @@ <h5>{{ member.party.name }}</h5>
{% for member in members %}
<div class="single-mp col-xs-12 col-sm-6 col-md-4 col-lg-3">
<a class="content-card flex" href="{{ member | member_url }}">
<img class="member-profile-pic" src="{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<img class="member-profile-pic" src="{{ STATIC_HOST }}{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<div>
<h4 class="card-title name">{{ member.name }}</h3>
{% if member.party %}
Expand Down
2 changes: 1 addition & 1 deletion pmg/templates/provincial/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2><i class="fa fa-icon fa-fw fa-user"></i>Members</h2>
{% for member in mpls %}
<div class="col-xs-12 col-sm-6 col-lg-4">
<a class="content-card flex" href="{{ member | member_url }}">
<img class="member-profile-pic" src="{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<img class="member-profile-pic" src="{{ STATIC_HOST }}{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<div>
<h4 class="card-title">{{ member.name }}</h4>
<h5>{{ member.party.name }}</h5>
Expand Down
2 changes: 1 addition & 1 deletion pmg/templates/provincial/western_cape.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2><i class="fa fa-icon fa-fw fa-user"></i> Members</h2>
{% for member in mpls %}
<div class="col-xs-12 col-sm-6 col-lg-4">
<a class="content-card flex" href="{{ member | member_url }}">
<img class="member-profile-pic" src="{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<img class="member-profile-pic" src="{{ STATIC_HOST }}{{ member.profile_pic_url or '/static/resources/images/no-profile-pic.svg' }}" alt="{{ member.name }}">
<div>
<h4 class="card-title">{{ member.name }}</h4>
<h5>{{ member.party.name }}</h5>
Expand Down
Loading