예제 #1
0
 def photo_img_thumbnail(self):
     im = ImageManager()
     if self.photo:
         return Markup('<a href="' + url_for('PersonModelView.show',pk=str(self.id)) +\
                       '" class="thumbnail"><img src="' + im.get_url_thumbnail(self.photo) +\
                       '" alt="Photo" class="img-rounded img-responsive"></a>')
     else:
         return Markup('<a href="'+ url_for('PersonModelView.show',pk=str(self.id)) +\
                       '" class="thumbnail"><img src="//:0" alt="Photo" class="img-responsive"></a>')
예제 #2
0
 def photo_img_thumbnail(self):
     im = ImageManager()
     vn = self.ViewName()
     if self.photo:
         return Markup(
             '<a href="' + url_for(vn, pk=str(self.id)) +
             '" class="thumbnail"><img src="' +
             im.get_url_thumbnail(self.photo) +
             '" alt="Photo" class="img-rounded img-responsive"></a>')
     else:
         return Markup(
             '<a href="' + url_for(vn, pk=str(self.id)) +
             '" class="thumbnail"><img src="//:0" alt="Photo" class="img-responsive"></a>'
         )
예제 #3
0
 def vendor_img_thumbnail(self):
     im = ImageManager()
     if self.vendor_site_image:
         return Markup(
             '<a href="' +
             url_for('VendorSitesModelView.show', pk=str(self.id)) +
             '" class="thumbnail"><img src="' +
             im.get_url_thumbnail(self.vendor_site_image) +
             '" alt="Photo" class="img-rounded img-responsive"></a>')
     else:
         return Markup(
             '<a href="' +
             url_for('VendorSitesModelView.show', pk=str(self.id)) +
             '" class="thumbnail"><img src="//:0" alt="Photo" class="img-responsive"></a>'
         )