From 162195607ab16d9657960c376e7755c017184b75 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 15 Mar 2021 17:37:19 -0400 Subject: [PATCH] LP#1424815: adjust release notes Signed-off-by: Galen Charlton --- .../RELEASE_NOTES_NEXT/OPAC/read-more-feature.adoc | 73 +++++++++++++--------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/read-more-feature.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/read-more-feature.adoc index 9acb82fade..4e52751514 100644 --- a/docs/RELEASE_NOTES_NEXT/OPAC/read-more-feature.adoc +++ b/docs/RELEASE_NOTES_NEXT/OPAC/read-more-feature.adoc @@ -1,31 +1,42 @@ -Configurable Read More Accordion for OPAC Search and Record View -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Read More Button -++++++++++++++++ -OPAC record Fields now truncate themselves based on a configurable amount of characters. -The full field may be displayed upon hitting a (Read More) link, which will then toggle -into a (Read Less) link to re-truncate the field. - -Configuration -+++++++++++++ -Open-ILS/src/templates/opac/parts/config.tt2 Contains two new configuration variables: -truncate_contents(default: 1) and contents_truncate_length(default: 50). Setting -truncate_contents to 0 will disable the read more functionality. -The variable contents_truncate_length corresponds to the amount of characters to display -before truncating the text. If contents_truncate_length is removed, it will default to 100. -Additional configuration for note fields can be made in -Open-ILS/src/templates/opac/parts/record/contents.tt2, allowing a trunc_length variable for -each individual type of note, which will override contents_truncate_length for that specific -type of note. - - -Adding Read More Functionality to further fields -++++++++++++++++++++++++++++++++++++++++++++++++ -To add Read More functionality to any additional fields, you may use the macro -accordion(), defined in misc_util.tt2. It can take three variables: str, -trunc_length, and element. str corresponds to the string you want to apply it to, -trunc_length(optional) will override contents_truncate_length if supplied, and -element(optional) provides an alternative HTML element to look at for the truncation -process(useful in situations such as the Authors and Cast fields, where each field is -processed individually, but needs to be treated as a single field). \ No newline at end of file +Configurable Read More Accordion for OPAC Search and Record View (TPAC) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Read More Button +++++++++++++++++ +Public catalog record fields (in the TPAC skin only) now truncate +themselves based on a configurable amount of characters. The full +field may be displayed upon hitting a (Read More) link, which will +then toggle into a (Read Less) link to re-truncate the field. + +Configuration ++++++++++++++ +`Open-ILS/src/templates/opac/parts/config.tt2` contains two new +configuration variables: + + +* `truncate_contents` (default: 1) +* `contents_truncate_length` (default: 50). + +Setting `truncate_contents` to 0 will disable the read more +functionality. The variable `contents_truncate_length` corresponds +to the amount of characters to display before truncating the text. +If `contents_truncate_length` is removed, it will default to 100. + +Additional configuration for note fields can be made in +`Open-ILS/src/templates/opac/parts/record/contents.tt2`, allowing a +`trunc_length` variable for each individual type of note, which will +override `contents_truncate_length` for that specific +type of note. + + +Adding Read More Functionality to further fields +++++++++++++++++++++++++++++++++++++++++++++++++ +To add Read More functionality to any additional fields, you may use +the macro `accordion()`, defined in `misc_util.tt2`. It can take three +variables: `str`, `trunc_length`, and `element`. `str` corresponds to +the string you want to apply it to, `trunc_length` (optional) will +override `contents_truncate_length` if supplied, and `element` +(optional) provides an alternative HTML element to look at for the +truncation process (useful in situations such as the Authors and Cast +fields, where each field is processed individually, but needs to be +treated as a single field). -- 2.11.0