diff --git a/geonode/people/templates/people/avatar/add.html b/geonode/people/templates/people/avatar/add.html new file mode 100644 index 00000000000..70f74f35e47 --- /dev/null +++ b/geonode/people/templates/people/avatar/add.html @@ -0,0 +1,27 @@ +{% extends "geonode_base.html" %} +{% load i18n avatar_tags bootstrap_tags %} + +{% block body_outer %} + +
+
+

{% trans "Your current avatar: " %}

+ {% avatar user %} + {% if not avatars %} +

{% trans "You haven't uploaded an avatar yet. Please upload one now." %}

+ {% endif %} +
+

{% trans "Add new avatar" %}

+
+ {{ upload_avatar_form|as_bootstrap_inline }} +

+ {% csrf_token %} + + {% trans "Go back to Edit Your Profile" %} +

+
+
+
+{% endblock %} diff --git a/geonode/people/templates/people/avatar/change.html b/geonode/people/templates/people/avatar/change.html new file mode 100644 index 00000000000..abbaa540cad --- /dev/null +++ b/geonode/people/templates/people/avatar/change.html @@ -0,0 +1,42 @@ +{% extends "geonode_base.html" %} +{% load i18n avatar_tags bootstrap_tags %} + +{% block body_outer %} + + +
+
+

{% trans "Your current avatar: " %}

+ {% avatar user %} + {% if not avatars %} +

{% trans "You haven't uploaded an avatar yet. Please upload one now." %}

+ {% else %} +
+

{% trans "Select default avatar"%}

+
+
    + {{ primary_avatar_form|as_bootstrap_inline }} +
+

+ {% csrf_token %} + + {% trans "Delete avatar" %} + {% trans "Go back to Edit Your Profile" %} +

+
+ {% endif %} +
+

{% trans "Add new avatar" %}

+
+ {{ upload_avatar_form|as_bootstrap_inline }} +

+ {% csrf_token %} + + {% trans "Go back to Edit Your Profile" %} +

+
+
+
+{% endblock %} diff --git a/geonode/people/templates/people/avatar/confirm_delete.html b/geonode/people/templates/people/avatar/confirm_delete.html new file mode 100644 index 00000000000..679a1e1a2eb --- /dev/null +++ b/geonode/people/templates/people/avatar/confirm_delete.html @@ -0,0 +1,26 @@ +{% extends "geonode_base.html" %} +{% load i18n bootstrap_tags %} + +{% block body_outer %} + +
+
+ {% if not avatars %} + {% url 'avatar_change' as avatar_change_url %} +

{% blocktrans %}You have no avatars to delete. Please upload one now.{% endblocktrans %}

+ {% else %} +

{% trans "Please select the avatars that you would like to delete." %}

+
+ {{ delete_avatar_form|as_bootstrap_inline }} +

+ {% csrf_token %} + + {% trans "Go back to Edit Your Profile" %} +

+
+ {% endif %} +
+
+{% endblock %} diff --git a/geonode/settings.py b/geonode/settings.py index 8e31414e304..a4c27949c86 100644 --- a/geonode/settings.py +++ b/geonode/settings.py @@ -2331,3 +2331,8 @@ def get_geonode_catalogue_service(): ] INSTALLED_APPS += ("geonode.assets",) GEONODE_APPS += ("geonode.assets",) + +# Django-Avatar - Change default templates to Geonode based +AVATAR_ADD_TEMPLATE = "people/avatar/add.html" +AVATAR_CHANGE_TEMPLATE = "people/avatar/change.html" +AVATAR_DELETE_TEMPLATE = "people/avatar/confirm_delete.html"