Пример #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)
 }
Пример #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));
 }
Пример #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));
     }
 }
Пример #4
0
 public static string PictureSmall(PictureActiveField picture, string altText)
 {
     return(PictureSmall(picture, altText, ""));
 }
Пример #5
0
 public static string PictureMedium(PictureActiveField picture, string altText)
 {
     return(PictureMedium(picture, altText, ""));
 }
Пример #6
0
 public static string PicturePreview(PictureActiveField picture, string altText)
 {
     return(PicturePreview(picture, altText, ""));
 }
Пример #7
0
 public static string Picture(PictureActiveField imageFileName, string altText)
 {
     return(Picture(imageFileName, altText, ""));
 }
Пример #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));
 }
Пример #9
0
 public static string PictureCustomSize(string pictureSizeCodeSuffix, PictureActiveField picture)
 {
     return(Html.Image(picture.ImageCustomSizePath(pictureSizeCodeSuffix), "", ""));
 }
Пример #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));
 }
Пример #11
0
 public static string PicturePreview(PictureActiveField picture)
 {
     return(PicturePreview(picture, "", "", false));
 }
Пример #12
0
 public static string PictureThumb(PictureActiveField picture, string altText)
 {
     return(PictureThumb(picture, altText, "", false));
 }
Пример #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);
 }