.
This commit is contained in:
+14
-1
@@ -253,6 +253,19 @@ class LongSeries(models.Model):
|
||||
"""Returns a comma seperated text list of regions"""
|
||||
return str(self.examination)
|
||||
|
||||
def get_examination_full(self):
|
||||
examination = ""
|
||||
plane = ""
|
||||
contrast = ""
|
||||
|
||||
if self.examination:
|
||||
examination = self.examination
|
||||
if self.plane:
|
||||
plane = " {}".format(self.plane)
|
||||
if self.contrast:
|
||||
contrast = " {}".format(self.contrast)
|
||||
return "{}{}{}".format(examination, plane, contrast)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("longs:long_series_detail", kwargs={"pk": self.pk})
|
||||
|
||||
@@ -279,7 +292,7 @@ class LongSeries(models.Model):
|
||||
return format_html('<img src="/media/{}" />', thumbnail), len(images)
|
||||
|
||||
def get_block(self):
|
||||
examination = self.get_examination()
|
||||
examination = self.get_examination_full()
|
||||
thumb, image_number = self.get_thumbnail()
|
||||
return format_html(
|
||||
"<div>{}<br/>{}<br/>Images: {}</div>", examination, thumb, image_number
|
||||
|
||||
@@ -14,7 +14,7 @@ This series is not associated with any cases.
|
||||
|
||||
<div>Author: {{ series.get_author_display }}</div>
|
||||
|
||||
<a href="{% url 'longs:long_series_order_dicom' pk=series.pk %}" title="orders dicom by slice location">Order dicoms</a>
|
||||
<a href="{% url 'longs:long_series_order_dicom' pk=series.pk %}" title="orders dicom by slice location">Order dicoms by slice location</a> <br/>
|
||||
<a href="{% url 'longs:long_series_order_upload_filename' pk=series.pk %}" title="orders dicom by slice location">Order by uploaded filename</a>
|
||||
{% for image in series.images.all %}
|
||||
{{image.image.url}}, pos: {{image.position}}, {{image.upload_filename}}</br>
|
||||
|
||||
Reference in New Issue
Block a user