From: Jane Sandberg Date: Tue, 2 Feb 2021 02:04:02 +0000 (-0800) Subject: LP1913221: Don't display blank course section number in OPAC X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a7d44eb8c4ce0e33dcd5901c30a080e3f593c928;p=Evergreen.git LP1913221: Don't display blank course section number in OPAC To test: 1) Use the Library Settings Editor to turn on the Course Materials Module. 2) In Local administration, go to the course reserves list. 3) Add several courses, some with section numbers, others without. 4) In the OPAC, use the Course Search function to search for the courses you just added. 5) Notice that the search results page has a place for section numbers, whether or not the course has one. 6) Click into some of the courses. Notice that the course page also includes a place for section numbers, whether or not the course has one. 7) Apply this patch. 8) Repeat steps 4-6. Notice that the blank "section number" areas no longer appear. Signed-off-by: Jane Sandberg Signed-off-by: Beth Willis Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/opac/course/results.tt2 b/Open-ILS/src/templates/opac/course/results.tt2 index 41966bf91d..14a350c02e 100644 --- a/Open-ILS/src/templates/opac/course/results.tt2 +++ b/Open-ILS/src/templates/opac/course/results.tt2 @@ -92,9 +92,11 @@
[% l('Course Number') %]: [% course.course_number %]
-
- [% l('Section Number') %]: [% course.section_number %] -
+ [% IF course.section_number %] +
+ [% l('Section Number') %]: [% course.section_number %] +
+ [% END %] diff --git a/Open-ILS/src/templates/opac/parts/course/body.tt2 b/Open-ILS/src/templates/opac/parts/course/body.tt2 index 2d80caff69..e80cea059a 100644 --- a/Open-ILS/src/templates/opac/parts/course/body.tt2 +++ b/Open-ILS/src/templates/opac/parts/course/body.tt2 @@ -39,11 +39,13 @@
[% l('Course Number') %]: [% ctx.course.course_number %] -
-
- [% l('Section Number') %]: - [% ctx.course.section_number %]
+ [% IF ctx.course.section_number %] +
+ [% l('Section Number') %]: + [% ctx.course.section_number %] +
+ [% END %]
[% owning_lib = ctx.get_aou(ctx.course.owning_lib);