From 0f5e3ac6037ca46afba9d2754cd1b7911e3297cf Mon Sep 17 00:00:00 2001
From: remi <remi.mayrand-provencher@inLibro.com>
Date: Wed, 29 Jul 2015 09:00:10 -0400
Subject: [PATCH] Bug 8612 - Cleans basket.tt by using TT blocks

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
---
 .../intranet-tmpl/prog/en/modules/acqui/basket.tt  | 47 +++++++++-------------
 1 file changed, 20 insertions(+), 27 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
index 9b97424..f6e9d89 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
@@ -1,3 +1,18 @@
+[% BLOCK btn_group %]
+    <div class="btn-group">
+       <fieldset class="action">
+          <label for="csv_code">Select CSV profile:</label>
+          <select id="csv_profile_for_export">
+             <option value="default">default</option>
+             [% IF csv_profiles %]
+                [% FOR csv IN csv_profiles %]
+                   <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
+                [% END %]
+             [% END %]
+          </select>
+       </fieldset>
+    </div>
+[% END %]
 [% USE KohaDates %]
 [% USE Branches %]
 [% USE Price %]
@@ -207,20 +222,9 @@
                             <a href="/cgi-bin/koha/acqui/basket.pl?op=close&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="fa fa-times-circle"></i> Close this basket</a>
                         </div>
                     [% END %]
-                       <div class="btn-group">
-                       <fieldset class="action">
-                          <label for="csv_code">Select CSV profile:</label>
-                          <select id="csv_profile_for_export">
-                             <option value="default">default</option>
-                             [% IF csv_profiles %]
-                                [% FOR csv IN csv_profiles %]
-                                   <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
-                                [% END %]
-                             [% END %]
-                          </select>
-                       </fieldset>
-                       </div>
-                       <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export as CSV</a></div>
+
+                       [% PROCESS btn_group %]
+                       <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export </a></div>
 
                         [% IF ediaccount %]
                         <div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
@@ -292,20 +296,9 @@
                 <div id="toolbar" class="btn-toolbar">
 
                     <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen this basket</a></div>
-                    <div class="btn-group">
-                    <fieldset class="action">
-                       <label for="csv_code">Select CSV profile:</label>
-                       <select id="csv_profile_for_export">
-                          <option value="default">default</option>
-                          [% IF csv_profiles %]
-                             [% FOR csv IN csv_profiles %]
-                                <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
-                             [% END %]
-                          [% END %]
-                       </select>
-                    </fieldset>
-                    </div>
+                    [% PROCESS btn_group %]
                     <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="fa fa-download"></i> Export this basket as CSV</a></div>
+
                 </div>
                 [% END %]
             [% END %]
-- 
2.1.4