From f9addd519cf4cfa1206383468aefeabeaed7997c Mon Sep 17 00:00:00 2001 From: "Dr. Frank Hoffmann" Date: Fri, 29 Jun 2018 23:24:51 +0200 Subject: [PATCH] refactored python_script templates for bootstrap zmi --- src/Products/PythonScripts/PythonScript.py | 4 +- .../PythonScripts/www/pyScriptAdd.dtml | 60 +++---- .../PythonScripts/www/pyScriptEdit.dtml | 153 +++++++++--------- .../PythonScripts/www/pyScriptProxy.dtml | 64 ++++---- src/Products/PythonScripts/www/pyscript.gif | Bin 184 -> 0 bytes 5 files changed, 144 insertions(+), 137 deletions(-) delete mode 100644 src/Products/PythonScripts/www/pyscript.gif diff --git a/src/Products/PythonScripts/PythonScript.py b/src/Products/PythonScripts/PythonScript.py index 807a168..5c06dbb 100644 --- a/src/Products/PythonScripts/PythonScript.py +++ b/src/Products/PythonScripts/PythonScript.py @@ -92,7 +92,7 @@ def manage_addPythonScript(self, id, REQUEST=None, submit=None): u = self.DestinationURL() except Exception: u = REQUEST['URL1'] - if submit == " Add and Edit ": + if submit == "Add and Edit": u = "%s/%s" % (u, quote(id)) REQUEST.RESPONSE.redirect(u + '/manage_main') return '' @@ -106,7 +106,7 @@ class PythonScript(Script, Historical, Cacheable): """ meta_type = 'Script (Python)' - zmi_icon = 'fab fa-python' + zmi_icon = 'fa fa-terminal' _proxy_roles = () _params = _body = '' diff --git a/src/Products/PythonScripts/www/pyScriptAdd.dtml b/src/Products/PythonScripts/www/pyScriptAdd.dtml index 6660138..9ea7122 100644 --- a/src/Products/PythonScripts/www/pyScriptAdd.dtml +++ b/src/Products/PythonScripts/www/pyScriptAdd.dtml @@ -1,32 +1,38 @@ -
- - -

-Python Scripts allow you to add functionality to Zope by writing -scripts in the Python programming language -that are exposed as callable Zope objects. You may choose to upload -the script from a local file by typing the file name or using the -browse button. -

- -
-
- - -
-
- - -
-
- - -
+
+ + + +

+ Python Scripts allow you to add functionality to Zope by writing + scripts in the Python programming language that are exposed as callable + Zope objects. You may choose to upload the script from a local file by + typing the file name or using the browse button. +

+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ + +
+
diff --git a/src/Products/PythonScripts/www/pyScriptEdit.dtml b/src/Products/PythonScripts/www/pyScriptEdit.dtml index 597d6eb..11c891e 100644 --- a/src/Products/PythonScripts/www/pyScriptEdit.dtml +++ b/src/Products/PythonScripts/www/pyScriptEdit.dtml @@ -1,91 +1,88 @@ - -
-
+ - -
- - -
-
- - -
-
- - -
- -
- -&dtml-sequence-item;, - -
-
-
-
+
- - - + - - - + +
+ +
+ +
+
+
+ +
+ +
+
+
+ + + +
+ +
+

&dtml-sequence-item;, +

+
+
+
+ + + + + + + + + + + - - - +
+ + + + + + +
-
- - Locked - - - -
-

-You may upload the source for &dtml-title_and_id; using the form below. -Choose an existing file from your local computer by clicking browse -The contents of the file should be a valid script with an optional -"##data" block at the start. You may click the following link -to view or download the current source. -

-
-
- - -
-
- - Locked - - - -
-
+ +
+ +

+ You may upload the source for &dtml-title_and_id; using the form below. + Choose an existing file from your local computer by clicking browse + The contents of the file should be a valid script with an optional + "##data" block at the start. You may click the following link + to view or download the current source. +

+ +
+
+ + +
+
+ +
+
+
+
diff --git a/src/Products/PythonScripts/www/pyScriptProxy.dtml b/src/Products/PythonScripts/www/pyScriptProxy.dtml index 27c1502..ee12be2 100644 --- a/src/Products/PythonScripts/www/pyScriptProxy.dtml +++ b/src/Products/PythonScripts/www/pyScriptProxy.dtml @@ -1,34 +1,38 @@ + -
- -

-Proxy roles allow you to control the access that a script has. Proxy roles -replace the roles of the user who is executing the script. This can be used -to both expand and limit access to resources. Select the proxy roles for -this object from the list below. -

- -
-
- - -
- -
- -
- -
+ +
+ +

+ Proxy roles allow you to control the access that a script has. Proxy roles + replace the roles of the user who is executing the script. This can be used + to both expand and limit access to resources. Select the proxy roles for + this object from the list below. +

+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ diff --git a/src/Products/PythonScripts/www/pyscript.gif b/src/Products/PythonScripts/www/pyscript.gif deleted file mode 100644 index 7eaeb2008c7e822295e150b0ad9843725a9962c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 184 zcmZ?wbhEHb6krfw*v!D7FaZb^CIIn&1qO!y4Gato4Gr_=*#H4U1A~HsLIY6fKLZf_ z{|}-Rf3h$#Fz_+xfP_G1FtDUv@VqKD$-@8QwVhGRB)Ah>A1%`Jkk;zjpx4QsboY$G z*XdWa;+mK5vJ`2KRlVqOrRTWQ)aE2cG@&pTe7 cu_S#p%Y!%9tmal5)Rg&%@-_