Commit 42634988 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix class tool's dtml files so that it works on Zope-2.12.23 too. also add...

fix class tool's dtml files so that it works on Zope-2.12.23 too. also add some assertions to check if it works.
parent a374c6e6
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h2>Edit Constraint Class: <dtml-var class_id> <h2>Edit Constraint Class: <dtml-var class_id>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['Constraint'][class_id])"> <dtml-var expr="externalEditLink_(this()._getOb('Constraint')[class_id])">
</dtml-if></h2> </dtml-if></h2>
<form method="POST" action="<dtml-var absolute_url>"> <form method="POST" action="<dtml-var absolute_url>">
<input type="hidden" name=":default_method" value="changeConstraintEditingPreferences"> <input type="hidden" name=":default_method" value="changeConstraintEditingPreferences">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h2>Edit Document Class: <dtml-var class_id> <h2>Edit Document Class: <dtml-var class_id>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['Document'][class_id])"> <dtml-var expr="externalEditLink_(this()._getOb('Document')[class_id])">
</dtml-if></h2> </dtml-if></h2>
<form method="POST" action="<dtml-var absolute_url>"> <form method="POST" action="<dtml-var absolute_url>">
<input type="hidden" name=":default_method" value="changeDocumentEditingPreferences"> <input type="hidden" name=":default_method" value="changeDocumentEditingPreferences">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h2>Edit Extension Class: <dtml-var class_id> <h2>Edit Extension Class: <dtml-var class_id>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['Extensions'][class_id])"> <dtml-var expr="externalEditLink_(this()._getOb('Extensions')[class_id])">
</dtml-if></h2> </dtml-if></h2>
<form method="POST" action="<dtml-var absolute_url>"> <form method="POST" action="<dtml-var absolute_url>">
<input type="hidden" name=":default_method" value="changeExtensionEditingPreferences"> <input type="hidden" name=":default_method" value="changeExtensionEditingPreferences">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h2>Edit Property Sheet Class: <dtml-var class_id> <h2>Edit Property Sheet Class: <dtml-var class_id>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['PropertySheet'][class_id])"> <dtml-var expr="externalEditLink_(this()._getOb('PropertySheet')[class_id])">
</dtml-if></h2> </dtml-if></h2>
<form method="POST" action="<dtml-var absolute_url>"> <form method="POST" action="<dtml-var absolute_url>">
<input type="hidden" name=":default_method" value="changePropertySheetEditingPreferences"> <input type="hidden" name=":default_method" value="changePropertySheetEditingPreferences">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<h2>Edit Test Class: <dtml-var class_id> <h2>Edit Test Class: <dtml-var class_id>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['tests'][class_id])"> <dtml-var expr="externalEditLink_(this()._getOb('tests')[class_id])">
</dtml-if></h2> </dtml-if></h2>
<form method="POST" action="<dtml-var absolute_url>"> <form method="POST" action="<dtml-var absolute_url>">
<input type="hidden" name=":default_method" value="changeTestEditingPreferences"> <input type="hidden" name=":default_method" value="changeTestEditingPreferences">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<td> <td>
<div class="list-item"><dtml-var sequence-item> <div class="list-item"><dtml-var sequence-item>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['Constraint'][_['sequence-item']])"> <dtml-var expr="externalEditLink_(this()._getOb('Constraint')[_['sequence-item']])">
</dtml-if> </dtml-if>
</div> </div>
</td> </td>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<td> <td>
<div class="list-item"><dtml-var sequence-item> <div class="list-item"><dtml-var sequence-item>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['Document'][_['sequence-item']])"> <dtml-var expr="externalEditLink_(this()._getOb('Document')[_['sequence-item']])">
</dtml-if> </dtml-if>
</div> </div>
</td> </td>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<td> <td>
<div class="list-item"><dtml-var sequence-item> <div class="list-item"><dtml-var sequence-item>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['Extensions'][_['sequence-item']])"> <dtml-var expr="externalEditLink_(this()._getOb('Extensions')[_['sequence-item']])">
</dtml-if> </dtml-if>
</div> </div>
</td> </td>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<td> <td>
<div class="list-item"><dtml-var sequence-item> <div class="list-item"><dtml-var sequence-item>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['PropertySheet'][_['sequence-item']])"> <dtml-var expr="externalEditLink_(this()._getOb('PropertySheet')[_['sequence-item']])">
</dtml-if> </dtml-if>
</div> </div>
</td> </td>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<td> <td>
<div class="list-item"><dtml-var sequence-item> <div class="list-item"><dtml-var sequence-item>
<dtml-if expr="hasattr(this(), 'externalEditLink_')"> <dtml-if expr="hasattr(this(), 'externalEditLink_')">
<dtml-var expr="externalEditLink_(this()['tests'][_['sequence-item']])"> <dtml-var expr="externalEditLink_(this()._getOb('tests')[_['sequence-item']])">
</dtml-if> </dtml-if>
</div> </div>
</td> </td>
......
...@@ -54,6 +54,13 @@ class TestClassTool(ERP5TypeTestCase): ...@@ -54,6 +54,13 @@ class TestClassTool(ERP5TypeTestCase):
portal = self.portal portal = self.portal
self.assertNotEqual(None,getattr(portal,'portal_classes',None)) self.assertNotEqual(None,getattr(portal,'portal_classes',None))
self.commit() self.commit()
# check if web UI works
portal_classes = portal.portal_classes
portal_classes.manage_viewDocumentList()
portal_classes.manage_viewPropertySheetList()
portal_classes.manage_viewConstraintList()
portal_classes.manage_viewExtensionList()
portal_classes.manage_viewTestList()
def test_02_CheckFileWriteIsTransactional(self): def test_02_CheckFileWriteIsTransactional(self):
......
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