Add some icons
This commit is contained in:
parent
01dd38037e
commit
cd21bddad9
7 changed files with 32 additions and 18 deletions
|
@ -9,7 +9,6 @@
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
{% block form-buttons %}
|
{% block form-buttons %}
|
||||||
<button type="submit" class="btn btn-primary">Save</button>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -21,3 +21,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% block form-buttons %}
|
||||||
|
<button type="submit" class="btn btn-primary"><i class="fas fa-map-marker-alt"></i> Save</button>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form-buttons %}
|
{% block form-buttons %}
|
||||||
<button type="submit" class="btn btn-primary">Save</button>
|
<button type="submit" class="btn btn-primary"><i class="fas fa-user-check"></i> Save</button>
|
||||||
<a href="{% url 'password_change' %}" class="btn btn-secondary">Change your password</a>
|
<a href="{% url 'password_change' %}" class="btn btn-secondary"><i class="fas fa-key"></i> Change your password</a>
|
||||||
<a href="{% url 'delete-profile' %}" class="btn btn-warning">Permanently delete your profile</a>
|
<a href="{% url 'delete-profile' %}" class="btn btn-warning"><i class="fas fa-user-slash"></i> Permanently delete your profile</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-danger">Yes I'm sure</button>
|
<button type="submit" class="btn btn-danger"><i class="fas fa-eraser"></i> Yes I'm sure</button>
|
||||||
<a href="{% url 'map' %}" class="btn btn-secondary">No, cancel</a>
|
<a href="{% url 'map' %}" class="btn btn-secondary"><i class="fas fa-chevron-circle-left"></i> No, cancel</a>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{% extends 'map/base.html' %}
|
{% extends 'map/base.html' %}
|
||||||
{% load crispy_forms_filters %}
|
{% load crispy_forms_filters %}
|
||||||
|
|
||||||
{% block title %}Delete your location{% endblock %}
|
{% block title %}Delete your profile{% endblock %}
|
||||||
{% block h1 %}Delete your location{% endblock %}
|
{% block h1 %}Delete your profile{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-danger">Yes I'm sure</button>
|
<button type="submit" class="btn btn-danger"><i class="fas fa-user-slash"></i> Yes I'm sure</button>
|
||||||
<a href="{% url 'map' %}" class="btn btn-secondary">No, cancel</a>
|
<a href="{% url 'map' %}" class="btn btn-secondary"><i class="fas fa-chevron-circle-left"></i> No, cancel</a>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block form-buttons %}
|
||||||
|
<button type="submit" class="btn btn-primary"><i class="fas fa-share-alt"></i> Save</button>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block add-head %}
|
{% block add-head %}
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.2/css/bootstrap-select.min.css">
|
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.2/css/bootstrap-select.min.css">
|
||||||
|
|
24
map/views.py
24
map/views.py
|
@ -23,23 +23,27 @@ class MapView(LoginRequiredMixin, QuickActionsMixin, generic.DetailView):
|
||||||
actions = [{
|
actions = [{
|
||||||
'url': reverse_lazy('change-location'),
|
'url': reverse_lazy('change-location'),
|
||||||
'category': 'primary',
|
'category': 'primary',
|
||||||
'display': f'Change your location'
|
'display': f'Change your location',
|
||||||
|
'icon': 'fas fa-map-marked-alt',
|
||||||
}, {
|
}, {
|
||||||
'url': reverse_lazy('delete-location'),
|
'url': reverse_lazy('delete-location'),
|
||||||
'category': 'warning',
|
'category': 'warning',
|
||||||
'display': f'Delete your location'
|
'display': f'Delete your location',
|
||||||
|
'icon': 'fas fa-eraser',
|
||||||
}]
|
}]
|
||||||
else:
|
else:
|
||||||
actions = [{
|
actions = [{
|
||||||
'url': reverse_lazy('add-location'),
|
'url': reverse_lazy('add-location'),
|
||||||
'category': 'primary',
|
'category': 'primary',
|
||||||
'display': f'Add your location'
|
'display': f'Add your location',
|
||||||
|
'icon': 'fas fa-map-marked-alt',
|
||||||
}]
|
}]
|
||||||
|
|
||||||
actions.append({
|
actions.append({
|
||||||
'url': reverse_lazy('share-location'),
|
'url': reverse_lazy('share-location'),
|
||||||
'category': 'secondary',
|
'category': 'secondary',
|
||||||
'display': 'Share your location'
|
'display': 'Share your location',
|
||||||
|
'icon': 'fas fa-share-alt'
|
||||||
})
|
})
|
||||||
|
|
||||||
return actions
|
return actions
|
||||||
|
@ -61,7 +65,8 @@ class EditLocationView(LoginRequiredMixin, QuickActionsMixin, generic.UpdateView
|
||||||
return [{
|
return [{
|
||||||
'url': reverse_lazy('map'),
|
'url': reverse_lazy('map'),
|
||||||
'category': 'secondary',
|
'category': 'secondary',
|
||||||
'display': 'Back to map'
|
'display': 'Back to map',
|
||||||
|
'icon': 'fas fa-chevron-circle-left',
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def get_object(self, queryset=None):
|
def get_object(self, queryset=None):
|
||||||
|
@ -82,7 +87,8 @@ class AddLocationView(LoginRequiredMixin, QuickActionsMixin, generic.CreateView)
|
||||||
return [{
|
return [{
|
||||||
'url': reverse_lazy('map'),
|
'url': reverse_lazy('map'),
|
||||||
'category': 'secondary',
|
'category': 'secondary',
|
||||||
'display': 'Back to map'
|
'display': 'Back to map',
|
||||||
|
'icon': 'fas fa-chevron-circle-left',
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def get_initial(self):
|
def get_initial(self):
|
||||||
|
@ -152,7 +158,8 @@ class UpdateProfileView(LoginRequiredMixin, QuickActionsMixin, generic.UpdateVie
|
||||||
return [{
|
return [{
|
||||||
'url': reverse_lazy('map'),
|
'url': reverse_lazy('map'),
|
||||||
'category': 'secondary',
|
'category': 'secondary',
|
||||||
'display': 'Back to map'
|
'display': 'Back to map',
|
||||||
|
'icon': 'fas fa-chevron-circle-left',
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def get_object(self, queryset=None):
|
def get_object(self, queryset=None):
|
||||||
|
@ -173,7 +180,8 @@ class LocationSharingView(LoginRequiredMixin, QuickActionsMixin, generic.UpdateV
|
||||||
return [{
|
return [{
|
||||||
'url': reverse_lazy('map'),
|
'url': reverse_lazy('map'),
|
||||||
'category': 'secondary',
|
'category': 'secondary',
|
||||||
'display': 'Back to map'
|
'display': 'Back to map',
|
||||||
|
'icon': 'fas fa-chevron-circle-left',
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def get_object(self, queryset=None):
|
def get_object(self, queryset=None):
|
||||||
|
|
Loading…
Reference in a new issue