Update legend and title
authorThierry Florac <thierry.florac@onf.fr>
Fri, 15 Jun 2018 14:32:43 +0200
changeset 111 39373f182ee4
parent 110 0560f0ceb80f
child 112 cba761272ab8
Update legend and title
src/pyams_portal/zmi/layout.py
--- a/src/pyams_portal/zmi/layout.py	Fri Jun 15 14:05:17 2018 +0200
+++ b/src/pyams_portal/zmi/layout.py	Fri Jun 15 14:32:43 2018 +0200
@@ -304,10 +304,13 @@
     @property
     def title(self):
         translate = self.request.localizer.translate
-        return translate(_("« {0} »  portal template - {1} slot")).format(self.context.name,
-                                                                          self.getContent().slot_name)
+        return translate(_("« {0} »  portal template")).format(self.context.name)
 
-    legend = _("Edit slot properties")
+    @property
+    def legend(self):
+        translate = self.request.localizer.translate
+        return translate(_("Edit slot properties - « {0} » slot")).format(self.getContent().slot_name)
+
     fields = field.Fields(ISlotConfiguration).omit('portlet_ids')
 
     label_css_class = 'control-label col-md-5'