From ad65f5841524917de3e7abd9526dad143213312d Mon Sep 17 00:00:00 2001
From: Tarje Lavik <tarje.lavik@gmail.com>
Date: Mon, 24 Sep 2018 11:59:20 +0200
Subject: [PATCH] Deleted unnecessary queries and some clean up after summer
 vacation

---
 components/includes/simplecart.inc                |  3 ++-
 components/services/home/html.template            |  3 +--
 components/types/bibo__Document/html.template     |  8 ++++++--
 components/types/ubbont__Photograph/html.template | 13 +++++++++----
 4 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/components/includes/simplecart.inc b/components/includes/simplecart.inc
index ce6d6707..37a4c3be 100755
--- a/components/includes/simplecart.inc
+++ b/components/includes/simplecart.inc
@@ -45,4 +45,5 @@
 				
 
 				</div>
-			</div>
\ No newline at end of file
+			</div>
+			
diff --git a/components/services/home/html.template b/components/services/home/html.template
index 7bb4fc88..30e1e8a2 100644
--- a/components/services/home/html.template
+++ b/components/services/home/html.template
@@ -213,8 +213,7 @@
 	
 	<div class="row">
 		<div style="width: 80%; margin: auto; margin-bottom: 70px; margin-top: 30px;">
-  	<!--	<div class="alert alert-warning"><p><i class="fa fa-warning"></i> Siste frist for bestilling av bilder fra Billedsamlingen før sommeren er 19. juni.</p></div>
--->
+  	<!--	<div class="alert alert-warning"><p><i class="fa fa-warning"></i> Siste frist for bestilling av bilder fra Billedsamlingen før sommeren er 2. juli.</p></div>-->
   		<!--<div class="alert alert-danger" role="alert"><strong>Søket er utilgjengelig.</strong> Marcus har tekniske problemer og vi jobber med å fikse de. Søket er forhåpentligvis snart tilbake!</div>-->
 
 			<form style="width: 100%; margin: auto; border-bottom: 1px dotted #666" role="search" method="get" action="/search">
diff --git a/components/types/bibo__Document/html.template b/components/types/bibo__Document/html.template
index 1eaac3d1..f466360d 100755
--- a/components/types/bibo__Document/html.template
+++ b/components/types/bibo__Document/html.template
@@ -518,7 +518,11 @@
 				<li><i>{{ first.physical.physicalCondition.value }}</i></li>
 		    {% endif %}
 		    {% if first.physical.physicalDescription.value != null %}
-				<li>{{ first.physical.physicalDescription.value }}</li>
+			{% for row in models.physical  %}
+			  {% ifchanged row.physicalDescription.value %}
+				<li>{{ row.physicalDescription.value }}</li>
+ 			  {% endifchanged %}
+			{% endfor %}
 		    {% endif %}
 		    </ul>
 		    {% endif %}
@@ -558,4 +562,4 @@
    <!-- END MAIN-BODY/CONTAINER -->
 
   </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/components/types/ubbont__Photograph/html.template b/components/types/ubbont__Photograph/html.template
index 12b54ad8..2ae7ba87 100755
--- a/components/types/ubbont__Photograph/html.template
+++ b/components/types/ubbont__Photograph/html.template
@@ -339,7 +339,7 @@
 		{%endif%}
 
 	</div>
-		
+
 	<div class="col-md-8 col-md-pull-4">
   	
 	   		    
@@ -540,9 +540,14 @@
 	    {% if first.physical.physicalCondition.value != null %}	
 			<li><i>{{ first.physical.physicalCondition.value }}</i></li>
 	    {% endif %}
-	    {% if first.physical.physicalDescription.value != null %}
-			<li>{{ first.physical.physicalDescription.value }}</li>
-	    {% endif %}
+	    
+{% if first.physical.physicalDescription.value != null %}
+                        {% for row in models.physical  %}
+                          {% ifchanged row.physicalDescription.value %}
+                                <li>{{ row.physicalDescription.value }}</li>
+                          {% endifchanged %}
+                        {% endfor %}
+                    {% endif %}
 	    </ul>
 	    {% endif %}
 	    
-- 
GitLab