Skip to content

Commit

Permalink
Merge pull request #20 from zms-publishing/zmi4
Browse files Browse the repository at this point in the history
Renewed ZMI
  • Loading branch information
dataflake committed Jul 13, 2020
2 parents b9a0aee + edcb2d2 commit 39220df
Show file tree
Hide file tree
Showing 24 changed files with 431 additions and 344 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Products.ZMySQLDA change log

4.8 (unreleased)
----------------
- ZMI refresh for Zope 4 with svg icons
(`#20 <https://github.com/zms-publishing/Products.ZMySQLDA/pull/20>`_)


4.7 (2020-05-04)
Expand Down
4 changes: 2 additions & 2 deletions Products/ZMySQLDA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def initialize(context):
permission=add_zmysql_database_connections,
constructors=(DA.manage_addZMySQLConnectionForm,
DA.manage_addZMySQLConnection),
icon='www/da.gif')
icon='www/da.svg')


misc_ = {}
for icon in ('table', 'view', 'stable', 'what', 'field', 'text', 'bin',
'int', 'float', 'date', 'time', 'datetime'):
misc_[icon] = ImageFile(os.path.join('www', '%s.gif') % icon, globals())
misc_[icon] = ImageFile(os.path.join('www', '%s.svg') % icon, globals())
1 change: 1 addition & 0 deletions Products/ZMySQLDA/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def setUp(cls):
@classmethod
def testSetUp(cls):
from Products.ZMySQLDA import DA

# Clean out the test table before every test
if have_test_database():
dbconn = real_connect()
Expand Down
4 changes: 2 additions & 2 deletions Products/ZMySQLDA/tests/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def test_DateTime_or_None(self):
class DBPoolTests(unittest.TestCase):

def _makeOne(self, *args, **kw):
from Products.ZMySQLDA.db import DBPool
from Products.ZMySQLDA.db import DB
from Products.ZMySQLDA.db import DBPool
return DBPool(DB, **kw)

def test_instantiate_defaults(self):
Expand Down Expand Up @@ -111,8 +111,8 @@ def test_name(self):
class PatchedDBPoolTests(PatchedConnectionTestsBase):

def _makeOne(self, *args, **kw):
from Products.ZMySQLDA.db import DBPool
from Products.ZMySQLDA.db import DB
from Products.ZMySQLDA.db import DBPool
return DBPool(DB, **kw)

def test_variables(self):
Expand Down
6 changes: 6 additions & 0 deletions Products/ZMySQLDA/www/bin.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 10 additions & 5 deletions Products/ZMySQLDA/www/browse.dtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@

<main class="container-fluid">

<dtml-tree header=info>
<img src="&dtml-SCRIPT_NAME;/misc_/ZMySQLDA/&dtml-icon;"
alt="&dtml-type;" border="0">
<strong><dtml-var name></strong> (<code><dtml-var description></code>)
</dtml-tree>
<dtml-tree header=info>
<img src="&dtml-SCRIPT_NAME;/misc_/ZMySQLDA/&dtml-icon;" alt="&dtml-type;" title="&dtml-type;" style="height:16px;width:20px;" />
<b><dtml-var name></b>&nbsp;&nbsp;<code><dtml-var description></code>
</dtml-tree>

</main>

<style>
img:not([alt=table]) {
opacity:.35;
}
</style>

<dtml-var manage_page_footer>

0 comments on commit 39220df

Please sign in to comment.