public string RenderForEdit(MerchantTribeApplication app, Catalog.Category cat) { StringBuilder sb = new StringBuilder(); sb.Append("<div id=\"part" + Id + "\" class=\"editable issortable\">"); sb.Append(PartHelper.RenderEditTools(this.Id)); sb.Append(RenderForDisplay(app, cat)); sb.Append("</div>"); return(sb.ToString()); }
private string Render(MerchantTribeApplication app, bool IsEditMode, Catalog.Category containerCategory) { StringBuilder sb = new StringBuilder(); sb.Append("<div class=\"cols editable issortable"); if (this.SpacerAbove) { sb.Append(" spacerabove"); } sb.Append("\""); if (IsEditMode) { sb.Append(" id=\"part" + this.Id + "\""); } sb.Append(">"); if (IsEditMode) { sb.Append(PartHelper.RenderEditTools(this.Id)); sb.Append("<div class=\"colholder\"><strong>Columns</strong></div>"); } for (int i = 0; i < _Columns.Count; i++) { bool isLast = (i == _Columns.Count - 1); sb.Append("<div class=\"grid_"); sb.Append((int)_Columns[i].Size); if (isLast) { if (_Columns[i].NoGutter) { if (_Parent.NoGutter) { sb.Append("w"); } else { sb.Append("l"); } } else { sb.Append("l"); } } else { if (_Columns[i].NoGutter) { sb.Append("w"); } } sb.Append("\" >"); if (IsEditMode) { sb.Append("<div class=\"droppable\" id=\"part" + _Columns[i].Id + "\">"); sb.Append("<div class=\"coltools\"><strong>Col"); if ((int)_Columns[i].Size > 1) { sb.Append("umn"); } sb.Append("</strong> [" + ((int)_Columns[i].Size).ToString() + "]</div>"); sb.Append(_Columns[i].RenderForEdit(app, containerCategory)); sb.Append("</div>"); } else { sb.Append(_Columns[i].RenderForDisplay(app, containerCategory)); } sb.Append("</div>"); } sb.Append("<div class=\"clearcol\"></div>"); sb.Append("</div>"); return(sb.ToString()); }