0.11.0 (Major Release)
0.11.0 (Major Release)
Adds options of today
and yesterday
in the date picker
If you pass in user_options=True
to the date picker. You will be provided with options to select today or yesterday in the form tag.
Adds dateHelper
to the rootScope
The dateHelper has the functions now
and yesterday
that return javascript Dates for
the current time and the current time - 1 day.
Deprecates the _title property
In future we will use the standard verbose_name
property as the display name.
The abstract models have been changed to account for this.
Core API registration
A refactor in the way that the core APIs are registered by Opal means that
importing opal.core.api
in a plugin API no longer results in circular imports.
Fixes a bug whereby episodes were serialising differently depending on whether
the code path went via .to_dict()
or .objects.serialised()
.
HelpTextStep can now use a custom template
The opal.core.pathway.steps.HelpTextStep
can now have a help_text_template
passed in.
This is the template for what will be placed in the side bar.
Adds in a radio_vertical template tag
This displays the label and then the radio
buttons as a vertical list.
opal.core.serialization
A number of helpers related to serialization and deserialization have been brought
together in the new module opal.core.serialization
.
Removes "episode_history" from episode serialization
Serialised episodes previously contained a "shallow" copy of all other episodes in
a property named episode_history
. This was primarially useful before we switched
from episode-oriented to patient-oriented detail views by default.
This also includes a change to the signature of the .serialised()
method of the
Episode manager, which no longer accepts a episode_history
kwarg.
as_menuitem helpers
Applications using Opal Menuitems often wish to add menu items for Patient Lists and
Pathways.
To aid this, the .as_menuitem()
method now creates one from the target class with
sensible but overridable defaults.
opal serve
command
We add opal serve
to the Opal commandline tool. Currently this simply wraps the
Django runserver management command. It is envisaged that in the future this will
also initialize e.g. sass precompilers with a single command.
Misc Changes
Adds the utility function opal.utils.get
. Similar to the getattr
builtin, get
looks
for a method named get_$attr
and will call that if it exists.
Adds the method .get_absolute_url()
to opal.core.pathways.Pathway
and
opal.core.patient_lists.PatientList
.
Template removals
We removed a number of superfluous templates:
- opal/templates/patient_lists/spreadsheet_list.html
- opal/templates/layouts/left-panel.html
Static asset minification
The Django upgrade in Opal 0.10 stopped compressor minifying files
when DEBUG is set to False. This fixes that issue by upgrading Django compressor to
a version that supports Django 1.10.
The return of an old friend: IE Document modes
Users report that their system administrators sometimes configure Internet Explorer
in such a way that it uses e.g. IE7 Document mode by default.
This is problematical for Opal applications which do in fact make use of internet
technologies that were in widespread use after say, 2006.
We have altered base.html
to specify "X-UA-Compatible" content="IE=Edge"
. If you
override base.html
in your application we advise that you add this <meta>
tag.
Misc Changes
-
Adds the utility function
opal.core.subrecords.singletons()
which returns
a generator function which will yield all subrecord singletons. -
Fixes a URI encoding bug in the
Episode.findByHospitalNumber()
method that
made hospital numbers including#
or/
raise an error. -
Adds the methods
.get_absolute_url()
,.get_icon()
andget_display_name()
toopal.core.pathways.Pathway
andopal.core.patient_lists.PatientList
.
Updates to the Dependency Graph
- Django compressor: 1.5 -> 2.2