LP 1944602 Bootstrap Opac: Address alignment
authorGarry Collum <gcollum@gmail.com>
Tue, 23 Aug 2022 19:47:00 +0000 (19:47 +0000)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 23 Nov 2022 15:49:26 +0000 (10:49 -0500)
Fixes the alignment of patron addresses in the Bootstap opac, if the
patron as more than one address.  Two addresses will now display
side-by-side in a row, except on smaller screens.

To test:

1. To fully test use patrons with one address, two addresses, and more than
two addresses.
2. Login as each patron and notice the mis-aligned addresses.
3. Apply the patch.
4. The addresses should now be displayed side-by-side, two per row. They
collapse to one per row on smaller screens.
5. Enable the 'Allow pending addresses' library setting.  The editable
address displays in the same space as it's non-editable display.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2

index 74bb68c..fbd83ca 100755 (executable)
 
             <tbody>
             <tr>
-              <td>
                 <!-- pending address form -->
                 [% IF pending_addr OR edit_addr_id == cur_id;
                     update_addr = pending_addr || addr %]
+              <td>
 
                     <form method='post'>
                         [% IF pending_addr %]
                 <td>
 
                     <!-- read-only address display -->
-                    <table class='table' title="[% l('Active Addresses') %]">
-                        <tr><td>[% l("Address Type") %]</td><td>[% addr.address_type | html %]</td></tr>
-                        <tr><td>[% l("Street") %]</td><td>[% addr.street1 | html %]</td></tr>
-                        <tr><td>[% l("Street") %]</td><td>[% addr.street2 | html %]</td></tr>
-                        <tr><td>[% l("City") %]</td><td>[% addr.city | html %]</td></tr>
-                        <tr><td>[% l("County") %]</td><td>[% addr.county| html  %]</td></tr>
-                        <tr><td>[% l("State") %]</td><td>[% addr.state | html %]</td></tr>
-                        <tr><td>[% l("Country") %]</td><td>[% addr.country | html %]</td></tr>
-                        <tr><td>[% l("Zip") %]</td><td>[% addr.post_code | html %]</td></tr>
+                    <table class='table table-hover light_border' title="[% l('Active Addresses') %]">
+                        <tr><td class='color_4'>[% l("Address Type") %]</td><td>[% addr.address_type | html %]</td></tr>
+                        <tr><td class='color_4'>[% l("Street") %]</td><td>[% addr.street1 | html %]</td></tr>
+                        <tr><td class='color_4'>[% l("Street") %]</td><td>[% addr.street2 | html %]</td></tr>
+                        <tr><td class='color_4'>[% l("City") %]</td><td>[% addr.city | html %]</td></tr>
+                        <tr><td class='color_4'>[% l("County") %]</td><td>[% addr.county| html  %]</td></tr>
+                        <tr><td class='color_4'>[% l("State") %]</td><td>[% addr.state | html %]</td></tr>
+                        <tr><td class='color_4'>[% l("Country") %]</td><td>[% addr.country | html %]</td></tr>
+                        <tr><td class='color_4'>[% l("Zip") %]</td><td>[% addr.post_code | html %]</td></tr>
                         [% IF ctx.get_org_setting(ctx.user.home_ou.id, 'opac.allow_pending_address')
                                 AND !pending_addr AND edit_addr_id != cur_id %]
                         <tr><td colspan='2'><a class="btn btn-action" href='?edit_address=[% addr.id %]'><i class="fas fa-edit"></i> [% l('Edit Address') %]</a></td></tr>
                 </tr>
             </tbody>
         </table>
-     </div></div>
+     </div>
             [% END %]
 
 </div>