Skip to content

Commit

Permalink
Resurrected copyright and license page and styled it (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake authored and Michael Howitz committed Mar 8, 2019
1 parent f48dda6 commit 55a2183
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Expand Up @@ -14,6 +14,9 @@ https://github.com/zopefoundation/Zope/blob/4.0a6/CHANGES.rst
Fixes
+++++

- Resurrected copyright and license page
(`#482 <https://github.com/zopefoundation/Zope/issues/482>`_)

- Fix FindSupport binary value handling
(`#406 <https://github.com/zopefoundation/Zope/issues/406>`_)

Expand Down
3 changes: 3 additions & 0 deletions src/App/Management.py
Expand Up @@ -174,6 +174,9 @@ def manage_page_header(self, *args, **kw):
security.declareProtected(view_management_screens, 'manage_navbar')
manage_navbar = DTMLFile('dtml/manage_navbar', globals())

security.declarePublic('zope_copyright')
zope_copyright = DTMLFile('dtml/copyright', globals())

security.declarePublic('manage_zmi_logout')
def manage_zmi_logout(self, REQUEST, RESPONSE):
"""Logout current user"""
Expand Down
107 changes: 107 additions & 0 deletions src/App/dtml/copyright.dtml
@@ -0,0 +1,107 @@
<!doctype html>
<html lang="en">

<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

<title>Zope Public License (ZPL) Version 2.1</title>
<link rel="stylesheet" type="text/css" href="/++resource++zmi/bootstrap-4.1.1/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/++resource++zmi/zmi_base.css" />

<link rel="shortcut icon" type="image/x-icon" href="/++resource++zmi/logo/favicon/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/++resource++zmi/logo/favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/++resource++zmi/logo/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/++resource++zmi/logo/favicon/favicon-16x16.png" />
<link rel="manifest" href="/++resource++zmi/logo/favicon/site.webmanifest" />
<link rel="mask-icon" href="/++resource++zmi/logo/favicon/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="msapplication-config" content="/++resource++zmi/logo/favicon/browserconfig.xml"/>
<meta name="msapplication-TileColor" content="#2d89ef" />
<meta name="theme-color" content="#ffffff" />
</head>

<body id="nodeid-" class="zmi zmi-Folder zmi-zope_copyright">

<header class="navbar navbar-nav navbar-expand navbar-dark">
<h2>Zope Public License (ZPL) Version 2.1</h2>
</header>

<main>

<h3>This software is Copyright &copy;
<a href="http://www.zope.org/en/latest/foundation.html" target="_top">
Zope Foundation</a> and Contributors. All rights reserved.</h3>

<p>
This license has been certified as open source. It has also
been designated as GPL compatible by the Free Software
Foundation (FSF).
</p>

<p>
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the
following conditions are met:
</p>

<ol>
<li>
Redistributions in source code must retain the
accompanying copyright notice, this list of conditions,
and the following disclaimer.
</li>
<li>
Redistributions in binary form must reproduce the accompanying
copyright notice, this list of conditions, and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
</li>
<li>
Names of the copyright holders must not be used to
endorse or promote products derived from this software
without prior written permission from the copyright
holders.
</li>
<li>
The right to distribute this software or to use it for
any purpose does not give you the right to use
Servicemarks (sm) or Trademarks (tm) of the copyright
holders. Use of them is covered by separate agreement
with the copyright holders.
</li>
<li>
If any files are modified, you must cause the modified
files to carry prominent notices stating that you changed
the files and the date of any change.
</li>
</ol>

<h3>Disclaimer</h3>
<p>
<strong>
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE COPYRIGHT HOLDERS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
</strong>
</p>

</main>

</body>
<script>
// Helpers for Menu Handling
var manage_menu = typeof window.parent.frames!="undefined"&&typeof window.parent.frames.manage_menu!="undefined";
window.parent.history.replaceState('','Main','/zope_copyright')
</script>
</html>
3 changes: 2 additions & 1 deletion src/App/dtml/menu.dtml
Expand Up @@ -29,7 +29,8 @@

<li><a id="menu_logout" href="manage_zmi_logout">Logout</a></li>
<li role="separator" class="divider"></li>
<li><a id="menu_copyright" href="manage_copyright">&copy; Zope Foundation</a></li>
<li><a id="menu_copyright" href="zope_copyright"
target="manage_main">&copy; Zope Foundation</a></li>
</ul>
</div>

Expand Down
6 changes: 6 additions & 0 deletions src/zmi/styles/resources/zmi_base.css
Expand Up @@ -846,6 +846,12 @@ header.navbar select.form-control-sm,

}
}
.zmi-zope_copyright h2 {
font-size: 130%;
color: white;
margin: 0;
}

/* EXAMPLE: IMPLANT YOUR LOGO */
/*
.zmi-manage_menu {
Expand Down

0 comments on commit 55a2183

Please sign in to comment.