File tree Expand file tree Collapse file tree 4 files changed +100
-0
lines changed
people/templates/people/avatar Expand file tree Collapse file tree 4 files changed +100
-0
lines changed Original file line number Diff line number Diff line change 1+ {% extends "geonode_base.html" %}
2+ {% load i18n avatar_tags bootstrap_tags %}
3+
4+ {% block body_outer %}
5+ < div class ="page-header ">
6+ < h2 > {% trans "Add Avatar" %}</ h2 >
7+ </ div >
8+ < div class ="row ">
9+ < div class ="col-md-12 ">
10+ < h3 > {% trans "Your current avatar: " %}</ h3 >
11+ {% avatar user %}
12+ {% if not avatars %}
13+ < p > {% trans "You haven't uploaded an avatar yet. Please upload one now." %}</ p >
14+ {% endif %}
15+ < hr />
16+ < h3 > {% trans "Add new avatar" %}</ h3 >
17+ < form enctype ="multipart/form-data " method ="POST " action ="{% url 'avatar:add' %} ">
18+ {{ upload_avatar_form|as_bootstrap_inline }}
19+ < p >
20+ {% csrf_token %}
21+ < input type ="submit " class ="btn btn-primary " value ="{% trans "Upload New Image " %}" />
22+ < a href ="{% url 'profile_edit' user.username %} " class ="btn btn-link "> {% trans "Go back to Edit Your Profile" %}</ a >
23+ </ p >
24+ </ form >
25+ </ div >
26+ </ div >
27+ {% endblock %}
Original file line number Diff line number Diff line change 1+ {% extends "geonode_base.html" %}
2+ {% load i18n avatar_tags bootstrap_tags %}
3+
4+ {% block body_outer %}
5+
6+ < div class ="page-header ">
7+ < h2 > {% trans "Change Avatar" %}</ h2 >
8+ </ div >
9+ < div class ="row ">
10+ < div class ="col-md-12 ">
11+ < h3 > {% trans "Your current avatar: " %}</ h3 >
12+ {% avatar user %}
13+ {% if not avatars %}
14+ < p > {% trans "You haven't uploaded an avatar yet. Please upload one now." %}</ p >
15+ {% else %}
16+ < hr />
17+ < h3 > {% trans "Select default avatar"%}</ h3 >
18+ < form method ="POST " action ="{% url 'avatar:change' %} ">
19+ < ul >
20+ {{ primary_avatar_form|as_bootstrap_inline }}
21+ </ ul >
22+ < p >
23+ {% csrf_token %}
24+ < input type ="submit " class ="btn btn-primary " value ="{% trans 'Choose new Default' %} " />
25+ < a href ="{% url 'avatar:delete' %} " class ="btn btn-danger "> {% trans "Delete avatar" %}</ a >
26+ < a href ="{% url 'profile_edit' user.username %} " class ="btn btn-link "> {% trans "Go back to Edit Your Profile" %}</ a >
27+ </ p >
28+ </ form >
29+ {% endif %}
30+ < hr />
31+ < h3 > {% trans "Add new avatar" %}</ h3 >
32+ < form enctype ="multipart/form-data " method ="POST " action ="{% url 'avatar:add' %} ">
33+ {{ upload_avatar_form|as_bootstrap_inline }}
34+ < p >
35+ {% csrf_token %}
36+ < input type ="submit " class ="btn btn-primary " value ="{% trans 'Upload New Image' %} " />
37+ < a href ="{% url 'profile_edit' user.username %} " class ="btn btn-link "> {% trans "Go back to Edit Your Profile" %}</ a >
38+ </ p >
39+ </ form >
40+ </ div >
41+ </ div >
42+ {% endblock %}
Original file line number Diff line number Diff line change 1+ {% extends "geonode_base.html" %}
2+ {% load i18n bootstrap_tags %}
3+
4+ {% block body_outer %}
5+ < div class ="page-header ">
6+ < h2 > {% trans "Delete Avatar" %}</ h2 >
7+ </ div >
8+ < div class ="row ">
9+ < div class ="col-md-12 ">
10+ {% if not avatars %}
11+ {% url 'avatar_change' as avatar_change_url %}
12+ < p > {% blocktrans %}You have no avatars to delete. Please < a href ="{{ avatar_change_url }} "> upload one</ a > now.{% endblocktrans %}</ p >
13+ {% else %}
14+ < p > {% trans "Please select the avatars that you would like to delete." %}</ p >
15+ < form method ="POST " action ="{% url 'avatar:delete' %} ">
16+ {{ delete_avatar_form|as_bootstrap_inline }}
17+ < p >
18+ {% csrf_token %}
19+ < input type ="submit " class ="btn btn-primary " value ="{% trans 'Delete These' %} " />
20+ < a href ="{% url 'profile_edit' user.username %} " class ="btn btn-link "> {% trans "Go back to Edit Your Profile" %}</ a >
21+ </ p >
22+ </ form >
23+ {% endif %}
24+ </ div >
25+ </ div >
26+ {% endblock %}
Original file line number Diff line number Diff line change @@ -2331,3 +2331,8 @@ def get_geonode_catalogue_service():
23312331]
23322332INSTALLED_APPS += ("geonode.assets" ,)
23332333GEONODE_APPS += ("geonode.assets" ,)
2334+
2335+ # Django-Avatar - Change default templates to Geonode based
2336+ AVATAR_ADD_TEMPLATE = "people/avatar/add.html"
2337+ AVATAR_CHANGE_TEMPLATE = "people/avatar/change.html"
2338+ AVATAR_DELETE_TEMPLATE = "people/avatar/confirm_delete.html"
You can’t perform that action at this time.
0 commit comments