[chronojump-server] generic images paths



commit 85592ac80017d81da02df98e6f352d63c280255b
Author: Max Ros i Morejon <mros33 gmail com>
Date:   Fri Apr 26 12:18:18 2019 +0200

    generic images paths

 .../templates/organizations/groups/group_players_list.html          | 4 ++--
 .../templates/organizations/gyms/gym_detail.html                    | 4 ++--
 .../templates/organizations/players/players_list.html               | 6 +++---
 .../chronojump_networks/templates/pages/index.html                  | 4 ++--
 .../chronojump_networks/templates/results/results_list.html         | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git 
a/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html 
b/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html
index 1a50ecf..4a926ef 100644
--- a/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html
+++ b/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html
@@ -17,9 +17,9 @@
 <div class="page-header row">
   <div class="col-sm-8">
     {% if user.organization.image %}
-        <img src="../../../media/{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
+        <img src="{{MEDIA_URL}}{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% else %}
-        <img src="../../../static/images/logo_club.png" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
+        <img src="{{STATIC_URL}}/images/logo_club.png" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% endif %}
     <h1 class="display-4">{{group.name}}  </h1>
     <h1 class="display-4"> <small class="text-muted" style="font-size:32px">{% trans 'Players and tasks' 
%}</small></h1>
diff --git a/chronojumpserver-django/chronojump_networks/templates/organizations/gyms/gym_detail.html 
b/chronojumpserver-django/chronojump_networks/templates/organizations/gyms/gym_detail.html
index 9769553..021d076 100644
--- a/chronojumpserver-django/chronojump_networks/templates/organizations/gyms/gym_detail.html
+++ b/chronojumpserver-django/chronojump_networks/templates/organizations/gyms/gym_detail.html
@@ -17,9 +17,9 @@
 <div class="page-header row">
   <div class="col-sm-8">
     {% if user.organization.image %}
-        <img src="../../../media/{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
+        <img src="{{MEDIA_URL}}{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% else %}
-        <img src="../../../static/images/logo_club.png" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
+        <img src="{{STATIC_URL}}/images/logo_club.png" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% endif %}
     <h1 class="display-4">{{gym.name}} </h1>
     <h1 class="display-4"> <small class="text-muted" style="font-size:32px">{% trans 'Stations and 
exercises' %}</small></h1>
diff --git a/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html 
b/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html
index bc50eed..ca7ce38 100644
--- a/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html
+++ b/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html
@@ -17,9 +17,9 @@
 <div class="page-header row">
   <div class="col-sm-9">
     {% if user.organization.image %}
-        <img src="../../media/{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
+        <img src="{{MEDIA_URL}}{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% else %}
-        <img src="../../static/images/logo_club.png" class="img-fluid float-left" width="48px" height="48px" 
style="margin-top:12px;margin-right:10px;" />
+        <img src="{{STATIC_URL}}/images/logo_club.png" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% endif %}
     <h1 class="display-4">{% trans 'Players list' %}</h1>
   </div>
@@ -87,7 +87,7 @@
                                        var src = value;
                                } else {
                                        // Otherwise show the default player icon
-                                       var src = 'chronojump_networks/static/images/default_player.png';
+                                       var src = '{{STATIC_URL}}/images/default_player.png';
                                }
                                var html = '<img src="' + src + '" class="img-fluid rounded" width="32px" 
height="32px"/>';
                                return html;
diff --git a/chronojumpserver-django/chronojump_networks/templates/pages/index.html 
b/chronojumpserver-django/chronojump_networks/templates/pages/index.html
index 1603fc3..35568d3 100644
--- a/chronojumpserver-django/chronojump_networks/templates/pages/index.html
+++ b/chronojumpserver-django/chronojump_networks/templates/pages/index.html
@@ -47,9 +47,9 @@
     <div class="row" style="margin-top:20px; border-bottom: 1px solid #000;padding-bottom:10px;">
       <div class="col-md-4" >
           {% if user.organization.image %}
-              <img src="../media/{{ user.organization.image }}" class="img-fluid" height="80px" />
+              <img src="{{MEDIA_URL}}{{ user.organization.image }}" class="img-fluid" height="80px" />
           {% else %}
-              <img src="../static/images/logo_club.png" class="img-fluid" height="80px" />
+              <img src="{{STATIC_URL}}/images/logo_club.png" class="img-fluid" height="80px" />
           {% endif %}
       </div>
       <div class="col-md-8" >
diff --git a/chronojumpserver-django/chronojump_networks/templates/results/results_list.html 
b/chronojumpserver-django/chronojump_networks/templates/results/results_list.html
index ce7e23b..3df7482 100644
--- a/chronojumpserver-django/chronojump_networks/templates/results/results_list.html
+++ b/chronojumpserver-django/chronojump_networks/templates/results/results_list.html
@@ -18,9 +18,9 @@
 <div class="page-header row">
   <div class="col-sm-9">
     {% if user.organization.image %}
-        <img src="../media/{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
+        <img src="{{MEDIA_URL}}{{ user.organization.image }}" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% else %}
-        <img src="../static/images/logo_club.png" class="img-fluid float-left" width="48px" height="48px" 
style="margin-top:12px;margin-right:10px;" />
+        <img src="{{STATIC_URL}}images/logo_club.png" class="img-fluid float-left" width="48px" 
height="48px" style="margin-top:12px;margin-right:10px;" />
     {% endif %}
     <h1 class="display-4">{% trans 'Results' %}  <small class="text-muted" style="font-size:32px">{% trans 
'List' %}</small></h1>
   </div>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]