diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index b9545e1106..4375cfdb64 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2618,4 +2618,8 @@ $star-selected: #EDB867; } } +.branchaddress { + margin-bottom: 1rem; +} + @import "responsive"; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc new file mode 100644 index 0000000000..4b0e39e638 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc @@ -0,0 +1,114 @@ +[%~ USE Koha ~%] +[%~ USE raw ~%] +[%~ BLOCK 'display-library-address' ~%] + [%~ SET line_break = "
" ~%] + [%~ IF no_line_break %][% SET line_break = " " %][% END ~%] + [%~ IF Koha.Preference( 'AddressFormat' ) ~%] + [%~ PROCESS "display-library-address-${ Koha.Preference( 'AddressFormat' ) }" ~%] + [%~ ELSE ~%] + [%~ PROCESS 'display-library-address-us' ~%] + [%~ END ~%] +[%~ END ~%] + +[%~ BLOCK 'display-library-address-us' ~%] + [%~ IF ( library.branchaddress1 or library.branchaddress2 ) ~%] + + [%~ IF ( library.branchaddress1 ) ~%] +
+ [% library.branchaddress1 | html %] +
+ [%~ END ~%] + [%~ IF ( library.branchaddress2 ) ~%] +
+ [%~ library.branchaddress2 |html ~%] +
+ [%~ END ~%] + [%~ IF ( library.branchaddress3 ) ~%] + + [%~ library.branchaddress3 | html ~%] + + [% line_break | $raw %] + [%~ END ~%] +
+ [%~ END ~%] + [%~ IF ( library.branchcity ) ~%] +
+ + [%~ library.branchcity |html ~%] + + [%~ IF ( library.branchstate ) %] + + , [% library.branchstate |html ~%] + + [%~ END ~%] + [%~ IF ( library.branchzip ) %] + + [%~ " " _ library.branchzip |html ~%] + + [%~ END ~%] + [%~ IF ( library.branchcountry ) %] +
+ [% library.branchcountry |html ~%] +
+ [%~ END ~%] +
+ [%~ END ~%] +[%~ END ~%] + +[%~ BLOCK 'display-library-address-de' ~%] + [%~ IF ( library.branchaddress1 or library.branchaddress2 ) ~%] + + [%~ IF ( library.branchaddress1 ) ~%] +
+ [%~ library.branchaddress1 | html ~%] +
+ [%~ END ~%] + [%~ IF ( library.branchaddress2 ) ~%] +
+ [%~ library.branchaddress2 | html ~%] +
+ [%~ END ~%] + [%~ IF ( library.branchaddress3 ) ~%] + + [%~ library.branchaddress3 | html ~%] + + [% line_break | $raw %] + [%~ END ~%] +
+ [%~ END ~%] + [%~ IF ( library.branchcity ) ~%] +
+ [%~ IF ( library.branchzip ) ~%][%~ library.branchzip | html %] [% END ~%][%~ library.branchcity | html ~%][%~ IF ( library.branchstate ) ~%][% line_break | $raw %][%~ library.branchstate | html ~%][%~ END ~%] + [%~ IF ( library.branchcountry ) ~%][% line_break | $raw %][%~ library.branchcountry | html ~%][%~ END ~%] +
+ [%~ END ~%] +[%~ END ~%] + +[%~ BLOCK 'display-library-address-fr' ~%] + [%~ IF ( library.branchaddress1 or library.branchaddress2 ) ~%] + [%~ IF ( library.branchaddress1 ) ~%] + + [%~ library.branchaddress1 | html ~%] + + [% line_break | $raw %] + [%~ END ~%] + [%~ IF ( library.branchaddress2 ) ~%] + + [%~ library.branchaddress2 | html ~%] + + [% line_break | $raw %] + [%~ END ~%] + [%~ IF ( library.branchaddress3 ) ~%] + + [%~ library.branchaddress3 | html ~%] + + [% line_break | $raw %] + [%~ END ~%] + [%~ END ~%] + [%~ IF ( library.branchcity ) ~%] + + [%~ IF ( library.branchzip ) ~%][%~ library.branchzip | html %] [% END ~%][%~ library.branchcity | html ~%][%~ IF ( library.branchstate ) ~%][% line_break | $raw %][%~ library.branchstate | html ~%][%~ END ~%] + [%~ IF ( library.branchcountry ) ~%][% line_break | $raw %][%~ library.branchcountry | html ~%][%~ END ~%] + + [%~ END ~%] +[%~ END ~%] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt index bd9a7744aa..58264133a6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE Asset %] [% USE Koha %] +[% PROCESS 'display-library-address.inc' %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %] @@ -26,40 +27,18 @@ [% END %] [% BLOCK library_info %] - <div property="address" typeof="PostalAddress"> - <span property="streetAddress"> - [% IF ( library.branchaddress1 ) %] - [% library.branchaddress1 | html %] - [% END %] - [% IF ( library.branchaddress2 ) %] - <br />[% library.branchaddress2 | html %] - [% END %] - [% IF ( library.branchaddress3 ) %] - <br />[% library.branchaddress3 | html %] - [% END %] - </span><br> - [% IF ( library.branchcity ) %] - <span property="addressLocality">[% library.branchcity | html %]</span> - [% END %] - [% IF ( library.branchstate ) %] - <span property="addressRegion">[% library.branchstate | html %]</span> - [% END %] - [% IF ( library.branchzip ) %] - <span property="postalCode">[% library.branchzip | html %]</span> - [% END %] - [% IF ( library.branchcountry ) %] - <br /><span property="addressCountry">[% library.branchcountry | html %]</span> - [% END %] - [% IF ( library.branchphone ) %] - <p>Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p> - [% END %] - [% IF ( library.branchfax ) %] - <p>Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p> - [% END %] - [% IF ( library.branchurl ) %] - <p><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p> - [% END %] + <div class="branchaddress" property="address" typeof="PostalAddress"> + [% PROCESS 'display-library-address' %] </div> <!-- /div property=address --> + [% IF ( library.branchphone ) %] + <p>Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p> + [% END %] + [% IF ( library.branchfax ) %] + <p>Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p> + [% END %] + [% IF ( library.branchurl ) %] + <p><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p> + [% END %] [% END %] <div class="main">