22 lines
989 B
C#
22 lines
989 B
C#
using System.Text;
|
|
using System.Web.Mvc;
|
|
|
|
namespace Kreta.Web.Helpers
|
|
{
|
|
public static class GroupControlExtensions
|
|
{
|
|
public static MvcHtmlString RenderGroupStart(this HtmlHelper helper, string name, int size = 12, string paramGroupId = "")
|
|
{
|
|
var groupId = string.IsNullOrWhiteSpace(paramGroupId) ? name : paramGroupId;
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.AppendFormat("<div id='{0}' style='border-top: 1px solid gainsboro; padding: 0px; margin-top: 20px;' class='{1}'>", groupId, BootsrapHelper.GetSizeClasses(size)).AppendLine();
|
|
sb.AppendFormat("<span style='position: absolute; top: -24px; left: 5px; padding: 0px 5px 0px 5px;' class='k-content windowInputLabel'>{0}</span><br />", name);
|
|
return new MvcHtmlString(sb.ToString());
|
|
}
|
|
|
|
public static MvcHtmlString RenderGroupEnd(this HtmlHelper helper)
|
|
{
|
|
return new MvcHtmlString("</div>");
|
|
}
|
|
}
|
|
}
|