Bugzilla – Attachment 173942 Details for
Bug 38351
Improve layout of course reserve details
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38351: Improve layout of course reserve details
Bug-38351-Improve-layout-of-course-reserve-details.patch (text/plain), 6.93 KB, created by
Owen Leonard
on 2024-11-04 18:10:16 UTC
(
hide
)
Description:
Bug 38351: Improve layout of course reserve details
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-11-04 18:10:16 UTC
Size:
6.93 KB
patch
obsolete
>From 899bab9e5438cd5aa4deb573f85c9d70a05e9d4a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 4 Nov 2024 17:41:04 +0000 >Subject: [PATCH] Bug 38351: Improve layout of course reserve details > >This patch makes some simple markup and CSS changes to the course >details page in order to improve the layout of the section: >- Add colons after labels. >- Replace fieldset.rows with div.rows (there's no form). >- Make list of instructors line up with other details. >- Do not display fields which are empty. > >ALSO: Replaced the "Reserves" heading with course name, matching >breadcrumbs and page title. > >To test, apply the patch and go to Course reserves. > >- If necessary, create a course. >- View the details of the course. >- Confirm that the list of details looks correct. > - Test with all the optional fields empty: Section, term, instructor, > staff note, public note. There should not be empty lines for these > fields in the course details. > - "Number of students" should show "0" if you left the field empty. >- Add multiple instructors to confirm that they are displayed in > alignment with other course details. >- The page heading should match the page breadcrumb. > >Sponsored-by: Athens County Public Libraries >--- > .../modules/course_reserves/course-details.tt | 74 +++++++++++++------ > 1 file changed, 52 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index 929db917c3..27082e4df3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -26,6 +26,15 @@ > padding:.5em; > position:absolute; > } >+ div.rows span.label { >+ float: left; >+ } >+ #course_instructors { >+ float: left; >+ } >+ .instructor_line { >+ padding: .3em; >+ } > </style> > [% END %] > </head> >@@ -52,7 +61,7 @@ > <div class="col-md-10 offset-md-1"> > [% INCLUDE 'messages.inc' %] > >- <h1>Reserves</h1> >+ <h1>[% tx("Course details for {course_name}", { course_name = course.course_name }) | html %][%- IF course.section -%] - [% course.section | html %][%- END -%]</h1> > > [% IF CAN_user_coursereserves_add_reserves OR CAN_user_coursereserves_manage_courses OR CAN_user_coursereserves_manage_courses %] > <div id="toolbar"> >@@ -82,30 +91,51 @@ > </div><!-- /toolbar --> > [% END %] > >- <div class="page-section clearfix"> >- <fieldset class="rows clearfix"> >+ <div class="page-section"> >+ <div class="rows"> > <ol> >- <li><span class="label">Course name</span> [% course.course_name | html %]</li> >- <li><span class="label">[% tp('Semester', 'Term') | html %]</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]</li> >- <li><span class="label">Department</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]</li> >- <li><span class="label">Course number</span> [% course.course_number | html %]</li> >- <li><span class="label">Section</span> [% course.section | html %]</li> >- <li> >- <span class="label">Instructors</span> >- <div id="instructors"> >- [% FOREACH i IN course.instructors %] >- <div class="instructor_line"> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a> >+ <li><span class="label">Course name: </span> [% course.course_name | html %]</li> >+ [% IF ( course.term ) %] >+ <li> >+ <span class="label">[% tp('Semester', 'Term') | html %]: </span> >+ [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %] >+ </li> >+ [% END %] >+ <li><span class="label">Department: </span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]</li> >+ <li><span class="label">Course number: </span> [% course.course_number | html %]</li> >+ [% IF ( course.section ) %] >+ <li> >+ <span class="label">Section: </span> >+ [% course.section | html %] >+ </li> >+ [% END %] >+ [% IF course.instructors && course.instructors.count > 0 %] >+ <li> >+ <span class="label">Instructors: </span> >+ <div id="course_instructors"> >+ <div id="instructors"> >+ [% FOREACH i IN course.instructors %] >+ <div class="instructor_line"> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a> >+ </div> >+ [% END %] > </div> >- [% END %] >- </div> >- </li> >- <li><span class="label">Staff note</span> [% course.staff_note | html %]</li> >- <li><span class="label">Public note</span> [% course.public_note | $raw %]</li> >- <li><span class="label">Student count</span> [% course.students_count | html %]</li> >- <li><span class="label">Status</span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li> >+ </div> >+ </li> >+ [% END %] >+ [% IF ( course.staff_note ) %] >+ <li> >+ <span class="label">Staff note: </span> >+ [% course.staff_note | html %] >+ </li> >+ [% END %] >+ [% IF ( course.public_note ) %] >+ <li><span class="label">Public note: </span> [% course.public_note | $raw %]</li> >+ [% END %] >+ <li><span class="label">Student count: </span> [% course.students_count || "0" | html %]</li> >+ <li><span class="label">Status: </span> [% IF course.enabled == 'yes' %]Active[% ELSE %]Inactive[% END %]</li> > </ol> >- </fieldset> >+ </div> > </div> <!-- /.page-section --> > > [% IF course_reserves %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38351
:
173942
|
176109
|
176389
|
176394
|
176395
|
176396