]> git.parisson.com Git - mezzo.git/commitdiff
Link type : using font-awesome with class and link type name
authorEmilie <zawadzki@ircam.fr>
Wed, 21 Sep 2016 13:05:08 +0000 (15:05 +0200)
committerEmilie <zawadzki@ircam.fr>
Wed, 21 Sep 2016 13:05:08 +0000 (15:05 +0200)
app/organization/core/migrations/0003_remove_linktype_picto.py [new file with mode: 0644]
app/organization/core/models.py
app/templates/network/inc/person/list_circle_style.html

diff --git a/app/organization/core/migrations/0003_remove_linktype_picto.py b/app/organization/core/migrations/0003_remove_linktype_picto.py
new file mode 100644 (file)
index 0000000..6c90e45
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-09-21 13:02
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('organization-core', '0002_linktype_picto'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='linktype',
+            name='picto',
+        ),
+    ]
index c355ac879041937304164256dde25969e2620a20..3d0bb98e3308d845a4112b2c7a54c70cee2fc93b 100644 (file)
@@ -148,7 +148,6 @@ class LinkType(models.Model):
         blank=True,
     )
     ordering = models.PositiveIntegerField(verbose_name=_('ordering'), null=True, blank=True)
-    picto = FileField(_("picto"), max_length=1024, format="Image", upload_to="images/picto")
 
     class Meta:
         ordering = ['ordering', ]
index 9a0f5bde693994c47eacd14c1af575eb71bfe924..f2c2ab5a128df0d2abf9fe6465f7cae0016aa3d5 100644 (file)
@@ -18,9 +18,9 @@
       {% if person.description %}
       <p>{{ person.description|slice:":255" }}</p>
       {% endif %}
-      {% with person.links.all|get_type_link:'site internet' as web_site %}
-        {% if web_site %}
-          <a href="{{ web_site.first }}" title="Site Web">Site Web</a>
+      {% with person.links.first as link %}
+        {% if link %}
+          <a href="{{ link }}" title="Site Web"><span class="fa fa-{{ link.link_type.name }}">{{ link.link_type.name }}</span></a>
         {% endif %}
       {% endwith %}
     {% endwith %}