TPac: repaired hold status display bug
authorBill Erickson <berick@esilibrary.com>
Mon, 12 Sep 2011 17:23:17 +0000 (13:23 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 12 Sep 2011 17:23:17 +0000 (13:23 -0400)
Pipe dynamic text through |html inside the hold_status block instead of
piping the output, since the block returns HTML.

Repaired faulty </div>

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/opac/myopac/holds/edit.tt2
Open-ILS/src/templates/opac/parts/hold_status.tt2

index 711a6c3..1f825ef 100644 (file)
@@ -30,7 +30,7 @@
                 <img src="[% ctx.media_prefix %]/images/[% attrs.format_icon %]" alt="[% attrs.format %]" title="[% attrs.title | html %]" />
             </p>[% END %]
             <p>
-                <strong>[% l('Status') %]</strong>: [% hold.human_status | html %]
+                <strong>[% l('Status') %]</strong>: [% hold.human_status %]
             </p>
             <form method="POST">
                 <table id="hold_editor_table">
index a15ec5f..1480665 100644 (file)
@@ -2,27 +2,28 @@
     <div>
     [% 
         IF hold.hold.status == 4;
-            l("Available");
+            l("Available") | html;
             IF ahr.shelf_expire_time;
-                l('<br/>Expires [_1]', 
-                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+                '<br/>';
+                l('Expires [_1]', 
+                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT)) | html;
             END;
 
         ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
             # estimated wait is delivered as seconds.
             SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
-            l("Estimated wait: [quant,_1,day,days]", hwait);
+            l("Estimated wait: [quant,_1,day,days]", hwait) | html;
 
         ELSIF hold.hold.status == 3;
-            l("In Transit");
+            l("In Transit") | html;
 
         ELSIF hold.hold.status < 3;
-            l("Waiting for copy");
+            l("Waiting for copy") | html;
         END 
     %]
-    <div>
+    </div>
     <div>
         [% l('[_1] hold on [quant,_2,circulating copy,circulating copies]', 
-            hold.hold.queue_position, hold.hold.potential_copies) %]
+            hold.hold.queue_position, hold.hold.potential_copies) | html %]
     </div>
 [% END %]