Permalink
Browse files

Update collective/plonetruegallery/galleryadapters/base.py

added copyright information
  • Loading branch information...
eehmke committed Oct 11, 2012
1 parent b5bcf7b commit 57cd19c8d263c42b7c0d8fc9ad4404a8f9c50262
Showing with 10 additions and 0 deletions.
  1. +10 −0 collective/plonetruegallery/galleryadapters/base.py
@@ -121,6 +121,7 @@ def assemble_image_information(self, image):
'link': self.get_link_url(image),
'title': image.Title,
'description': image.Description,
+ 'copyright': self.get_copyright(image),
'portal_type': image.portal_type
}
@@ -137,3 +138,12 @@ def get_thumb_url(self, image):
if not gallery_thumbnail_size:
gallery_thumbnail_size = 'tile'
return "%s/image_%s" % (image.getURL(), gallery_thumbnail_size)
+
+ def get_copyright (self, image):
+ if self.gallery_adapter.settings.copyright:
+ obj = image.getObject ()
+ copyright = obj.Rights()
+ if copyright:
+ #return " ©%s" % copyright
+ return copyright
+ return ""

0 comments on commit 57cd19c

Please sign in to comment.