Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
1b1da0e
Transforming url string from length 255 to TEXT
jeppekroghitk Aug 26, 2025
9a2e5a3
Explicitly defined length of text, to use text instead of longtext
jeppekroghitk Aug 26, 2025
8ca25bd
Created migration
jeppekroghitk Aug 26, 2025
e1ed6d4
Configured url field to only contain a single URL
jeppekroghitk Aug 26, 2025
8951114
Adjusted allowance of add and delete, and added custom css class for …
jeppekroghitk Aug 28, 2025
42ed2b0
ADded javascript to handle only setting a single URL
jeppekroghitk Aug 28, 2025
b8497f3
Coding standards
jeppekroghitk Aug 28, 2025
e7709b2
ADded describing comment in js
jeppekroghitk Aug 28, 2025
48b9407
Updated changelog
jeppekroghitk Aug 28, 2025
f007966
Refined check, and removed unneccessary accordian button, as field is…
jeppekroghitk Aug 29, 2025
615a680
Changed dashboardController to redirect to qrCrudController until das…
jeppekroghitk Aug 29, 2025
ab186ad
Fixed display of description in modal
jeppekroghitk Aug 29, 2025
9d977ad
Updated changelog
jeppekroghitk Aug 29, 2025
bd6c637
Added styling to static page
jeppekroghitk Aug 29, 2025
e4cb340
Updated changelog
jeppekroghitk Aug 29, 2025
9ee57b8
Added help texts to qr create and edit
jeppekroghitk Aug 29, 2025
0899db5
Redirecting to qr crud from dashboard controller until dashboard func…
jeppekroghitk Aug 29, 2025
2d68db9
Added help texts and translations to design
jeppekroghitk Aug 29, 2025
4944d5c
aligned some qr translations
jeppekroghitk Aug 29, 2025
861b1c0
Added description to qr index page
jeppekroghitk Aug 29, 2025
b9305c5
Added some api config
jeppekroghitk Sep 1, 2025
9c2b7df
Added title and description to design-crud and batch download page
jeppekroghitk Sep 1, 2025
fd1cad8
Added more translations, and modified setUrl page to not be contained…
jeppekroghitk Sep 1, 2025
c7a704b
Added translationss and help texts to batch overwrite url
jeppekroghitk Sep 1, 2025
3c1999a
Added translations for side menu
jeppekroghitk Sep 1, 2025
b1543e5
seturl translations
jeppekroghitk Sep 1, 2025
d016b83
Coding standards
jeppekroghitk Sep 2, 2025
e58d09b
Replaced deprecated json_encode with Utils::jsonEncode
jeppekroghitk Sep 2, 2025
9f2c5c7
Coding standards
jeppekroghitk Sep 2, 2025
005ceaf
Merge pull request #40 from itk-dev/feature/5295-static-page-glitter
jeppekroghitk Sep 5, 2025
8156a6b
added static.css and configured webpack to include as seperate file f…
jeppekroghitk Sep 5, 2025
591296e
Added status ENUM for qr code
jeppekroghitk Sep 2, 2025
c08cdda
Added QrHelper to handle archiving
jeppekroghitk Sep 2, 2025
3d5249f
Added status to QR code entity
jeppekroghitk Sep 2, 2025
454284a
Reordered qr context menu actions and replaced delete action with arc…
jeppekroghitk Sep 2, 2025
6f3978e
Replaced delete translation with archive translation
jeppekroghitk Sep 2, 2025
285b8a0
Added migration for qr status property
jeppekroghitk Sep 2, 2025
ad38fb5
Added template for confirming archiving and adding alternativeUrl
jeppekroghitk Sep 3, 2025
ad456a2
Added alternativeUrl property to QR entity
jeppekroghitk Sep 3, 2025
fb24041
Added migration for alternativeUrl property
jeppekroghitk Sep 3, 2025
a1cf0ee
Added qr archive controller
jeppekroghitk Sep 3, 2025
fab5b1c
Added form type for qr archive form
jeppekroghitk Sep 3, 2025
f183e0a
Moved functionality for archiving out of qrCrud controller
jeppekroghitk Sep 3, 2025
1dbc1d5
Added Helper class for settings alternativeUrl on QR
jeppekroghitk Sep 3, 2025
344c0c5
Added translations for archive save success
jeppekroghitk Sep 4, 2025
ed19eb0
Minor translations and coding standards
jeppekroghitk Sep 4, 2025
afa6fd9
Removed reference to qrHelper in qrCrudController
jeppekroghitk Sep 4, 2025
71bec2e
Finalized translations
jeppekroghitk Sep 4, 2025
45ef2ec
Added / redirect to filtered qr crud
jeppekroghitk Sep 4, 2025
531c731
Corrected redirect to ArchiveController
jeppekroghitk Sep 4, 2025
cb9d3a2
Set redirect to filtered qr crud
jeppekroghitk Sep 4, 2025
2f100af
Made qrArchiveController a standard symfony controller to not interfe…
jeppekroghitk Sep 4, 2025
0ef2124
Corrected qrArchive form template
jeppekroghitk Sep 4, 2025
f43dd4e
Added translations for qr status label and status values
jeppekroghitk Sep 4, 2025
98df709
Added translations for unarchived
jeppekroghitk Sep 5, 2025
9a53239
Added action for unarchive
jeppekroghitk Sep 5, 2025
c3e547d
Added archived template
jeppekroghitk Sep 5, 2025
6edde45
Added unarchive function in qr helper class
jeppekroghitk Sep 5, 2025
fb11f72
Added archive method to QrArchiveController
jeppekroghitk Sep 5, 2025
c410374
Added qr logo folder to gitignore
jeppekroghitk Sep 5, 2025
a9e89ce
Add alternativeUrl field to QR CRUD edit form
jeppekroghitk Sep 5, 2025
d574489
Add archived QR status check and render archived template
jeppekroghitk Sep 5, 2025
ef5b3d3
Add cancel button to QR archive form
jeppekroghitk Sep 5, 2025
626bc2a
Implement archived QR template with styling and alternative URL
jeppekroghitk Sep 5, 2025
b6fd526
Add whitespace formatting to archive form template
jeppekroghitk Sep 5, 2025
81dab61
Update Danish translations for archive functionality
jeppekroghitk Sep 5, 2025
dd5ad9e
Coding standards
jeppekroghitk Sep 5, 2025
c554aa3
Refactor QR CRUD actions and improve batch URL handling
jeppekroghitk Sep 5, 2025
21b3288
Simplify SetUrlController by removing EasyAdmin dependency and using …
jeppekroghitk Sep 5, 2025
febf7cb
Update Danish translation for alternative URL help text
jeppekroghitk Sep 5, 2025
ce58d9f
Improve handling of batch download redirection
jeppekroghitk Sep 5, 2025
5e55e23
Coding standards
jeppekroghitk Sep 5, 2025
47fc012
Merge migrations
jeppekroghitk Sep 5, 2025
9fcb306
Removed migrations
jeppekroghitk Sep 5, 2025
0ac2c46
Merged migrations
jeppekroghitk Sep 5, 2025
59f7b3f
Deleted migration
jeppekroghitk Sep 5, 2025
81bf1f7
Finally fixed migrations
jeppekroghitk Sep 5, 2025
9cccc9c
Added archived page image
jeppekroghitk Sep 8, 2025
3976e47
Added styling and correct setup for archived page
jeppekroghitk Sep 8, 2025
12fb60e
Make display of alternative url text conditional and add icon to unar…
jeppekroghitk Sep 8, 2025
fe95cad
Merge pull request #41 from itk-dev/feature/5256-5257-5258-5259-archi…
jeppekroghitk Sep 8, 2025
7c7082f
Merge pull request #39 from itk-dev/feature/5267-in-platform-document…
jeppekroghitk Sep 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/public/uploads/qr-logos/
/var/
/vendor/
###< symfony/framework-bundle ###
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ See [keep a changelog] for information about writing changes to this log.

## [Unreleased]

[PR-41](https://github.com/itk-dev/itqr/pull/41)
- Added archived concept
[PR-40](https://github.com/itk-dev/itqr/pull/40)
- Added styling to static page.
[PR-39](https://github.com/itk-dev/itqr/pull/39)
- Added various help texts and in-platform-documentation.
[PR-38](https://github.com/itk-dev/itqr/pull/38)
- Limit number of URLs to 1
- Increase URL data type from varchar to text
[PR-37](https://github.com/itk-dev/itqr/pull/37)
- Rename "theme" to "design" in general
- Rename "delete" to "archive" in general
Expand Down
39 changes: 37 additions & 2 deletions assets/app.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import './styles/app.css';

const uploadBasePath = 'uploads/qr_codes/';

document.addEventListener('DOMContentLoaded', () => {
// Enforce only one URL per QR code.
handleQrUrlCollection();

const qrCodeContainer = document.getElementById('qrCodeContainer');
const tabsContainer = document.getElementById('qrCodeTabs'); // Navigation tabs
const tabContentContainer = document.getElementById('qrCodeTabContent'); // Tab content
const form = document.querySelector('.form-wrapper form');
const formName = form.getAttribute('name');
const formName = form ? form.getAttribute('name') : '';
const selectedQrCodes = document.getElementById('selectedQrCodes');

// Ensure all containers and elements exist
if (!qrCodeContainer || !tabsContainer || !tabContentContainer || !form) {
console.error('Required elements not found!');
console.log('Required elements not found');
return;
}

Expand Down Expand Up @@ -200,6 +204,37 @@ function handleBatchDisableConfirm() {
});
}

function handleQrUrlCollection() {
const qrUrlCollectionParent = document.querySelector('.qr-urls-collection');
const qrUrlCollectionAddButton = document.querySelector('.qr-urls-collection .field-collection-add-button');
const urlCollectionCount = qrUrlCollectionParent ? parseInt(qrUrlCollectionParent.getAttribute('data-num-items')) : null;

// If the button exists, and no URL is added - add it!
if (qrUrlCollectionAddButton) {
setTimeout(() => {
if (urlCollectionCount !== null && urlCollectionCount === 0) {
qrUrlCollectionAddButton.click();
}
}, 1)

// Hide the add-button if there is already an URL added.
if (parseInt(urlCollectionCount) === 1) {
qrUrlCollectionAddButton.classList.add('d-none');
}

// Handle the click event and hide add-button if an URL was added and the number of URLs is 1.
qrUrlCollectionAddButton.addEventListener('click', () => {
setTimeout(() => {
const urlCollectionCount = qrUrlCollectionParent.getAttribute('data-num-items');

if (parseInt(urlCollectionCount) === 1) {
qrUrlCollectionAddButton.classList.add('d-none');
}
}, 1)
});
}
}

document.addEventListener('readystatechange', function(event) {
if ('complete' === document.readyState) {
handleBatchDisableConfirm();
Expand Down
5 changes: 5 additions & 0 deletions assets/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,8 @@ form[name="batch_download"] .accordion-button {
background-color: #fff;
border-bottom: 1px solid #e9e9e9;
}


.qr-urls-collection .accordion-button {
display: none;
}
162 changes: 162 additions & 0 deletions assets/styles/archived.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 95 additions & 0 deletions assets/styles/static.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
:root {
--spacer-md: 1rem;
--spacer-lg: calc(var(--spacer-md) * 2);
--shadow-color: 240deg 27% 62%;
--shadow-elevation-low:
0.3px 0.3px 0.4px hsl(var(--shadow-color) / 0.34),
0.4px 0.4px 0.6px -1.7px hsl(var(--shadow-color) / 0.28),
0.9px 1px 1.3px -3.5px hsl(var(--shadow-color) / 0.21);
--shadow-elevation-medium:
0.3px 0.3px 0.4px hsl(var(--shadow-color) / 0.29),
0.5px 0.6px 0.8px -0.9px hsl(var(--shadow-color) / 0.25),
1px 1.2px 1.5px -1.7px hsl(var(--shadow-color) / 0.22),
2.2px 2.6px 3.3px -2.6px hsl(var(--shadow-color) / 0.19),
4.5px 5.2px 6.7px -3.5px hsl(var(--shadow-color) / 0.16);
--shadow-elevation-high:
0.3px 0.3px 0.4px hsl(var(--shadow-color) / 0.27),
0.7px 0.8px 1px -0.4px hsl(var(--shadow-color) / 0.25),
1.2px 1.4px 1.8px -0.8px hsl(var(--shadow-color) / 0.24),
1.9px 2.2px 2.8px -1.2px hsl(var(--shadow-color) / 0.22),
2.9px 3.4px 4.4px -1.6px hsl(var(--shadow-color) / 0.21),
4.5px 5.2px 6.7px -1.9px hsl(var(--shadow-color) / 0.19),
6.7px 7.8px 10px -2.3px hsl(var(--shadow-color) / 0.18),
9.7px 11.3px 14.5px -2.7px hsl(var(--shadow-color) / 0.16),
13.6px 16px 20.5px -3.1px hsl(var(--shadow-color) / 0.14),
18.7px 21.9px 28.1px -3.5px hsl(var(--shadow-color) / 0.13);
}
*, *::before, *::after {
box-sizing: border-box;
}

* {
margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
html {
interpolate-size: allow-keywords;
}
}

body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
font-family: 'Roboto', sans-serif;
background-color: ghostwhite;
}

img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}

input, button, textarea, select {
font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}

p {
text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}

#root, #__next {
isolation: isolate;
}

.container {
background-color: #fff;
display: flex;
flex-direction: column;
min-height: 100vh;
max-width: 800px;
margin: 0 auto;
padding: 0 var(--spacer-md);
> h1 {
font-size: clamp(1.75rem, 4.5vw, 3rem);
margin: var(--spacer-md) 0;
}

> p {

}
}

@media screen and (min-width: 800px) {
.container {
padding: 0 var(--spacer-lg);
}
}
3 changes: 3 additions & 0 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ security:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
api:
pattern: ^/api
stateless: true
main:
custom_authenticators:
- App\Security\AzureOIDCAuthenticator
Expand Down
2 changes: 1 addition & 1 deletion config/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ root_redirect:
path: /
controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController
defaults:
route: 'qr_index'
route: 'admin'
permanent: true
Loading