Projet

Général

Profil

0001-maps-add-four-new-marker-icons-19049.patch

Frédéric Péters, 28 septembre 2017 16:14

Télécharger (3,48 ko)

Voir les différences:

Subject: [PATCH] maps: add four new marker icons (#19049)

 combo/apps/maps/migrations/0001_initial.py |  2 +-
 combo/apps/maps/models.py                  |  4 ++++
 combo/apps/maps/static/css/combo.map.css   | 20 ++++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)
combo/apps/maps/migrations/0001_initial.py
18 18
                ('slug', models.SlugField(verbose_name='Identifier')),
19 19
                ('geojson_url', models.URLField(max_length=1024, verbose_name='Geojson URL')),
20 20
                ('marker_colour', models.CharField(default=b'#0000FF', max_length=7, verbose_name='Marker colour')),
21
                ('icon', models.CharField(blank=True, max_length=32, null=True, verbose_name='Marker icon', choices=[(b'book', 'Book'), (b'house', 'House'), (b'building', 'Building'), (b'hospital', 'Hospital'), (b'ambulance', 'Ambulance'), (b'taxi', 'Taxi'), (b'subway', 'Subway'), (b'wheelchair', 'Wheelchair'), (b'bicycle', 'Bicycle'), (b'car', 'Car'), (b'train', 'Train'), (b'bus', 'Bus'), (b'motorcycle', 'Motorcycle'), (b'truck', 'Truck')])),
21
                ('icon', models.CharField(blank=True, max_length=32, null=True, verbose_name='Marker icon', choices=[(b'book', 'Book'), (b'house', 'House'), (b'building', 'Building'), (b'hospital', 'Hospital'), (b'ambulance', 'Ambulance'), (b'taxi', 'Taxi'), (b'subway', 'Subway'), (b'wheelchair', 'Wheelchair'), (b'bicycle', 'Bicycle'), (b'car', 'Car'), (b'train', 'Train'), (b'bus', 'Bus'), (b'motorcycle', 'Motorcycle'), (b'truck', 'Truck'), (b'shower', 'Shower'), (b'trash', 'Trash'), (b'recycle', 'Recycle'), (b'university', 'University')])),
22 22
                ('icon_colour', models.CharField(default=b'#000000', max_length=7, verbose_name='Icon colour')),
23 23
            ],
24 24
            options={'ordering': ('label',)}
combo/apps/maps/models.py
44 44
    ('bus', _('Bus')),
45 45
    ('motorcycle', _('Motorcycle')),
46 46
    ('truck', _('Truck')),
47
    ('shower', _('Shower')),
48
    ('trash', _('Trash')),
49
    ('recycle', _('Recycle')),
50
    ('university', _('University')),
47 51
]
48 52

  
49 53
ZOOM_LEVELS = [ ('0', _('Whole world')),
combo/apps/maps/static/css/combo.map.css
131 131
i.leaflet-marker-icon.book::before {
132 132
    content: "\f02d"; /* book */
133 133
}
134

  
135
select#id_icon option[value=shower]::before,
136
i.leaflet-marker-icon.shower::before {
137
    content: "\f2cc"; /* shower */
138
}
139

  
140
select#id_icon option[value=trash]::before,
141
i.leaflet-marker-icon.trash::before {
142
    content: "\f1f8"; /* trash */
143
}
144

  
145
select#id_icon option[value=recycle]::before,
146
i.leaflet-marker-icon.recycle::before {
147
    content: "\f1b8"; /* recycle */
148
}
149

  
150
select#id_icon option[value=university]::before,
151
i.leaflet-marker-icon.university::before {
152
    content: "\f19c"; /* university */
153
}
134
-