¡¡¡ More detailed explanations are given in the wiki ¡¡¡
SQLPage templates are handlebars files that are used to render the results of SQL queries.
SQLPage comes with a set of default components that you can use without having to write any code. These are documented on https://sql.datapage.app/components.sql
You can write your own component templates
and place them in the sqlpage/templates directory.
To override a default component, create a file with the same name AS the default component.
If you want to start FROM an existing component, you can copy it FROM the sqlpage/templates directory
in the SQLPage source code.
The following custom components had been developed as part of the COOP template to add features that are not available in the standard SQLPage components.
Disclaimer: I am a self-taught developer. I copy and paste snippets of code found in forums or tutorials or created using AI engines. I don't even understand always what I am pasting ! A professional developer will surely be able to produce a faster and cleaner code. Your comments and suggestions are therefore welcome!
COOP is mainly a project management template. In a project, you have to display timelines showing the starting and ending dates of the work packages. You have often to update those dates. In sophisticated project management software programs, you can change the date by moving manually the limit of the rangeBar or by opening a popup form on a click on the rangeBar.
chart1 is a variant of the standard chart component, where he adds the possibility to open a sql file on a click on the rangeBar. You can choose to open, in a new tab, a facts sheet or a form to modify the starting and ending dates.
chart2 is a variant of chart1. It was develop for a timeline where the rangeBar were very short. So it was tricky to click on the rangeBar. With chart2, it is possible to click on the labels of the y-axis.
The modal component was introduced in SQLPage V37.0 and the _sql_actions in SQLPage V39.0. But in the standard version of the modal and table components, it is not possible to open a popup window on dynmic url generated by a link like /e_project_forum/project_forum_doc_attach_table_4.sql?project_forum_message_id={id}.
To open open a popup window on dynmic url generated by a link, you have to customize two components : table and modal.