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

[2.x] Feature: Allow displaying the date of an uploaded file #2173

Open
wants to merge 15 commits into
base: 2.x
Choose a base branch
from

Conversation

gilbo75
Copy link
Contributor

@gilbo75 gilbo75 commented Mar 8, 2023

This feature allows displaying the date of an uploaded file in the file library.
This option is manageable with a Twill variable.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
lang/en/lang.php Outdated Show resolved Hide resolved
@what-the-diff
Copy link

what-the-diff bot commented Mar 27, 2023

PR Summary

  • 📆 New config option for showing upload dates
    Added a new configuration option to display the uploaded date of files in the media library.
  • 🏞️ MediaSidebar update
    Made updates to the MediaSidebar component for showcasing this information when enabled.
  • 🌐 Translations for "Uploaded on"
    Added translations for "Uploaded on" in English and French languages.

@ifox ifox changed the title Feature: Allow displaying the date of an uploaded file [2.x] Feature: Allow displaying the date of an uploaded file Mar 29, 2023
@area17 area17 deleted a comment from what-the-diff bot Mar 30, 2023
@area17 area17 deleted a comment from what-the-diff bot Mar 30, 2023
@area17 area17 deleted a comment from what-the-diff bot Mar 30, 2023
@@ -43,7 +43,9 @@ public function toCmsArray()
'original' => FileService::getUrl($this->uuid),
'size' => $this->size,
'filesizeInMb' => number_format($this->attributes['size'] / 1048576, 2),
];
] + (config('twill.file-library.show_uploaded_date')
? ['uploadedDate' => $this->created_at->format("d/m/Y H:i")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this is not using the newly added option twill.file-library.format_uploaded_date

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On which branch (v2, v3)do you me to PR this update?

Copy link
Member

@ifox ifox Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gilbo75 do you need this feature on a Twill 2 project? If you do, please address the issue mentioned by Tofandel and I can merge and release a new minor on Twill 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
Yes, I need this feature on Twill 2

Copy link
Contributor Author

@gilbo75 gilbo75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
I would like to merge this branch

@gilbo75
Copy link
Contributor Author

gilbo75 commented Jun 5, 2024 via email

src/Models/File.php Outdated Show resolved Hide resolved
@gilbo75 gilbo75 closed this Jun 5, 2024
@Tofandel
Copy link
Contributor

Tofandel commented Jun 5, 2024

@gilbo75 Why did you close the PR instead of just committing the suggested change?

@gilbo75 gilbo75 reopened this Jun 5, 2024
Co-authored-by: Adrien Foulon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants