From 3d78a1a1c3b8b51f7aa72b67b5dce41c4bb01434 Mon Sep 17 00:00:00 2001 From: DBinaghi <39097246+DBinaghi@users.noreply.github.com> Date: Tue, 11 May 2021 12:05:23 +0200 Subject: [PATCH 1/3] Modified page to include Details and QuickFilter Please note: to display filters, I'm still using the item_search_filters function; it works, but it's not correct, as a exhibit_search_filters function should be used instead for clarity --- views/admin/exhibits/browse.php | 170 +++++++++++++++++++------------- 1 file changed, 103 insertions(+), 67 deletions(-) diff --git a/views/admin/exhibits/browse.php b/views/admin/exhibits/browse.php index f4bb89bc..9f3813d6 100644 --- a/views/admin/exhibits/browse.php +++ b/views/admin/exhibits/browse.php @@ -1,77 +1,113 @@ $title, 'bodyclass'=>'exhibits')); +echo head( + array( + 'title'=>$title, + 'bodyclass'=>'exhibits' + ) +); +echo flash(); +echo item_search_filters(); ?> - -
-

- - - - -
- - + + - -
- -
- + +
+ +
+ + - + + + + 'th scope="col"', 'list_tag' => '')); ?> + + + -
- - - 'th scope="col"', 'list_tag' => '')); ?> - - - + $exhibit): ?> + + - - - theme==null) { - $themeName = __('Current Public Theme'); - } else { - $theme = Theme::getTheme($exhibit->theme); - $themeName = !empty($theme->title) ? $theme->title : $exhibit->theme; - } - ?> - - - - - -
+ 'image')); + endif; ?> + + + public): ?> + + + + -$exhibit): ?> -
- 'image')); - endif; ?> - - - public): ?> - - - - -
- +
+ description, 40); ?> +

+ : + use_summary_page ? __('True') : __('False')); ?> +

+

+ : + TopPages); ?> +

+
+ + + theme==null) { + $themeName = __('Current Public Theme'); + } else { + $theme = Theme::getTheme($exhibit->theme); + $themeName = !empty($theme->title) ? $theme->title : $exhibit->theme; + } + ?> + + + + + + + + + + + + +
+

+ + +

+ + +
+ +

+ + ' . __('reset your search') . '?'; ?> +

+ From 2f9adb0c07a031079140f1e065de7d3265a814b1 Mon Sep 17 00:00:00 2001 From: DBinaghi <39097246+DBinaghi@users.noreply.github.com> Date: Tue, 11 May 2021 12:06:36 +0200 Subject: [PATCH 2/3] Added Details handling for browse page --- views/admin/javascripts/exhibits-browse.js | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 views/admin/javascripts/exhibits-browse.js diff --git a/views/admin/javascripts/exhibits-browse.js b/views/admin/javascripts/exhibits-browse.js new file mode 100644 index 00000000..a1506d1b --- /dev/null +++ b/views/admin/javascripts/exhibits-browse.js @@ -0,0 +1,39 @@ +if (!Omeka) { + var Omeka = {}; +} + +Omeka.ExhibitsBrowse = {}; + +(function ($) { + Omeka.ExhibitsBrowse.setupDetails = function (detailsText, showDetailsText, hideDetailsText) { + $('.details').hide(); + $('.action-links').prepend(' '); + + $('tr.exhibit').each(function() { + var exhibitDetails = $(this).find('.details'); + if ($.trim(exhibitDetails.html()) != '') { + $(this).find('.details-link').css({'color': '#4E7181', 'cursor': 'pointer'}).click(function() { + exhibitDetails.slideToggle('fast'); + }); + } + }); + + var toggleList = '' + showDetailsText + ''; + + $('.quick-filter-wrapper').before(toggleList); + + // Toggle exhibit details. + var detailsShown = false; + $('.toggle-all-details').click(function (e) { + e.preventDefault(); + if (detailsShown) { + $('.toggle-all-details').text(showDetailsText); + $('.details').slideUp('fast'); + } else { + $('.toggle-all-details').text(hideDetailsText); + $('.details').slideDown('fast'); + } + detailsShown = !detailsShown; + }); + }; +})(jQuery); From a791424aab6e9aea455cd44d573ae10f3d462e41 Mon Sep 17 00:00:00 2001 From: DBinaghi <39097246+DBinaghi@users.noreply.github.com> Date: Tue, 11 May 2021 12:07:31 +0200 Subject: [PATCH 3/3] Added quick-filter support for browse page --- views/admin/exhibits/quick-filters.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 views/admin/exhibits/quick-filters.php diff --git a/views/admin/exhibits/quick-filters.php b/views/admin/exhibits/quick-filters.php new file mode 100644 index 00000000..f36611d7 --- /dev/null +++ b/views/admin/exhibits/quick-filters.php @@ -0,0 +1,11 @@ +