Skip to content
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

Support for QR codes #146

Merged
merged 2 commits into from
Nov 23, 2023
Merged

Support for QR codes #146

merged 2 commits into from
Nov 23, 2023

Conversation

xispa
Copy link
Member

@xispa xispa commented Nov 23, 2023

Description of the issue/feature this PR addresses

This Pull Request enables QR support for senaite.impress.

To render QR, simply add the following snippet in the report template:

<div class="qrcode"
     data-size="80"
     data-color="#3a3"
     tal:attributes="data-text model/absolute_url">
</div>

where data-text contains the text to be encoded in the QR.

Current behavior before PR

No support by default for QR codes

Desired behavior after PR is merged

Support by default for QR codes

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@xispa xispa added the Addition label Nov 23, 2023
@ramonski
Copy link
Contributor

Cool, thanks Jordi!
Shall we just add it to the default templates?

@xispa
Copy link
Member Author

xispa commented Nov 23, 2023

Cool, thanks Jordi! Shall we just add it to the default templates?

I did already here: https://github.com/senaite/senaite.impress/pull/146/files#diff-e3244c56ad4dad4e213ac92d12be8a61a0e3d57c7d509aec834b5735d115b44cR96-R103

@ramonski
Copy link
Contributor

Cool, thanks Jordi! Shall we just add it to the default templates?

I did already here: https://github.com/senaite/senaite.impress/pull/146/files#diff-e3244c56ad4dad4e213ac92d12be8a61a0e3d57c7d509aec834b5735d115b44cR96-R103

Ah yes, I forgot that we've splitted the templates now 😅

@ramonski ramonski merged commit 9abb68a into 2.x Nov 23, 2023
@ramonski ramonski deleted the qr-support branch November 23, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants