Skip to content

Commit

Permalink
use icons provided by zmi.icons package
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Havlik authored and dwt committed Jun 12, 2018
1 parent fc495a5 commit 8fe2882
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -6,6 +6,8 @@
.installed*.cfg
.mr.developer.cfg
.tox
.Python
pip-selfcheck.json
/bin/
/build/
/develop-eggs/
Expand Down
1 change: 1 addition & 0 deletions buildout.cfg
Expand Up @@ -22,6 +22,7 @@ parts =
sources-dir = develop
auto-checkout =
js.bootstrap
zmi.icons

[testenv]
PYTHONHASHSEED = random
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -79,6 +79,7 @@ def _read_file(filename):
'waitress',
'zExceptions >= 3.4',
'z3c.pt',
'zmi.icons',
'zope.browser',
'zope.browsermenu',
'zope.browserpage >= 4.0',
Expand Down
1 change: 1 addition & 0 deletions sources.cfg
Expand Up @@ -15,6 +15,7 @@ Persistence = git ${remotes:github}/Persistence pushurl=${remotes:github_push}/P
RestrictedPython = git ${remotes:github}/RestrictedPython pushurl=${remotes:github_push}/RestrictedPython
zExceptions = git ${remotes:github}/zExceptions pushurl=${remotes:github_push}/zExceptions
zope.globalrequest = git ${remotes:github}/zope.globalrequest pushurl=${remotes:github_push}/zope.globalrequest
zmi.icons = git ${remotes:github}/zmi.icons pushurl=${remotes:github_push}/zmi.icons

# Required depencencies
js.bootstrap = git https://github.com/gocept/js.bootstrap4.git branch=bootstrap4
Expand Down
2 changes: 2 additions & 0 deletions src/App/Management.py
Expand Up @@ -24,6 +24,7 @@
from zExceptions import Redirect
from zope.interface import implementer
import js.bootstrap
import zmi.icons

try:
from html import escape
Expand Down Expand Up @@ -159,6 +160,7 @@ class Navigation(Base):
def manage_page_header(self, *args, **kw):
"""manage_page_header."""
js.bootstrap.bootstrap.need()
zmi.icons.zmi_icons.need()
return self._manage_page_header(*args, **kw)

security.declarePublic('manage_zmi_logout')
Expand Down
2 changes: 1 addition & 1 deletion src/App/dtml/menu.dtml
Expand Up @@ -26,7 +26,7 @@
</table>

<dtml-tree nowrap=1>
<a href="&dtml.url_quote-tree-item-url;/manage_workspace"
<a class="&dtml-zmi_icon;" href="&dtml.url_quote-tree-item-url;/manage_workspace"
target="manage_main">&dtml-id;</a>
</dtml-tree>
<br />
Expand Down
2 changes: 2 additions & 0 deletions src/OFS/Folder.py
Expand Up @@ -67,6 +67,8 @@ class Folder(
"""
meta_type = 'Folder'

zmi_icon = 'icon-folder'

_properties = (
{'id': 'title', 'type': 'string', 'mode': 'wd'},
)
Expand Down
2 changes: 2 additions & 0 deletions src/OFS/SimpleItem.py
Expand Up @@ -80,6 +80,8 @@ class Item(Base,
Owned):
"""A common base class for simple, non-container objects."""

zmi_icon = 'icon-file'

security = ClassSecurityInfo()

isPrincipiaFolderish = 0
Expand Down
10 changes: 5 additions & 5 deletions src/OFS/dtml/main.dtml
Expand Up @@ -28,10 +28,10 @@
<thead class="thead-light">
<tr>
<th scope="col"></th>
<th scope="col" class="col-1">Type</th>
<th scope="col" class="col-2">Id</th>
<th scope="col" class="col-8">Title</th>
<th scope="col" class="text-right col-1">Size</th>
<th scope="col">Type</th>
<th scope="col">Id</th>
<th scope="col">Title</th>
<th scope="col">Size</th>
</tr>
</thead>

Expand All @@ -41,7 +41,7 @@
<input type="checkbox" name="ids:list" value="&dtml-sequence-key;" />
</td>
<td>
<i>&dtml-meta_type;</i>
<span class="&dtml-zmi_icon;" title="&dtml-meta_type;"><span class="sr-only">&dtml-meta_type;</span></span>
</td>

<td>
Expand Down

0 comments on commit 8fe2882

Please sign in to comment.