diff --git a/CHANGELOG.md b/CHANGELOG.md index 438db4c27..60a0d2953 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Update from Maintenance > Update as usual - this release has three database chan - Markdown files: the menu beside Upload on a client's Files has Import Markdown Files, which makes a document from each .md file picked, named by the heading it starts with or its file name. A document's page has a Markdown button beside PDF, which downloads it as a .md file - rich text documents too. - Markdown pasted into a document's rich text editor - copied from GitHub, VS Code, Obsidian or an AI chat - goes in as formatting. Ctrl+Shift+V pastes it as it is. - A document's page is easier to read: headings in proportion to the text with room between sections, and tables, code and quotes that look part of it. Under its name are its folder, its template, Markdown when it's written in it, and its review - due, or when it's next due - whose menu has Mark Reviewed and how often. The buttons are Edit, Share and Export (PDF, Markdown or Print), with the rest in the ⋮ menu, now including Template. Beside it, Contents marks the section you're reading, and Linked, Versions and History are tabs of one card: Linked shows each kind of record with its count, opening to the list. +- Documents and articles read outside ITFlow look like a document's page: in the client portal (a document, and a Help article), on a shared link and on the public help center, headings are in proportion to the text, tables, code and quotes look part of it, and a picture shown smaller than it is opens full size when clicked. A long one - three headings or more - has its Contents beside it, in view as you scroll and marking the section being read, or above it on a phone. Picking a heading in Contents marks that one, not the one just under it - on a document's page in ITFlow too. - A document's PDF, and a Knowledge Base article's, look like your invoices and the documentation PDF: your logo and company details at the top, then its name with the client, its folder (an article's category) and when it was last updated and by whom, and its summary. Each later page has the client and the name at the top, and every page your company, Confidential (Knowledge Base for an article) and the date at the foot, with the page number. Tables have lines, code is shaded, a checklist shows its boxes, symbols such as ✓ and → show, and a document with headings has them as bookmarks beside the PDF. - Pictures in tickets are kept as files: a screenshot pasted or dropped into a ticket, a reply or a note - by your team, in the client portal or through the API - and the pictures in a client's email are kept with the ticket as files instead of inside its text. A ticket full of screenshots opens quickly, and so do the tickets list and the client portal. Pictures show where they were put and stay out of the ticket's list of files, and emails carry them as before. - Pictures already inside tickets move to files in the background - the new Ticket Pictures job in Maintenance > Cron does a batch every minute until every ticket is done, then keeps an eye on new ones. @@ -51,6 +52,7 @@ Update from Maintenance > Update as usual - this release has three database chan - New cron job ticket_pictures (cron/ticket_pictures.php, every minute): ticketPicturesSweep() goes through tickets then replies whose text has data:image/, 500 ids at a time, for up to 25 seconds a run. - A picture that can't be saved - the folder not writable, the attachment row not going in - stays as data in the text; ticketPicturesFailed() counts them, ticketPicturesSweep() carries on past a ticket or reply that fails, and the Ticket Pictures job logs a warning (Cron-Ticket-Pictures) when there were any. bulk_add_client_ticket keeps its pictures as files straight away; deleting a client deletes its tickets with ticketDeleteForGood(). - functions/document_pdf.php: DocumentPdf (TCPDF) and documentPdfRender() draw the document and Knowledge Base article PDFs (export_document in agent/post/document.php, export_kb_article in agent/post/kb.php), from documentPdfDocument() / documentPdfKbArticle(), and are sent with billingPdfSend(). documentPdfParts() splits the purified HTML at its top-level headings (inside a Markdown document's wrapper) for the bookmarks, and puts table lines, header cells and code shading in inline styles, which TCPDF reads where it ignores the style block. clientExportPdfImages() is clientExportPdfDocumentHtml()'s image step on its own, for uploads/documents or uploads/kb, and now turns a WebP picture into a PNG. +- documentReadHtml() (functions/files.php) lays out a document or article outside the agent app - client/document.php, client/kb_article.php, guest/kb.php and guest/share.php - with .itflow-prose, and the Contents beside it in an .itflow-document-read grid (css/itflow_custom.css). js/document_contents.js reads [data-document-body] as well as .itflow-document-body, runs again from window.itflowDocumentContents() (js/guest_share.js, once a shared document is in), leaves the address alone with data-document-contents-keep-address (a shared link's secret is after its #), and keeps a section picked from the list marked while the page scrolls to it. The portal footer loads it when a page sets $portal_document_contents. ## [26.12.2] diff --git a/client/document.php b/client/document.php index 4e107e3e7..6c3cdd4b6 100644 --- a/client/document.php +++ b/client/document.php @@ -1,9 +1,10 @@