Commit a56cbc34 authored by Boris Kocherov's avatar Boris Kocherov Committed by Boris Kocherov

erp5_xhtml_style: improve "developer shortcuts" rendering.

parent b1c77540
......@@ -3,7 +3,6 @@
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<tal:block metal:define-macro="edit_link">
<a tabindex="1000"
class="btn btn-xs"
tal:condition="python: (getattr(object, 'meta_type', None) is not None) and (getattr(object, 'getPortalObject', None) is not None)"
tal:attributes="href python: '%s/manage_main' % ('/'.join(object.getPhysicalPath()[len(object.getPortalObject().getPhysicalPath()):])) # XXX: quick hack to get path;
title info;"><img tal:attributes="src string:$portal_path/images/$image;
......@@ -11,7 +10,6 @@
</tal:block>
<tal:block metal:define-macro="translate_link">
<a tabindex="1000"
class="btn btn-xs"
tal:define="image image | string:translate.png;
std nocall: modules/Products.PythonScripts.standard;
urlencode nocall: std/urlencode;
......@@ -32,8 +30,6 @@
info string:Edit this form's action;
object python: getattr(here, form.action, None);">
<tal:block metal:use-macro="developper_shortcut_render/macros/edit_link" />
<div class="clear">
</div>
</tal:block>
</tal:block>
<tal:block metal:define-macro="field_developper">
......
......@@ -20,28 +20,30 @@
tal:attributes="title field_description;
class python: ' '.join([x for x in ['field', field.is_required() and 'required' or None, field_has_error and 'error' or None, field.get_value('css_class') or None] if x is not None])"
i18n:attributes="title" i18n:domain="ui">
<tal:block tal:condition="preferred_html_style_developper_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/field_developper" />
</tal:block>
<tal:block tal:condition="preferred_html_style_translator_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/field_translator" />
</tal:block>
<tal:block tal:repeat="html_tuple html_render">
<div class="form-group row"
tal:define="field_offset python:repeat['html_tuple'].start == True and ' ' or 'col-md-offset-' + field_label_width;"
tal:attributes="class string:form-group row ${field_has_error}"
tal:condition="python: field_editable or html_tuple[1]">
<tal:block tal:condition="python:(gid != 'bottom') and html_tuple[0]">
<label class="control-label col-md-2"
tal:condition="repeat/html_tuple/start"
tal:attributes="class string:control-label col-md-${field_label_width};">
<tal:block tal:content="structure python: html_tuple[0]"
i18n:translate="" i18n:domain="ui" />
<tal:block tal:condition="preferred_html_style_developper_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/field_developper" />
</tal:block>
<tal:block tal:condition="preferred_html_style_translator_mode">
<tal:block metal:use-macro="developper_shortcut_render/macros/field_translator" />
</tal:block>
</label>
<div class="input col-md-10"
tal:attributes="class string:input col-md-${field_input_width};"
tal:attributes="class string:input col-md-${field_input_width} ${field_offset};"
tal:condition="field_editable"
tal:content="structure python: html_tuple[1]" />
<div class="col-md-10"
tal:attributes="class string:col-md-${field_input_width};"
tal:attributes="class string:col-md-${field_input_width} ${field_offset};"
tal:condition="not:field_editable">
<p class="form-control-static" tal:content="structure python: html_tuple[1]" />
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment