Esempio n. 1
0
 public static string PictureThumb(PictureActiveField picture, string altText, string cssClass)
 {
     return(PictureThumb(picture, altText, cssClass, false));
     // MN 20100919 - default change to false ie no enlargement - defaulting to enlargement is annoying as it just opens a new window if you don't have colorbox
     //return (picture!=null)?PictureThumb(picture, (altText.IsNotBlank())?altText:(picture.FileName.IsNotBlank())?picture.FileName.RemoveCharsFromEnd(4):"Picture", "", false):"";   // MN 20100919 - default change to false ie no enlargement - defaulting to enlargement is annoying as it just opens a new window if you don't have colorbox
     // MN 20101207 - changed default alt text to blank (was displaying filename as alt text)
 }
Esempio n. 2
0
 public static string PictureSmall(PictureActiveField picture, string altText, string cssClass, bool showEnlargement)
 {
     if (picture.FileName != null && showEnlargement)
     {
         return("<a href=\"" + picture.ImagePath + "\" class=\"popup\" alt=\"View this image larger [" + picture.ImagePath.JsEncode() + "]\">" + Html.Image(picture.ImageSmallPath, altText, cssClass) + "</a>");
     }
     return(Html.Image(picture.ImageSmallPath, altText, cssClass));
 }
Esempio n. 3
0
 public static string PictureThumb(PictureActiveField picture, string altText, string cssClass, bool showEnlargement)
 {
     if (picture == null)
     {
         return("");
     }
     else
     {
         if (picture.FileName != null && showEnlargement)
         {
             return("<a href=\"" + picture.ImagePath + "\" class=\"popup\" title=\"View this image larger\">" + Html.Image(picture.ImageThumbPath, altText, cssClass) + "</a>");
         }
         return(Html.Image(picture.ImageThumbPath, altText, cssClass));
     }
 }
Esempio n. 4
0
 public static string PictureSmall(PictureActiveField picture, string altText)
 {
     return(PictureSmall(picture, altText, ""));
 }
Esempio n. 5
0
 public static string PictureMedium(PictureActiveField picture, string altText)
 {
     return(PictureMedium(picture, altText, ""));
 }
Esempio n. 6
0
 public static string PicturePreview(PictureActiveField picture, string altText)
 {
     return(PicturePreview(picture, altText, ""));
 }
Esempio n. 7
0
 public static string Picture(PictureActiveField imageFileName, string altText)
 {
     return(Picture(imageFileName, altText, ""));
 }
Esempio n. 8
0
 /// <summary>
 /// Returns a string containing an HTML IMG tag, given a picture field and alt text.
 /// Returns empty string (ie no tag) if picture field is null.
 /// </summary>
 /// <param name="picture"></param>
 /// <param name="altText"></param>
 /// <param name="cssClass"></param>
 /// <returns></returns>
 public static string Picture(PictureActiveField picture, string altText, string cssClass)
 {
     return(Html.Image(picture.ImagePath, altText, cssClass));
 }
Esempio n. 9
0
 public static string PictureCustomSize(string pictureSizeCodeSuffix, PictureActiveField picture)
 {
     return(Html.Image(picture.ImageCustomSizePath(pictureSizeCodeSuffix), "", ""));
 }
Esempio n. 10
0
 /// <summary>
 /// Outputs html image tag for sma;; size image. Does not show a popup enlargement by default.
 /// </summary>
 /// <param name="picture"></param>
 /// <param name="altText"></param>
 /// <param name="cssClass"></param>
 /// <returns></returns>
 public static string PictureSmall(PictureActiveField picture, string altText, string cssClass)
 {
     return(PictureSmall(picture, altText, cssClass, false));
 }
Esempio n. 11
0
 public static string PicturePreview(PictureActiveField picture)
 {
     return(PicturePreview(picture, "", "", false));
 }
Esempio n. 12
0
 public static string PictureThumb(PictureActiveField picture, string altText)
 {
     return(PictureThumb(picture, altText, "", false));
 }
Esempio n. 13
0
 public static string PictureThumb(PictureActiveField picture)
 {
     return(PictureThumb(picture, "", "", false));
     // MN 20101207 - changed default alt text to blank (was displaying filename as alt text)
     //return PictureThumb(picture, (picture.FileName.IsNotBlank())?picture.FileName.RemoveCharsFromEnd(4):"Picture", "", true);
 }