This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch gc/8508
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/gc/8508 by this push:
     new a0d6cf845 fixup! [#8508] adding unique id to uploaded screenshots
a0d6cf845 is described below

commit a0d6cf845190b96609c7b6b2c38a7634484c52bd
Author: Guillermo Cruz <[email protected]>
AuthorDate: Tue May 2 09:51:28 2023 -0500

    fixup! [#8508] adding unique id to uploaded screenshots
---
 Allura/allura/model/project.py                           | 4 ----
 Allura/allura/templates/widgets/project_screenshots.html | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 9d90bea39..e6ff5af2e 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -94,10 +94,6 @@ class ProjectFile(File):
     caption = FieldProperty(str)
     sort = FieldProperty(int)
 
-    @LazyProperty
-    def screenshot_timestamp(self):
-        return timegm(self._id.generation_time.timetuple())
-
 
 class ProjectCategory(MappedClass):
 
diff --git a/Allura/allura/templates/widgets/project_screenshots.html 
b/Allura/allura/templates/widgets/project_screenshots.html
index a595b5baf..5aa5059d2 100644
--- a/Allura/allura/templates/widgets/project_screenshots.html
+++ b/Allura/allura/templates/widgets/project_screenshots.html
@@ -25,7 +25,7 @@
   {% for ss in screenshots %}
   <div data-ss-id="{{ ss._id }}" class="screenshot">
     <div class="image">
-      <a class="lightbox" 
href="{{project.url()}}screenshot/{{h.urlquote(ss.filename)}}" ><img 
src="{{project.url()}}screenshot/{{h.urlquote(ss.filename)}}/thumb?{{ 
ss.screenshot_timestamp }}" alt="Screenshot thumbnail"/></a>
+      <a class="lightbox" 
href="{{project.url()}}screenshot/{{h.urlquote(ss.filename)}}" ><img 
src="{{project.url()}}screenshot/{{h.urlquote(ss.filename)}}/thumb" 
alt="Screenshot thumbnail"/></a>
       {% if not edit %}
       <br>
       {{ss.caption}}

Reply via email to