Bugzilla – Attachment 82360 Details for
Bug 21838
Wrong alignment of instructors in course reserves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21838: Wrong alignment of instructors in course reserves
Bug-21838-Wrong-alignment-of-instructors-in-course.patch (text/plain), 6.43 KB, created by
Owen Leonard
on 2018-11-15 13:44:34 UTC
(
hide
)
Description:
Bug 21838: Wrong alignment of instructors in course reserves
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-11-15 13:44:34 UTC
Size:
6.43 KB
patch
obsolete
>From 70173f8b1f5a776b0d385fa368957138d04e2e5c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 15 Nov 2018 13:39:33 +0000 >Subject: [PATCH] Bug 21838: Wrong alignment of instructors in course reserves > >This patch adds CSS to course reserve pages so that multiple instructors >on a course are displayed well. > >To test, apply the patch and: > > - Add or edit a course. > - Test adding and removing instructors, saving, and adding and removing > again. > - View a course with multiple instructors and confirm that they are > displayed well. >--- > .../en/modules/course_reserves/course-details.tt | 19 ++++++++++++- > .../prog/en/modules/course_reserves/course.tt | 32 +++++++++++++++------- > 2 files changed, 40 insertions(+), 11 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 c34d14e..931a355 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 >@@ -10,6 +10,14 @@ > [% INCLUDE 'doc-head-close.inc' %] > > [% Asset.css("css/datatables.css") | $raw %] >+<style> >+ #instructors { >+ float: left; >+ } >+ .instructor_line { >+ padding: 0 .1em; >+ } >+</style> > </head> > > <body id="courses_course_details" class="course"> >@@ -45,7 +53,16 @@ > <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> [% FOREACH i IN course.instructors %]<div class="instructor"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% i.borrowernumber | uri %]">[% i.firstname | html %] [% i.surname | html %]</a></div>[% END %]</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> >+ </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 | html %]</li> > <li><span class="label">Student count</span> [% course.students_count | html %]</li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >index 91db22b..a47195d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt >@@ -2,6 +2,14 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Course reserves › [% IF course_name %] Edit [% course_name | html %] [% ELSE %] New course [% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >+<style> >+ #course_instructors { >+ float: left; >+ } >+ .instructor_line { >+ padding: .3em; >+ } >+</style> > </head> > > <body id="courses_course" class="course"> >@@ -78,16 +86,20 @@ > <li> > <span class="label">Instructors:</span> > >- <fieldset id="course_instructors"> >- <div id="instructors">[% FOREACH i IN instructors %]<div id="borrower_[% i.borrowernumber | html %]">[% i.surname | html %], [% i.firstname | html %] ( <a href="#" class="removeInstructor"> Remove </a> ) >- <input type='hidden' name='instructors' value='[% i.borrowernumber | html %]' /></div>[% END %]</div> >- </fieldset> >- >- <fieldset> >- <label for="find_instructor">Instructor search:</label> >- <input autocomplete="off" id="find_instructor" type="text" style="width:150px" class="noEnterSubmit"/> >+ <div id="course_instructors"> >+ <div id="instructors"> >+ [% FOREACH i IN instructors %] >+ <div class="instructor_line" id="borrower_[% i.borrowernumber | html %]">[% i.surname | html %], [% i.firstname | html %] ( <a href="#" class="removeInstructor"><i class="fa fa-trash"></i> Remove </a> ) >+ <input type='hidden' name='instructors' value='[% i.borrowernumber | html %]' /> >+ </div> >+ [% END %] >+ </div> >+ <p> >+ <label for="find_instructor">Instructor search:</label> >+ <input autocomplete="off" id="find_instructor" type="text" style="width:150px" class="noEnterSubmit"/> >+ </p> > <div id="find_instructor_container"></div> >- </fieldset> >+ </div> > <li> > <label for="staff_note">Staff note:</label> > <textarea name="staff_note" id="staff_note">[% staff_note | html %]</textarea> >@@ -174,7 +186,7 @@ > }); > > function AddInstructor( name, borrowernumber ) { >- div = "<div id='borrower_" + borrowernumber + "'>" + name + " ( <a href='#' class='removeInstructor'> " + _("Remove")+ " </a> ) <input type='hidden' name='instructors' value='" + borrowernumber + "' /></div>"; >+ div = "<div class='instructor_line' id='borrower_" + borrowernumber + "'>" + name + " ( <a href='#' class='removeInstructor'><i class='fa fa-trash'></i> " + _("Remove")+ " </a> ) <input type='hidden' name='instructors' value='" + borrowernumber + "' /></div>"; > $('#instructors').append( div ); > > $('#find_instructor').val('').focus(); >-- >2.1.4
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 21838
:
82348
|
82360
|
82376
|
82378
|
82380