From 8e3750f54877b253fea69e771e97c3d8e44f9fa8 Mon Sep 17 00:00:00 2001 From: Nawras Othman Date: Tue, 7 Feb 2017 06:39:46 -0500 Subject: [PATCH] LP#1661661: Support for right-to-left (RTL) languages File changes added by Nawras Othman for RTL languages (such as Arabic). First pass includes moving some remaining inline CSS to the stylesheet file, Also includes a hard-coded check for the "ar-AR" locale (current Arabic). Signed-off-by: Nawras Othman Signed-off-by: Ben Shum Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/opac/css/style-rtl.css.tt2 | 144 +++++++++++++++++++++ Open-ILS/src/templates/opac/css/style.css.tt2 | 25 ++++ .../templates/opac/parts/advanced/global_row.tt2 | 2 +- .../src/templates/opac/parts/advanced/search.tt2 | 2 +- Open-ILS/src/templates/opac/parts/anon_list.tt2 | 10 +- Open-ILS/src/templates/opac/parts/base.tt2 | 5 + Open-ILS/src/templates/opac/parts/login/form.tt2 | 6 +- .../opac/parts/metarecord_hold_filters.tt2 | 19 +-- .../src/templates/opac/parts/myopac/main_base.tt2 | 12 +- .../src/templates/opac/parts/myopac/prefs_base.tt2 | 2 +- Open-ILS/src/templates/opac/parts/place_hold.tt2 | 4 +- .../src/templates/opac/parts/result/paginate.tt2 | 2 +- .../web/css/skin/default/opac/semiauto-rtl.css | 40 ++++++ 13 files changed, 235 insertions(+), 38 deletions(-) create mode 100644 Open-ILS/src/templates/opac/css/style-rtl.css.tt2 create mode 100644 Open-ILS/web/css/skin/default/opac/semiauto-rtl.css diff --git a/Open-ILS/src/templates/opac/css/style-rtl.css.tt2 b/Open-ILS/src/templates/opac/css/style-rtl.css.tt2 new file mode 100644 index 0000000000..cc140542d9 --- /dev/null +++ b/Open-ILS/src/templates/opac/css/style-rtl.css.tt2 @@ -0,0 +1,144 @@ +body{direction:rtl;} +.searchbar{margin-right:1em;} +div.select-box-wrapper{padding-right:3px;text-align:right;} +#dash_wrapper{margin-right:0.5em;} +#logout_link{right:1px;} +#dash_wrapper #unread_message_count_floater{margin-right:-1.5em;} +#header-links a{float:right;margin-left:22px;} +#gold-links{margin-right:1em;padding-right:0px;} +#gold-links-home{padding-right:0px;} +#util-bar{margin-right:1em;padding-right:0px;} +#search-wrapper #breadcrumb{float:right;} +#search-wrapper #search-within{float:left;right:-173px;} +#search-wrapper #search-box{margin-right:1em;padding-right:0px;} +#adv_search_tabs, #acct_tabs, #acct_fines_tabs, #acct_checked_tabs, #acct_holds_tabs, #acct_prefs_tabs, #results_header_inner{margin-right:2px;} +#adv_search_tabs a, #acct_tabs a, #acct_fines_tabs a, #acct_checked_tabs a, #acct_holds_tabs a, #acct_prefs_tabs a{float:right;margin:10px 0px 0px 7px;-moz-border-radius:10px 10px 0px 0px;border-radius:10px 10px 0px 0px;} +.adv_filter_block{float:right;} +.adv_filter_block_item{float:right;} +#adv_special_block{float:right;} +#adv_search_submit{margin-right:10px;} +.checkbox_col{padding-right:10px !important;} +.rdetail_header{padding:5px 0px 6px 7px;margin-right:1em;} +.rdetail_result_count{padding-right:1em;} +.rdetail_result_nav{padding-right:1em;} +#rdetail_image_cell{padding-left:10px;} +div.rdetail_uris ul li{right:1em;} +div#rdetail_actions_div{float:left;} +span#rdetail_copy_counts{border-left:thin;margin-left:1em;padding-left:1em;} +span#rdetail_hold_counts p{padding-right:2em;} +#rdetail_image_div{float:right;margin-left:1em;} +.rdetail_aux_utils{border-right:1px dotted #ccc;padding-right:17px;padding-left:70px;} +div.format_icon{float:left;margin-left:17px;} +.result_util{padding-right:1em;} +#rdetails_status td{padding:7px 13px 3px 0px;} +#rdetails_status thead th{padding:13px 13px 13px 0px;text-align:right;} +#rdetails_status tbody td{padding-right:13px;text-align:right;} +.rdetail_extras_hr{margin-right:1px;margin-left:1px;} +##rdetail_extras_expand, #rdetail_extras_collapse, #rdetail_locs_collapse{margin-right:13px;} +#rdetail_locs_expand, #rdetail_locs_collapse{margin-right:13px;} +#main-content-home{padding-right:17px;margin-right:1em;} +#main-content{padding-right:0px;} +#main-content-after-bar{margin-right:1em;padding-right:4px;} +#results-side-bar{float:right;margin-left:5px;} +#main-content .left_brain{padding-right:28px;} +#main-content .left_brain .input_bg{padding:10px 13px 0px 10px;} +.login-help-box{float:right;margin-right:2em;} +.results_header_lbl{float:right;} +.results_header_sel{float:right;} +.results_header_nav1{padding:5px 0px 6px 7px;} +.result_metadata{float:right;padding-left:2em;} +tr.result_table_row > td.result_table_pic_header{padding-right:1em;} +.result_number{padding-right:1em;} +div.result_table_utils_cont{text-align:right;float:right;} +.zero_search_hits_main{float:right;} +.zero_search_hits_saved{float:right;margin-left:2em;} +#lowhits_help{float:left;} +.results_info_table td{padding-left:10px;} +#myopac_prefs_div .data_grid td{padding:6px 17px 7px 0px;} +.header_middle{padding:0px 0px 0px 7px;} +#acct_sum_block{float:right;clear:right;} +#myopac_sum_fines{float:left;padding:15px 23px 0px 0px;} +#myopac_sum_fines_placehold{float:left;} +.acct_holds_temp td{text-align:right;} +#acct_checked_tabs .align, #acct_holds_tabs .align, #acct_prefs_tabs .align{float:right;} +#acct_checked_main_header th, #acct_holds_main_header th, #acct_checked_hist_header th, acct_holds_hist_header th, #acct_list_header th, #acct_list_header_anon th, #temp_list_holds th, #acct_messages_main_header th{text-align:right;} +.myopac_payments_table th{text-align:right;} +div#facet_sidebar{float:right;margin-left:1em;} +.facet_box_temp .header .title{float:right;padding-right:12px;} +.facet_box_temp .header a.button{float:left;padding-left:6px;} +.facet_template .count{text-align:left;} +#footer{margin-right:1em;} +#acct_prefs_header{float:right;} +.search_page_nav_link{padding-right:1em;} +.failure-text{margin-right:4em;} +#adv_search_refine{padding-right:5em;} +#account-update-email table td{text-align:right;} +#hold_editor_table th{text-align:left;padding-left:1em;} +.fmt-note{padding-right:1em !important;} +.hold-editor-controls a{padding-right:2em;} +.text-right{text-align:left;} +.text-right-top{text-align:left;} +.expert-search tbody tr th{text-align:left;padding-right:2em;} +.results-paginator-list{padding-right:1em;} +.mr_holds_no_formats{margin-right:25px;} +.results_header_btns, .results_header_sel{float:right;} +.rdetail-mfhd-type{padding-right:1em;} +.rdetail_content{margin-right:1.5em;padding-right:1.5em;} +.rdetail_openurl_entry{margin-right:1em;padding-right:1em;} +.bookbag-controls-holder .most{padding-right:0;margin-left:5em;} +.bookbag-specific{margin-right:1em;} +.bookbag-specific div.sort{float:right;text-align:right;} +.bookbag-specific div.meta{float:left;text-align:left;} +table.bookbag-specific{border-left:1px solid #666;} +.bookbag-share{float:right;} +.bookbag-controls{float:right;padding:5px 10px 0px 0px;} +.bookbag-specific td.list_checkbox{padding-right:10px !important;} +.bookbag-specific td.list_entry{padding-right:5px !important;} +.float-left{float:right;} +.float-right{float:left;} +.saved-searches-header .button{float:left;} +.saved-searches-header .text{float:right;padding-left:1em;} +.saved-searches{padding-left:1em;} +#staff-saved-search{border-left:1px solid #333;} +.result_item_circulated span{right:3px;} +.oils_AS_match_term{text-align:right;} +.oils_AS_match_field{text-align:left;} +.rdetail-holding-group{margin-right:1.5em;} +.rdetail-holding-group span{margin-right:1.5em;} +.rdetail-holding-group .paging{margin-right:1.5em;} +.ac_tab{float:right;padding-left:10px;} +#locale_picker_form{float:left;border-left:thin #69A088 solid;} +.browse-result-sources, .browse-result-authority-bib-links{margin-right:1em;} +.browse-result-authority-field-name{margin-left:1em;} +#main-content-register{margin-right:40px;} +#main-content-register td{text-align:right;} +#main-content-register td:not(:first-child){padding-right:20px;} +.patron-reg-invalid{padding-left:10px;} +.td-left{text-align:right;} +#adv_global_addrow.td-search-left{text-align:right;} +@media only screen and (max-width:600px) { + #acct_tabs a, #acct_fines_tabs a{-moz-border-radius:6px 6px 0px 0px;border-radius:6px 6px 0px 0px;margin:0px 0px 0px 5px;} + #dash_identity a{float:right;} + #holds_box form blockquote{margin-right:10px;margin-left:2px;} + .result_table_pic_header{padding-right:0px !important;padding-left:5px;} + .facet_template .count{padding-right:1em;} + #format_actions{float:right;} + .search_catalog_lbl{margin-right:0;} + #adv_search_tabs a{-moz-border-radius:0px 10px 0px 0px;border-radius:7px 7px 0px 0px;} + thead tr{right:-9999px;} + table#acct_checked_main_header td, table#acct_holds_main_header td, table#acct_checked_hist_header td, #acct_holds_hist_header td{padding-right:40%;} + table#acct_checked_main_header td:before, table#acct_holds_main_header td:before, table#acct_checked_hist_header td:before, #acct_holds_hist_header td_before{right:2px;padding-left:10px;} +} + +/*Inline rules from templates*/ + +.td-left{text-align:right; width:100%;} +.td-search-left{text-align:right;} +.div-left{float: right;} +.td-right{text-align:left;} +.login-form-left{float:right;} +.hold-div{padding-right: 10px;} +.padding-left-6{padding-right: 6px;} +.padding-left-10{padding-right:10px;} +.padding-left-5{padding-right: 5px;} +.metarecord_filter_container{float:right;margin-left:10px;} diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index e9fccea993..864304bed7 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -2215,3 +2215,28 @@ label[for*=expert_] color: [% css_colors.text_badnews %]; padding: 10px; } + +/*Inline rules from other templates files*/ + +.td-left{text-align:left; width:100%;} +.td-search-left{text-align:left;} +#myopac_summary_div{padding:0px;} +.div-left{float: left;} +.td-right{text-align:right;} +.login-form-left{float: left; padding-bottom: 10px; margin-right: 40px;} +.hold-div{padding-left: 10px; padding-bottom: 15px;} +.hold-span{font-weight: bold;} +.padding-left-6{padding-left: 6px;} +.padding-left-10{padding-left:10px;} +.padding-left-5{padding-left: 5px;} + +/* Rules from metarecord_hold_filters.tt2 */ + +.metarecord_filters{ + padding: 5px; + margin-top: 5px; + border-bottom: 1px solid #333; + border-top: 1px solid #333; } +.metarecord_filter_container{float : left;margin-right: 10px;} +.metarecord_filter_container select{padding: 2px;width: 13em; /* consistent w/ adv search selectors */} +.metarecord_filter_header{padding-bottom: 5px;} diff --git a/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 index 37430472c5..5310bb6cdf 100644 --- a/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 +++ b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 @@ -24,7 +24,7 @@ - + + - [% attrs.title | html %] - [% attrs.title | html %] + [% attrs.author | html %] - + [% copy = attrs.holdings.0; IF copy; diff --git a/Open-ILS/src/templates/opac/parts/base.tt2 b/Open-ILS/src/templates/opac/parts/base.tt2 index 1a3a979d41..2f25e51a6b 100644 --- a/Open-ILS/src/templates/opac/parts/base.tt2 +++ b/Open-ILS/src/templates/opac/parts/base.tt2 @@ -11,6 +11,11 @@ + [%- IF ctx.locale == "ar_ar" %] + + [% END %] -