-
Notifications
You must be signed in to change notification settings - Fork 314
New Export plugin: #582
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
New Export plugin: #582
Conversation
|
Hello, A little bit more context to this PR: it is related to this one: #467 With this PR, we can change the "CLASS" attribute in ical events, to set it to "PUBLIC" or "PRIVATE", using a custom plugin. |
|
Oops, there are some missing files, because of the gitignore. I will fix this PR later today. |
Fixed! Ready for comments, or for merge :) |
be26c48 to
4793e38
Compare
|
Thanks @JohnXLivingston Can you fix the issues that the CI is flagging. Has to do with the commit messages. Please see: https://github.com/LibreBooking/app/blob/develop/CONTRIBUTING.md#commit-message-guidelines for more information. Please let me know if you have any questions. |
4793e38 to
ec83f2c
Compare
Done! |
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.
Pull Request Overview
Introduce a new Export plugin to customize iCalendar exports with per-event classification and extra lines.
- Define
IExportFactoryand defaultExportFactory, plus a sample plugin. - Update
PluginManager, reservation view, and template to apply export plugin outputs. - Extend configuration, presenter, page, and tests for export plugin selection.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tpl/Export/ical.tpl | Use {$reservation->Classification} and inject optional extra lines |
| lib/Application/Export/ExportFactory.php | Add IExportFactory interface and default ExportFactory |
| lib/Application/Schedule/iCalendarReservationView.php | Load export plugin, set Classification and ExtraIcalLines |
| lib/Common/PluginManager.php | Add LoadExport() method to load export plugins |
| lib/Config/ConfigKeys.php | Introduce PLUGIN_EXPORT constant |
| lib/Application/Export/namespace.php | Require the export factory namespace file |
| plugins/Export/ExportExample/ExportExample.php | Provide a basic export plugin example |
| config/config.dist.php & config/config.devel.php | Add Export entry under plugin settings |
| Presenters/Admin/ManageConfigurationPresenter.php | Hook SetExportPluginValues($plugins['Export']) |
| Pages/Admin/ManageConfigurationPage.php | Declare and implement SetExportPluginValues |
| tests/Presenters/Admin/ManageConfigurationPresenterTest.php | Add stub for SetExportPluginValues |
Comments suppressed due to low confidence (3)
lib/Application/Export/ExportFactory.php:13
- Correct the spelling of "Optionnaly" to "Optionally" in the doc comment.
* Optionnaly returns some lines to add to the iCalendar event.
lib/Application/Export/ExportFactory.php:33
- Correct the spelling of "Optionnaly" to "Optionally" in the doc comment.
* Optionnaly returns some lines to add to the iCalendar event.
tests/Presenters/Admin/ManageConfigurationPresenterTest.php:328
- Implement this test stub with assertions to verify that
SetExportPluginValuescorrectly passes export plugin values to the page.
public function SetExportPluginValues($values)
|
@JohnXLivingston Thanks for the PR. I left some comments and questions. |
|
Also could the git commit message subject say it is for Calendar Export. Which it appears to be for me. Unless I am mistaken. |
ec83f2c to
2fc1e76
Compare
This plugin is used to customize exports (for now icalendar exports). For now, only some basic features are implemented, more could be added later. Current features: * Possibility to change the ical Classification for each events. * Possibility to add some custom lines in ical events.
2fc1e76 to
835a123
Compare
JohnVillalovos
left a comment
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.
LGTM.
Thanks @JohnXLivingston
|
Thank you very much for the merge ! |
This plugin can be used to customize exports (especially icalendar exports).
This commit includes some basic features, more could be added later.
Current features: