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) }
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)); }
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)); } }
public static string PictureSmall(PictureActiveField picture, string altText) { return(PictureSmall(picture, altText, "")); }
public static string PictureMedium(PictureActiveField picture, string altText) { return(PictureMedium(picture, altText, "")); }
public static string PicturePreview(PictureActiveField picture, string altText) { return(PicturePreview(picture, altText, "")); }
public static string Picture(PictureActiveField imageFileName, string altText) { return(Picture(imageFileName, altText, "")); }
/// <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)); }
public static string PictureCustomSize(string pictureSizeCodeSuffix, PictureActiveField picture) { return(Html.Image(picture.ImageCustomSizePath(pictureSizeCodeSuffix), "", "")); }
/// <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)); }
public static string PicturePreview(PictureActiveField picture) { return(PicturePreview(picture, "", "", false)); }
public static string PictureThumb(PictureActiveField picture, string altText) { return(PictureThumb(picture, altText, "", false)); }
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); }