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 %}
|
||||
{{ form|crispy }}
|
||||
{% block form-buttons %}
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
{% endblock %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -21,3 +21,6 @@
|
|||
</div>
|
||||
</div>
|
||||
{% 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 %}
|
||||
|
||||
{% block form-buttons %}
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
<a href="{% url 'password_change' %}" class="btn btn-secondary">Change your password</a>
|
||||
<a href="{% url 'delete-profile' %}" class="btn btn-warning">Permanently delete your profile</a>
|
||||
<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"><i class="fas fa-key"></i> Change your password</a>
|
||||
<a href="{% url 'delete-profile' %}" class="btn btn-warning"><i class="fas fa-user-slash"></i> Permanently delete your profile</a>
|
||||
{% endblock %}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger">Yes I'm sure</button>
|
||||
<a href="{% url 'map' %}" class="btn btn-secondary">No, cancel</a>
|
||||
<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"><i class="fas fa-chevron-circle-left"></i> No, cancel</a>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends 'map/base.html' %}
|
||||
{% load crispy_forms_filters %}
|
||||
|
||||
{% block title %}Delete your location{% endblock %}
|
||||
{% block h1 %}Delete your location{% endblock %}
|
||||
{% block title %}Delete your profile{% endblock %}
|
||||
{% block h1 %}Delete your profile{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="alert alert-danger">
|
||||
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger">Yes I'm sure</button>
|
||||
<a href="{% url 'map' %}" class="btn btn-secondary">No, cancel</a>
|
||||
<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"><i class="fas fa-chevron-circle-left"></i> No, cancel</a>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block form-buttons %}
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-share-alt"></i> Save</button>
|
||||
{% endblock %}
|
||||
|
||||
{% block add-head %}
|
||||
<link rel="stylesheet"
|
||||
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 = [{
|
||||
'url': reverse_lazy('change-location'),
|
||||
'category': 'primary',
|
||||
'display': f'Change your location'
|
||||
'display': f'Change your location',
|
||||
'icon': 'fas fa-map-marked-alt',
|
||||
}, {
|
||||
'url': reverse_lazy('delete-location'),
|
||||
'category': 'warning',
|
||||
'display': f'Delete your location'
|
||||
'display': f'Delete your location',
|
||||
'icon': 'fas fa-eraser',
|
||||
}]
|
||||
else:
|
||||
actions = [{
|
||||
'url': reverse_lazy('add-location'),
|
||||
'category': 'primary',
|
||||
'display': f'Add your location'
|
||||
'display': f'Add your location',
|
||||
'icon': 'fas fa-map-marked-alt',
|
||||
}]
|
||||
|
||||
actions.append({
|
||||
'url': reverse_lazy('share-location'),
|
||||
'category': 'secondary',
|
||||
'display': 'Share your location'
|
||||
'display': 'Share your location',
|
||||
'icon': 'fas fa-share-alt'
|
||||
})
|
||||
|
||||
return actions
|
||||
|
@ -61,7 +65,8 @@ class EditLocationView(LoginRequiredMixin, QuickActionsMixin, generic.UpdateView
|
|||
return [{
|
||||
'url': reverse_lazy('map'),
|
||||
'category': 'secondary',
|
||||
'display': 'Back to map'
|
||||
'display': 'Back to map',
|
||||
'icon': 'fas fa-chevron-circle-left',
|
||||
}]
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
|
@ -82,7 +87,8 @@ class AddLocationView(LoginRequiredMixin, QuickActionsMixin, generic.CreateView)
|
|||
return [{
|
||||
'url': reverse_lazy('map'),
|
||||
'category': 'secondary',
|
||||
'display': 'Back to map'
|
||||
'display': 'Back to map',
|
||||
'icon': 'fas fa-chevron-circle-left',
|
||||
}]
|
||||
|
||||
def get_initial(self):
|
||||
|
@ -152,7 +158,8 @@ class UpdateProfileView(LoginRequiredMixin, QuickActionsMixin, generic.UpdateVie
|
|||
return [{
|
||||
'url': reverse_lazy('map'),
|
||||
'category': 'secondary',
|
||||
'display': 'Back to map'
|
||||
'display': 'Back to map',
|
||||
'icon': 'fas fa-chevron-circle-left',
|
||||
}]
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
|
@ -173,7 +180,8 @@ class LocationSharingView(LoginRequiredMixin, QuickActionsMixin, generic.UpdateV
|
|||
return [{
|
||||
'url': reverse_lazy('map'),
|
||||
'category': 'secondary',
|
||||
'display': 'Back to map'
|
||||
'display': 'Back to map',
|
||||
'icon': 'fas fa-chevron-circle-left',
|
||||
}]
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
|
|
Loading…
Reference in a new issue