diff --git a/wcs/mail_templates.py b/wcs/mail_templates.py
index 28774a0b2..c54152ec1 100644
--- a/wcs/mail_templates.py
+++ b/wcs/mail_templates.py
@@ -14,6 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
+from quixote import get_publisher
+
from wcs.qommon import get_logger, misc
from wcs.qommon.xml_storage import XmlStorableObject
@@ -43,6 +45,10 @@ class MailTemplate(XmlStorableObject):
XmlStorableObject.__init__(self)
self.name = name
+ def get_admin_url(self):
+ base_url = get_publisher().get_backoffice_url()
+ return '%s/workflows/mail-templates/%s/' % (base_url, self.id)
+
def store(self):
if self.slug is None:
# set slug if it's not yet there
diff --git a/wcs/templates/wcs/backoffice/mail-template.html b/wcs/templates/wcs/backoffice/mail-template.html
index f3acd10df..03d40fe73 100644
--- a/wcs/templates/wcs/backoffice/mail-template.html
+++ b/wcs/templates/wcs/backoffice/mail-template.html
@@ -24,7 +24,7 @@
{% trans "Usage in workflows" %}