Skip to content

Commit

Permalink
Merge branch 'localstyles' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejmets committed Jun 2, 2021
2 parents e87728d + 92ff0f1 commit 06b5ca3
Show file tree
Hide file tree
Showing 15 changed files with 163 additions and 5 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from setuptools import setup, find_packages

version = "1.0.1"
version = "2.0.1"

setup(
name="bika.ui",
version=version,
description="Custom user interface for SENAITE LIMS",
description="Custom user interface for SENAITE LIMS 2",
long_description='',
classifiers=[
"Framework :: Plone",
Expand All @@ -29,6 +29,8 @@
install_requires=[
"setuptools",
"senaite.lims",
"collective.localstyles",
"z3c.jbot"
],
extras_require={
"test": [
Expand Down
7 changes: 4 additions & 3 deletions src/bika.ui.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Metadata-Version: 1.1
Metadata-Version: 2.1
Name: bika.ui
Version: 1.0.1
Summary: Custom user interface for SENAITE LIMS
Version: 2.0.1
Summary: Custom user interface for SENAITE LIMS 2
Home-page: https://github.com/bika/bika.ui
Author: BikaLabs
Author-email: [email protected]
Expand All @@ -13,3 +13,4 @@ Classifier: Framework :: Zope2
Classifier: Programming Language :: Python
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Provides-Extra: test
2 changes: 2 additions & 0 deletions src/bika.ui.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
README.md
setup.cfg
setup.py
src/bika/__init__.py
Expand All @@ -11,5 +12,6 @@ src/bika.ui.egg-info/requires.txt
src/bika.ui.egg-info/top_level.txt
src/bika/ui/__init__.py
src/bika/ui/interfaces.py
src/bika/ui/setuphandlers.py
src/bika/ui/browser/__init__.py
src/bika/ui/browser/view.py
2 changes: 2 additions & 0 deletions src/bika.ui.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
setuptools
senaite.lims
collective.localstyles
z3c.jbot

[test]
Products.PloneTestCase
Expand Down
5 changes: 5 additions & 0 deletions src/bika/ui/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<browser:jbot
layer="senaite.core.interfaces.ISenaiteCore"
directory="overrides" />


</configure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div id="senaite-colophon"
i18n:domain="senaite.core">

<div class="container-fluid">
<div class="row">
<div class="col-md-12">

<div class="text-center text-muted">
<ul class="list-inline">
<li i18n:translate="label_powered_by">
<span i18n:translate="labwl_powered_by">Powered by</span>
<a href="http://bikalims.org"
title="This is a Bika LIMS installation"
i18n:attributes="title title_built_with_plone;"
i18n:translate="label_powered_by_plone">
Bika LIMS,</a>
<a href="https://github.com/senaite"
title="Senaite LIMS at its core"
i18n:attributes="title title_built_with_plone;"
i18n:translate="label_powered_by_plone">
Senaite,</a>
<a href="http://plone.org"
title="Built in the Plone CMS framework"
i18n:attributes="title title_built_with_plone;"
i18n:translate="label_powered_by_plone">
Plone</a>
<a href="http://python.org"
title="Coded in Python"
i18n:attributes="title title_built_with_plone;"
i18n:translate="label_powered_by_plone">
&amp; Python</a>
</li>
</ul>
</div>

</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<footer i18n:domain="senaite.core"
id="senaite-footer">

<div class="row">
<div class="col-md-12">
<hr/>
<!-- footer portlets -->
<div tal:on-error="nothing" tal:replace="structure view/render_footer_portlets" />
<div class="float-right" style="font-size: 0.9em">
<ul class="nav nav-pills">
<li><a class="nav-link" href="mailto:[email protected]?subject=Please subscribe me to Bika Slack" title="Slack messaging - request an invite" target="_blank">Chat Room</a></li>
<li><a class="nav-link" href="https://users.bikalims.org" title="The Bika Corral" target="_blank">User Group</a></li>
<li><a class="nav-link" href="http://eepurl.com/hrI0nD" title="Subscribe to our not so regular newsletter" target="_blank">Newsletter</a></li>
<li><a class="nav-link" href="https://twitter.com/BikaLIMS" title="Bika LIMS on Twitter" target="_blank">Twitter</a></li>
</ul>
</div>
</div>
</div>
</footer>
3 changes: 3 additions & 0 deletions src/bika/ui/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<version>1.0.1</version>
<dependencies>
<dependency>profile-collective.localstyles:default</dependency>
</dependencies>
</metadata>
38 changes: 38 additions & 0 deletions src/bika/ui/profiles/default/registry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<registry xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="senaite.core">

<!-- Site Title -->
<record name="plone.site_title" interface="Products.CMFPlone.interfaces.controlpanel.ISiteSchema" field="site_title">
<field type="plone.registry.field.TextLine">
<default>SENAITE LIMS</default>
<description xmlns:ns0="http://xml.zope.org/namespaces/i18n" ns0:domain="plone" ns0:translate="">This shows up in the title bar of browsers and in syndication feeds.</description>
<title xmlns:ns0="http://xml.zope.org/namespaces/i18n" ns0:domain="plone" ns0:translate="">Site title</title>
</field>
<value>Bika LIMS</value>
</record>

<!-- Toolbar Logo -->
<record name="senaite.toolbar_logo" interface="Products.CMFPlone.interfaces.controlpanel.ISiteSchema" field="toolbar_logo">
<field type="plone.registry.field.TextLine">
<default>/++resource++bika.lims.images/bikalimslogo.png</default>
<description xmlns:ns0="http://xml.zope.org/namespaces/i18n" ns0:domain="plone" ns0:translate="">This must be a URL relative to the site root.</description>
<required>False</required>
<title xmlns:ns0="http://xml.zope.org/namespaces/i18n" ns0:domain="plone" ns0:translate="">Relative URL for the SENAITE toolbar logo</title>
</field>
<value>/++resource++bika.lims.images/bikalimslogo.png</value>
</record>

<!-- Toolbar CSS Styles -->
<record name="senaite.toolbar_logo_styles" interface="Products.CMFPlone.interfaces.controlpanel.ISiteSchema" field="toolbar_logo_styles">
<field type="plone.registry.field.Dict">
<title>Toolbar CSS</title>
<description>CSS styles for the toolbar logo</description>
<key_type type="plone.registry.field.ASCIILine" />
<value_type type="plone.registry.field.ASCIILine" />
</field>
<value>
<element key="height">50px</element>
</value>
</record>

</registry>
1 change: 1 addition & 0 deletions src/bika/ui/profiles/default/structure/.objects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
localstyles.css,File
22 changes: 22 additions & 0 deletions src/bika/ui/profiles/default/structure/localstyles.css/.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
title: localstyles.css
description:
subjects:
language: en
effective:
expires:
creators: admin
contributors:
rights:
allow_discussion:
id: localstyles.css
exclude_from_nav: False
relatedItems:
MIME-Version: 1.0
Content-Type: text/css
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename*="utf-8''localstyles.css"
Portal-Type: File

I3NlbmFpdGUtdG9vbGJhciB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTsKfQojc2VuYWl0
ZS10b29sYmFyIGEgewogICAgY29sb3I6ICMyOTMzMzM7Cn0KI3NlbmFpdGUtdG9vbGJhciBhOmhv
dmVyIHsKICAgIGNvbG9yOiBkYXJrZ3JleTsKfQo=
Empty file.
15 changes: 15 additions & 0 deletions src/bika/ui/setuphandlers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from bika.ui import logger
from bika.ui import PRODUCT_NAME
from bika.ui import PROFILE_ID


def post_install(portal_setup):
"""Runs after the last import step of the *default* profile
This handler is registered as a *post_handler* in the generic setup profile
:param portal_setup: SetupTool
"""
logger.info("{} post-install handler [BEGIN]".format(PRODUCT_NAME.upper()))
context = portal_setup._getImportContext(PROFILE_ID)
portal = context.getSite() # noqa

logger.info("{} post-install handler [DONE]".format(PRODUCT_NAME.upper()))
Binary file added src/bika/ui/static/lims/images/bikalimslogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/bika/ui/static/lims/styles/localstyles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#senaite-toolbar {
background-color: white;
}
#senaite-toolbar a {
color: #293333;
}
#senaite-toolbar a:hover {
color: darkgrey;
}

0 comments on commit 06b5ca3

Please sign in to comment.