3838 $(document).ready(function() { ' ;
3939 $ i = 0 ;
4040 foreach ($ this ->data ['idplist ' ] AS $ tab => $ slist ) {
41- if ($ tab == 'all ' ) {
41+ if ($ tab == 'idps_in_searchable_list ' ) {
4242 $ this ->data ['head ' ] .= "\n" . '$("#query_ ' . $ tab . '").liveUpdate("#list_ ' . $ tab . '") ' .
4343 (($ i ++ == 0 ) && (empty ($ faventry )) ? '.focus() ' : '' ) . '; ' ;
4444 }
@@ -159,10 +159,12 @@ function getTranslatedName($t, $metadata) {
159159 ' );
160160}
161161
162-
162+ $ idps_in_searchable_list_index ;
163+ $ idps_with_logos_index ;
163164foreach ( $ this ->data ['idplist ' ] AS $ tab => $ slist ) {
164165 if (!empty ($ slist )) {
165- if ($ tab == 'all ' ) {
166+ if ($ tab == 'idps_in_searchable_list ' ) {
167+ $ idps_in_searchable_list_index = array_search ($ tab , array_keys ($ this ->data ['idplist ' ]));
166168 $ top = '<div class="row ssp-content-group js-spread">
167169 <div class="col-sm-12 js-spread"> ' ;
168170 $ search_name = 'query_ ' . $ tab ;
@@ -173,7 +175,7 @@ function getTranslatedName($t, $metadata) {
173175 . $ search_name . '" id=" ' . $ search_name . '" /> '
174176 . '</form> '
175177 . '</div> ' ;
176- $ list_open = '<div class="metalist ssp-content-group__provider-list ssp-content-group__provider-list--all js-spread" id="list_ ' . $ tab . '"> ' ;
178+ $ list_open = '<div class="metalist ssp-content-group__provider-list ssp-content-group__provider-list--idps_in_searchable_list js-spread" id="list_ ' . $ tab . '"> ' ;
177179 $ list_items = '' ;
178180 $ close = '</div></div></div> ' ; // /metalist /ssp-content-group /row
179181
@@ -190,12 +192,13 @@ function getTranslatedName($t, $metadata) {
190192 echo ($ top . $ search . $ list_open . $ list_items . $ close );
191193 }
192194 else if ($ tab == "idps_with_logos " ) {
195+ $ idps_with_logos_index = array_search ($ tab , array_keys ($ this ->data ['idplist ' ]));
193196 $ top = '<div class="row ssp-content-group">
194- <div class="col-sm-12"> ' ;
195- $ or = '<div class="text-center ssp-line-or-line"><span class="ssp-line-or-line__or"> ' . $ this ->t ('{themevanilla:discopower:or} ' ) . '</span></div> ' ;
196- $ list_open = '<div class="metalist ssp-content-group__provider-list ssp-content-group__provider-list--other"> ' ;
197+ ' ;
198+ $ list_open = '<div class="col-sm-12"><div class="metalist ssp-content-group__provider-list ssp-content-group__provider-list--other"> ' ;
197199 $ list_items = '' ;
198- $ close = '</div></div></div> ' ; // /metalist /ssp-content-group /row
200+ $ close_list = '</div> ' ;
201+ $ close = '</div></div> ' ; // /metalist /ssp-content-group /row
199202 if (!empty ($ this ->data ['preferredidp ' ]) && array_key_exists ($ this ->data ['preferredidp ' ], $ slist )) {
200203 $ idpentry = $ slist [$ this ->data ['preferredidp ' ]];
201204 $ list_items .= (showEntry ($ this , $ idpentry , TRUE , TRUE ));
@@ -206,7 +209,14 @@ function getTranslatedName($t, $metadata) {
206209 $ list_items .= (showEntry ($ this , $ idpentry , FALSE , TRUE ));
207210 }
208211 }
209- echo $ top . $ or . $ list_open . $ list_items . $ close ;
212+ if ($ idps_in_searchable_list_index < $ idps_with_logos_index ) {
213+ $ or = '<div class="col-sm-12"><div class="col-sm-12 text-center ssp-line-or-line ssp-line-or-line--top"><span class="ssp-line-or-line__or"> ' . $ this ->t ('{themevanilla:discopower:or} ' ) . '</span></div> ' ;
214+ echo $ top . $ or . $ list_open . $ list_items . $ close_list . $ close ;
215+ }
216+ else {
217+ $ or = '<div class="col-sm-12 text-center ssp-line-or-line ssp-line-or-line--bottom"><span class="ssp-line-or-line__or"> ' . $ this ->t ('{themevanilla:discopower:or} ' ) . '</span></div> ' ;
218+ echo $ top . $ list_open . $ list_items . $ close_list . $ or . $ close ;
219+ }
210220 }
211221 }
212222}
0 commit comments