From f1f0e330d62dceb1e9c7d3857225939f7d3ac0d2 Mon Sep 17 00:00:00 2001 From: Philipp Kraft Date: Fri, 26 Mar 2021 15:49:39 +0100 Subject: [PATCH] Simple take on #72 --- odmf/db/dataset.py | 9 +++++++++ odmf/static/templates/dataset-edit.html | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/odmf/db/dataset.py b/odmf/db/dataset.py index 35452fac..385c8416 100644 --- a/odmf/db/dataset.py +++ b/odmf/db/dataset.py @@ -234,6 +234,15 @@ def iterrecords(self, witherrors=False): f'{self}(type={self.type}) - data set has no records to iterate. Is the type correct?' ) + @property + def path(self): + from ..tools import Path as OPath + if self.filename: + p = OPath(self.filename) + if p.exists(): + return p + return None + def removedataset(*args): """Removes a dataset and its records entirely from the database diff --git a/odmf/static/templates/dataset-edit.html b/odmf/static/templates/dataset-edit.html index f5adcdca..2f5ef47e 100644 --- a/odmf/static/templates/dataset-edit.html +++ b/odmf/static/templates/dataset-edit.html @@ -155,6 +155,14 @@

Sorry, ${user()}

Name: ${ds_act.name} + + File + + +
+ + + Data: @@ -534,6 +542,10 @@

Some help for the Python and latex expressions

+
+ + +