Skip to content

Commit

Permalink
Merge branch 'release/1.8.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang committed Apr 11, 2017
2 parents 056663c + ba8c0fd commit 66e078d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

CHANGELOG
=========
Release 1.8.1 - Bug Fixes
* Annotation counts do not appear in Volume list
* Option to export personal versus group annotations is missing

Release 1.8 - WebSocket 1.x Upgrade, Move to ECDS VM
----------------------------------------------------
* Chore: Move Readux to New Prod server
Expand Down
2 changes: 1 addition & 1 deletion readux/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version_info__ = (1, 8, 0, None)
__version_info__ = (1, 8, 1, None)

# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
Expand Down
2 changes: 1 addition & 1 deletion readux/books/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class VolumeExport(forms.Form):
annotations = forms.ChoiceField(
label='Annotations to export',
help_text='Individual annotations or all annotations shared with ' +
'a single group')
'a single group.')

#: include page images in export, instead of referencing on readux
include_images = forms.BooleanField(
Expand Down
6 changes: 6 additions & 0 deletions readux/books/templates/books/volume_export.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
var deep_zoom = $("div.form-group:has(#id_deep_zoom)");
var deep_zoom_select = $("#id_deep_zoom")[0];
var image_hosting = $("div.form-group:has(#id_image_hosting)");
var annotations = $("div.form-group:has(#id_annotations)");
// some form options are relevant to jekyll but not TEI export
var jekyll_only = $('.jekyll-only');

Expand Down Expand Up @@ -186,6 +187,7 @@
github_repo.hide(transition);
update_repo.hide(transition);
jekyll_only.hide(transition);
annotations.hide(transition);

// toggle UI usabilities
toggle_deep_zoom(deep_zoom_select[0]);
Expand All @@ -194,14 +196,18 @@
if (this.value == 'github') {
jekyll_only.show(transition);
github_repo.show(transition);
annotations.show(transition);
} else if (this.value == 'download') {
jekyll_only.show(transition);
annotations.show(transition);
} else if (this.value == 'github_update') {
jekyll_only.show(transition);
update_repo.show(transition);
annotations.show(transition);
} else if (this.value == 'tei') {
// jekyll options not applicable for tei export
jekyll_only.css("display", "none");
annotations.show(transition);
}
});

Expand Down
9 changes: 5 additions & 4 deletions readux/books/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ def get_context_data(self):
if context_data['paginator'].count and self.request.user.is_authenticated():
notes = Volume.volume_annotation_count(self.request.user)
domain = get_current_site(self.request).domain.rstrip('/')
if not domain.startswith('http'):
domain = 'http://' + domain
if not domain.startswith('https'):
domain = 'https://' + domain
annotated_volumes = dict([(k.replace(domain, ''), v)
for k, v in notes.iteritems()])

Expand Down Expand Up @@ -355,8 +355,9 @@ def get_context_data(self, **kwargs):
# strip out base site url for easy lookup in the template
# (need leading / left to match item urls)
domain = get_current_site(self.request).domain.rstrip('/')
if not domain.startswith('http'):
domain = 'http://' + domain
if not domain.startswith('https'):
domain = 'https://' + domain

annotated_pages = dict([(k.replace(domain, ''), v)
for k, v in notes.iteritems()])
else:
Expand Down

0 comments on commit 66e078d

Please sign in to comment.