Improvements historization.
This commit is contained in:
parent
d320a369c9
commit
fff2b6a329
|
@ -163,7 +163,10 @@ class AbstractMixin:
|
|||
modified values.'''
|
||||
# Remove from previousData all values that were not changed
|
||||
for fieldName in previousData.keys():
|
||||
if getattr(self, fieldName) == previousData[fieldName][0]:
|
||||
prev = previousData[fieldName][0]
|
||||
curr = getattr(self, fieldName)
|
||||
if (prev == curr) or ((prev == None) and (curr == '')) or \
|
||||
((prev == '') and (curr == None)):
|
||||
del previousData[fieldName]
|
||||
if previousData:
|
||||
# Create the event to add in the history
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
</form>
|
||||
|
||||
<h1 tal:content="python: tool.translate('import_title')"></h1><br/>
|
||||
<table cellpadding="0" cellspacing="0" class="vertical listing" width="100%">
|
||||
<table cellpadding="0" cellspacing="0" class="listing nosort" width="100%">
|
||||
<tr>
|
||||
<th tal:repeat="columnHeader python: importElems[0]">
|
||||
<img tal:condition="python: repeat['columnHeader'].number() == 1"
|
||||
|
@ -96,9 +96,11 @@
|
|||
</tr>
|
||||
<tal:row repeat="row python: importElems[1]">
|
||||
<tr tal:define="alreadyImported python: tool.isAlreadyImported(contentType, row[0]);
|
||||
global allAreImported python: allAreImported and alreadyImported"
|
||||
global allAreImported python: allAreImported and alreadyImported;
|
||||
odd repeat/row/odd"
|
||||
tal:attributes="id python:test(alreadyImported, 'importedElem', 'notImportedElem');
|
||||
style python:test(alreadyImported, 'display:none', 'display:table-row')">
|
||||
style python:test(alreadyImported, 'display:none', 'display:table-row');
|
||||
class python:test(odd, 'even', 'odd')">
|
||||
<td tal:repeat="elem python: row[1:]" tal:content="elem">
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -316,8 +316,8 @@
|
|||
Display the previous values of the fields whose value were modified in this change.</tal:comment>
|
||||
<table class="appyChanges" width="100%">
|
||||
<tr>
|
||||
<th tal:content="python: tool.translate('modified_field')"></th>
|
||||
<th tal:content="python: tool.translate('previous_value')"></th>
|
||||
<th align="left" width="30%" tal:content="python: tool.translate('modified_field')"></th>
|
||||
<th align="left" width="70%" tal:content="python: tool.translate('previous_value')"></th>
|
||||
</tr>
|
||||
<tr tal:repeat="change event/changes/items">
|
||||
<td tal:content="python: tool.translate(change[1][1])"></td>
|
||||
|
@ -669,7 +669,7 @@
|
|||
</tr></table>
|
||||
|
||||
<table tal:define="fieldDescrs python: tool.getResultColumns(objs[0], contentType)"
|
||||
class="vertical listing" width="100%" cellpadding="0" cellspacing="0">
|
||||
class="listing nosort" width="100%" cellpadding="0" cellspacing="0">
|
||||
<tal:comment replace="nothing">Every item in fieldDescr is a FieldDescr instance,
|
||||
excepted for workflow state (which is not a field): in this case it is simply the
|
||||
string "workflowState".</tal:comment>
|
||||
|
@ -723,7 +723,9 @@
|
|||
</tr>
|
||||
|
||||
<tal:comment replace="nothing">Results</tal:comment>
|
||||
<tr tal:repeat="obj objs" id="query_row">
|
||||
<tal:row repeat="obj objs">
|
||||
<tr id="query_row" tal:define="odd repeat/obj/odd"
|
||||
tal:attributes="class python:test(odd, 'even', 'odd')">
|
||||
|
||||
<tal:comment replace="nothing">Mandatory column "Title"/"Name"</tal:comment>
|
||||
<td id="field_title"><a
|
||||
|
@ -777,6 +779,7 @@
|
|||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tal:row>
|
||||
</table>
|
||||
|
||||
<tal:comment replace="nothing">Appy (bottom) navigation</tal:comment>
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
</table>
|
||||
|
||||
<tal:comment replace="nothing">Show forward reference(s)</tal:comment>
|
||||
<table tal:attributes="class python:test(innerRef, '', 'vertical listing');
|
||||
<table tal:attributes="class python:test(innerRef, '', 'listing nosort');
|
||||
width python:test(innerRef, '100%', test(appyType['wide'], '100%', ''))"
|
||||
align="right" tal:condition="python: not isBack and objs" cellpadding="0" cellspacing="0">
|
||||
<tr tal:condition="appyType/showHeaders">
|
||||
|
@ -195,7 +195,9 @@
|
|||
</th>
|
||||
<th tal:content="python: tool.translate('ref_actions')"></th>
|
||||
</tr>
|
||||
<tr tal:repeat="obj objs" valign="top">
|
||||
<tal:row repeat="obj objs">
|
||||
<tr valign="top" tal:define="odd repeat/obj/odd"
|
||||
tal:attributes="class python:test(odd, 'even', 'odd')">
|
||||
<tal:comment replace="nothing">Object title, shown here if not specified somewhere
|
||||
else in appyType.shownInfo.</tal:comment>
|
||||
<td tal:condition="python: 'title' not in appyType['shownInfo']"><metal:showObjectTitle
|
||||
|
@ -233,6 +235,7 @@
|
|||
<metal:showObjectActions use-macro="here/skyn/ref/macros/objectActions" />
|
||||
</td>
|
||||
</tr>
|
||||
</tal:row>
|
||||
</table>
|
||||
|
||||
</td></tr>
|
||||
|
|
|
@ -2,58 +2,31 @@
|
|||
/* <dtml-with base_properties> (do not remove this :) */
|
||||
/* <dtml-call "REQUEST.set('portal_url', portal_url())"> (not this either :) */
|
||||
|
||||
#portal-breadcrumbs {
|
||||
display: none;
|
||||
#portal-breadcrumbs { display: none; }
|
||||
#importedElem { color: grey; font-style: italic; }
|
||||
|
||||
.appyList { line-height: 1.1em; margin: 0 0 0.5em 1.2em; padding: 0; }
|
||||
.appyBullet { margin: 0; }
|
||||
.appyPod { float:right; }
|
||||
.appyNav { padding: 0.4em 0 0.4em 0; }
|
||||
.appyFocus { color: #900101; }
|
||||
.appyTabs { margin-bottom: 1em; }
|
||||
.appyTabs li a { border-bottom:1px solid transparent; font-size: 90%; }
|
||||
.appyTabs li a:visited { color: #578308; }
|
||||
.appyTitle { padding-top: 0.5em; font-size: 110%; }
|
||||
.appyLabel { font-weight: bold; padding-right: 0.4em; }
|
||||
.appyRefEdit { line-height: 1.5em; }
|
||||
|
||||
.appyWorkflow {
|
||||
text-align: center;
|
||||
background-color: &dtml-globalBackgroundColor;;
|
||||
}
|
||||
|
||||
.appyList {
|
||||
line-height: 1.1em;
|
||||
margin: 0 0 0.5em 1.2em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.appyBullet {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.appyPod {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.appyNav {
|
||||
padding: 0.4em 0 0.4em 0;
|
||||
}
|
||||
|
||||
.appyFocus {
|
||||
color: #900101;
|
||||
}
|
||||
|
||||
#importedElem {
|
||||
color: grey;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.appyTabs {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.appyTabs li a {
|
||||
border-bottom:1px solid transparent;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.appyTabs li a:visited {
|
||||
color: #578308;
|
||||
}
|
||||
|
||||
.appyTitle {
|
||||
padding-top: 0.5em;
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
.appyLabel {
|
||||
font-weight: bold;
|
||||
padding-right: 0.4em;
|
||||
.appyPlusImg {
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
left: -1.4em;
|
||||
top: -0.55em;
|
||||
}
|
||||
|
||||
.appyPhase {
|
||||
|
@ -97,7 +70,7 @@
|
|||
font-size: 105%;
|
||||
}
|
||||
|
||||
/* stepxx classes are used for displaying status of a phase or state. */
|
||||
/* Following classes are used for displaying status of a phase or state. */
|
||||
.stepDone {
|
||||
background-color: #cde2a7;
|
||||
background-image: url(&dtml-portal_url;/skyn/done.png);
|
||||
|
@ -122,17 +95,6 @@
|
|||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.appyPlusImg {
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
left: -1.4em;
|
||||
top: -0.55em;
|
||||
}
|
||||
|
||||
.appyRefEdit {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.appyCommonInfo {
|
||||
border-color: #ffa500;
|
||||
background-color: &dtml-evenRowBackgroundColor;;
|
||||
|
@ -141,24 +103,15 @@
|
|||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.appyWorkflow {
|
||||
text-align: center;
|
||||
background-color: &dtml-globalBackgroundColor;;
|
||||
}
|
||||
|
||||
dl.expandedInlineCollapsible dt.collapsibleHeader, dl.expandedBlockCollapsible dt.collapsibleHeader {
|
||||
background:#dee7ec url(treeExpanded.gif) no-repeat scroll 6px 50%;
|
||||
border-width 1px;
|
||||
border-color: #8cacbb;
|
||||
border-style: solid;
|
||||
border-width: thin;
|
||||
}
|
||||
|
||||
/* With fields layout in columns, standard error frame is too large */
|
||||
.error {
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
.odd {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
/* Table styles */
|
||||
.no-style-table {
|
||||
border: 0 !important;
|
||||
|
|
Loading…
Reference in a new issue