From a1cdd2dce04a49da742405ab11a8f3a7477c79ef Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 24 May 2017 21:22:11 -0400 Subject: [PATCH] LP#1681943: show all list fields in mobile view In mobile view, "rotate" the temporary and permanent list tables 90 degrees and put the column headings on the left/right side. data-label attributes are used to stash copies of the column labels; the end result is similar to how the current circulations table is displayed on narrow screens. Signed-off-by: Galen Charlton Signed-off-by: Terran McCanna Signed-off-by: Galen Charlton --- Open-ILS/src/templates/opac/css/style.css.tt2 | 23 +++++++++++++++++++++-- Open-ILS/src/templates/opac/myopac/lists.tt2 | 14 +++++++------- Open-ILS/src/templates/opac/parts/anon_list.tt2 | 4 ++-- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 244853cde1..cd9fef5915 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -2168,7 +2168,8 @@ textarea { font-family: sans-serif; } table.bookbag-specific { border-right: 1px solid [% css_colors.accent_dark %]; border-bottom: 1px solid [% css_colors.accent_medium %]; - margin-bottom: 2px; + margin-bottom: 2ex; + width: 100%; } .bookbag-share { [% IF rtl == 't' -%] @@ -2806,12 +2807,30 @@ div.result_table_utils { .bookbag-specific div.sort select { width:180px; } + .bookbag-specific tr { + display: block; + border-bottom: 1px solid [% css_colors.border_standard %]; + } .bookbag-specific td.list_checkbox { padding-left: 0px !important; } .bookbag-specific td.list_entry { + display: inline-block; min-width: 5em; - padding-left: 5px !important; + [% IF rtl == 't' -%] + padding-right: 40% !important; + [% ELSE -%] + padding-left: 40% !important; + [% END -%] + } + .bookbag-specific td.list_entry:before { + content: attr(data-label); + position: absolute; + [% IF rtl == 't' -%] + right: 10px; + [% ELSE -%] + left: 10px; + [% END -%] } .bbag-navigate-list { display: none; diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2 index 308971de0a..edc94e04f0 100644 --- a/Open-ILS/src/templates/opac/myopac/lists.tt2 +++ b/Open-ILS/src/templates/opac/myopac/lists.tt2 @@ -354,13 +354,13 @@ [% attrs.title | html %] - - + [% attrs.author | html %] - + [% copy = attrs.holdings.0; IF copy; @@ -377,21 +377,21 @@ END; %] - + [% attrs.pubdate | html %] - + [% attrs.format_label | html %] [% IF CGI.param("edit_notes") == bbag.id %] - + [% FOR note IN item.notes %] [% END %] [% ELSE %] - + [% FOR note IN item.notes %]
[% note.note | html %]
[% END %] diff --git a/Open-ILS/src/templates/opac/parts/anon_list.tt2 b/Open-ILS/src/templates/opac/parts/anon_list.tt2 index 28eefe636f..4ecf9e6e5b 100644 --- a/Open-ILS/src/templates/opac/parts/anon_list.tt2 +++ b/Open-ILS/src/templates/opac/parts/anon_list.tt2 @@ -30,7 +30,7 @@
- +
-
@@ -61,7 +61,7 @@ ['page', 'id', 'edit_notes'] ) -%]">[% attrs.author | html %] + [% copy = attrs.holdings.0; IF copy; -- 2.11.0