[gen] Added parameter Ref.collapsible allowing to show/hide (via a cookie in the UI, similar to object history) available or tied items.
This commit is contained in:
parent
73f81d9304
commit
fcf6a52974
6 changed files with 67 additions and 35 deletions
|
@ -397,16 +397,13 @@ class AbstractWrapper(object):
|
|||
<div if="not zobj.isTemporary()"
|
||||
var2="hasHistory=zobj.hasHistory();
|
||||
historyMaxPerPage=req.get('maxPerPage', 5);
|
||||
historyExpanded=req.get('appyHistory','collapsed')=='expanded';
|
||||
collapse=zobj.getHistoryCollapse();
|
||||
creator=zobj.Creator()">
|
||||
<table width="100%" class="summary" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2" class="by">
|
||||
<!-- Plus/minus icon for accessing history -->
|
||||
<x if="hasHistory">
|
||||
<img class="clickable" onclick="toggleCookie('appyHistory')"
|
||||
src=":historyExpanded and url('collapse.gif') or url('expand.gif')"
|
||||
align=":dleft" id="appyHistory_img" style="padding-right:4px"/>
|
||||
<x if="hasHistory"><x>:collapse.px</x>
|
||||
<x>:_('object_history')</x> —
|
||||
</x>
|
||||
|
||||
|
@ -434,8 +431,7 @@ class AbstractWrapper(object):
|
|||
<!-- Object history -->
|
||||
<tr if="hasHistory">
|
||||
<td colspan="2">
|
||||
<span id="appyHistory"
|
||||
style=":historyExpanded and 'display:block' or 'display:none'">
|
||||
<span id=":collapse.id" style=":collapse.style">
|
||||
<div var="ajaxHookId=zobj.id + '_history'" id=":ajaxHookId">
|
||||
<script type="text/javascript">::'askObjectHistory(%s,%s,%d,0)' % \
|
||||
(q(ajaxHookId), q(zobj.absolute_url()), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue