[PATCH 8 of 8 seda] [views] Don't add 'New XXX' title on link to create new sub-objects

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Mar 16 13:37:45 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1489662914 -3600
#      Thu Mar 16 12:15:14 2017 +0100
# Node ID f8f4d7f1c7b808ded5a311d604cbb85e00f0a981
# Parent  eef5eadc14a43b8ac1acf9a0a1d18f1ca5ba749f
[views] Don't add 'New XXX' title on link to create new sub-objects

It doesn't add any value other the link's title, while it's costly to maintain
translation (and a lot of them are missing).

diff --git a/cubicweb_seda/views/__init__.py b/cubicweb_seda/views/__init__.py
--- a/cubicweb_seda/views/__init__.py
+++ b/cubicweb_seda/views/__init__.py
@@ -144,12 +144,11 @@ def add_etype_link(req, etype, urlparams
     eschema = vreg.schema.eschema(etype)
     if eschema.has_perm(req, 'add'):
         if klass is None:
             klass = 'icon-plus-circled pull-right'
         url = vreg['etypes'].etype_class(etype).cw_create_url(req, **urlparams)
-        return tags.a(msg, href=url, klass=klass,
-                      title=req.__('New %s' % etype))
+        return tags.a(msg, href=url, klass=klass)
     return u''
 
 
 def has_rel_perm(action, entity, rtype, role, target_etype=None, target_entity=None):
     """Return True if the user has the permission for `action` on the relation `rtype` where


More information about the saem-devel mailing list