Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renewed ZMI #20

Merged
merged 6 commits into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading
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>
Loading