parent
ee353c0675
commit
f3f3217659
Binary file not shown.
|
|
@ -30,4 +30,10 @@ class QuickLinks(models.Model):
|
|||
def get_absolute_url(self):
|
||||
return reverse('ql-update', kwargs={'pk':self.pk})
|
||||
|
||||
@property
|
||||
def get_photo_url(self):
|
||||
if self.logo and hasattr(self.logo, 'url'):
|
||||
return self.logo.url
|
||||
else:
|
||||
return "/media/agencymain/default.jpg"
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
{% for ql in quicklinks %}
|
||||
<tr>
|
||||
<td>{{ql.name }}</td>
|
||||
<td><a href="https://{{ ql.link }}" target="_blank">{{ ql.link }}</a></td>
|
||||
<td><img src="{{ ql.logo }}"></td>
|
||||
<td><a href="{{ ql.link }}" target="_blank">{{ ql.link }}</a></td>
|
||||
<td><img src="{{ ql.get_photo_url }}"></td>
|
||||
<td>
|
||||
{% if perms.users.ql_management %}
|
||||
<div class="dropdown no-arrow">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<hr>
|
||||
|
||||
<button type="submit" class="btn btn-success">Quicklink aktualisieren</button>
|
||||
<a class="btn" href="{% url 'ql-management' %} ">Abbrechen</a>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue