-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OO: Library Lending #1031
OO: Library Lending #1031
Conversation
allow the query to run.
I could maybe look at re-adding the Number column if it's helpful but I'd need to do so in SQL since I don't think there's a way to do that on the current DataTable class. |
Hi Jim, thanks for this : ) The ID feild is definitely useful, especially as for many cases it is not numeric, but rather alphanumeric (e.g. my laptop is MBP00319). For the row colouring, check out lines 84-87 of the file linked below, which use an anonymous function and a CSS class (error) to colour a row red: I wonder if the warning class (orange) is better for loans. Perhaps overdue loans could be red? Cheers, Ross |
Hi Ross,
No worries!
The ID field is still there, I'm referring to a numerical field which
counted 1-10 as it went down the current 10 items on that paginated table.
Seemed pretty redundant unless there were perhaps multiple versions of the
same item but I'm such cases I'd expect the ID would be more beneficial. I
realise those terms are quite synonymous so I'd say check out the
screenshot below. The upper table is the DataTable object.
Your colouring makes sense too. From memory the only thing coloured is on
loan so I think it would be helpful to have some other colours. I'll look
into that.
…On Fri, May 1, 2020, 2:52 AM Ross Parker ***@***.***> wrote:
Hi Jim, thanks for this : ) The ID feild is definitely useful, especially
as for many cases it is not numeric, but rather alphanumeric (e.g. my
laptop is MBP00319).
For the row colouring, check out lines 84-87 of the file linked below,
which use an anonymous function and a CSS class (error) to colour a row red:
https://github.com/GibbonEdu/module-masteryTranscript/blob/master/Mastery%20Transcript/credits_manage.php
I wonder if the warning class (orange) is better for loans. Perhaps
overdue loans could be red?
Cheers,
Ross
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1031 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC6XUFENZEUJLCDVKAPKSOTRPITNFANCNFSM4MWYW6BA>
.
|
Added new colouring now so when the item is pastDue, it will show using the "error" class. When it is on loan, as suggested, it will show using the "warning" class. All files committed here have been run through codesniffer to use PSR2 formatting. |
Hi Jim, thanks for clarifying, and you are right, the number/count/# field is superfluous once the table is refactored, as the refactoring shows the total record count at the top, and I believe the count was there for similar ends. |
I'll leave this with @SKuipers to review and merge in due course. Thanks for continuing to plug away at this : ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another HTML table bites the dust! Thanks Jim 😄 I'm going to merge this in and test it.
As a note (for future refactorings) we tend to use full table names rather than shortening them to two and three letter aliases. It can certainly make the query look longer, but I think it does improve the readability by reducing any ambiguity. There are a lot of tables, for example gp could easily refer to gibbonPerson, Payment, Permission, etc.
Adding OOified DataTable to the Library Lending page. There are two functional differences here:
A screenshot detailing the difference is below. The new table is above the old one here.