fix index

bzr revid: al@openerp.com-20120810231307-w9rgwiaybhm1gdyk
This commit is contained in:
Antony Lesuisse 2012-08-11 01:13:07 +02:00
parent e991f474c3
commit 1f4d92ba8b
3 changed files with 10 additions and 4 deletions

View File

@ -33,10 +33,9 @@ class document_page(osv.osv):
index = []
for subpage in page.child_ids:
index += ["<li>"+ self._get_page_index(cr, uid, subpage) +"</li>"]
r = '<a href="#id=%s">%s</a>'%(page.id,page.name)
if index:
r = "<ul>" + "".join(index) + "</ul>"
else:
r = '<a href="#id=%s">%s</a>'%(page.id,page.name)
r += "<ul>" + "".join(index) + "</ul>"
return r
def _get_display_content(self, cr, uid, ids, name, args, context=None):

View File

@ -60,7 +60,9 @@
This will be used as template content for all new page of this section.
</div>
<field name="content" placeholder="e.g. Once upon a time..." class="oe_edit_only"/>
<field name="display_content" widget="html" class="oe_view_only"/>
<div class="oe_document_page">
<field name="display_content" widget="html" class="oe_view_only"/>
</div>
</form>
</field>
</record>

View File

@ -2,4 +2,9 @@
display: none;
}
.oe_document_page li {
padding: 2px 0 2px 4px;
list-style-type: circle;
}