diff --git a/sourcing/model.py b/sourcing/model.py index b9486a6..3ee0735 100644 --- a/sourcing/model.py +++ b/sourcing/model.py @@ -384,5 +384,13 @@ class SourceDoc(Item): return start + first_line return start + self.hashid + @property + def create_xanapage_url(self): + return self.view_url('create_xanapage_from_sourcedoc') + + @property + def entire_span(self): + return self.external_url + f',start=0,length={len(self.text)}' + configure_mappers() diff --git a/sourcing/templates/view.html b/sourcing/templates/view.html index 65f2817..eaed120 100644 --- a/sourcing/templates/view.html +++ b/sourcing/templates/view.html @@ -36,6 +36,31 @@ +{% if doc.type == "sourcedoc" %} +
span:
{% endif %} diff --git a/sourcing/view.py b/sourcing/view.py index d8e9072..e9ab384 100644 --- a/sourcing/view.py +++ b/sourcing/view.py @@ -401,6 +401,18 @@ def history(username, hashid): item = get_item(username, hashid) return render_template('history.html', doc=item) +@bp.route('/