private static int GetColumnSpan(LaneModel lane)
        {
            if (lane.ChildLanes == null || lane.ChildLanes.Count == 0 ||
                lane.ChildLanes.First().Orientation == Orientation.Horizontal)
                return 1;

            return lane.ChildLanes.Sum(l => GetColumnSpan(l));
        }
 private static object GetCssClassForLaneType(LaneModel lane)
 {
     var cssClass = string.Empty;
     switch (lane.ClassType)
     {
         case LaneClassType.Active:
             break;
         case LaneClassType.Backlog:
             cssClass = "kb-ch-backlog";
             break;
         case LaneClassType.Archive:
             cssClass = "kb-ch-archive";
             break;
     }
     return cssClass;
 }
        private static string GetLaneDisplay(LaneModel lane, LaneDisplayType displayType)
        {
            var annotation = "";
            string activityName;

            //This is a fix for when the activities do not load correctly.
            try
            {
                activityName = lane.Activity == null ? "Undefined" : GetRemovedTag(lane.Activity.Name);
            }
            catch
            {
                activityName = "Undefined";
            }

            switch (displayType)
            {
                case LaneDisplayType.ActivityType:
                    annotation = string.Format("<br /><span class='kb-ch-lane-annotation'>({0})</span>", activityName);
                    break;
                case LaneDisplayType.LaneType:
                    annotation = string.Format("<br /><span class='kb-ch-lane-annotation'>({0})</span>", GetRemovedTag(lane.Type.ToString()));
                    break;
            }
            return string.Format("{0}{1}", GetRemovedTag(lane.Title), annotation);
        }
		private void MapChildLanes(IList<LeanKit.API.Client.Library.TransferObjects.Lane> lanes, LeanKit.API.Client.Library.TransferObjects.Lane parentLane,
		                           LaneModel parentLaneModel, int level)
		{
			parentLaneModel.ChildLanes = new List<LaneModel>();
			parentLaneModel.IsParent = false;
			parentLaneModel.Level = level;

			if (parentLane.ChildLaneIds.Count == 0) return;

			parentLaneModel.IsParent = true;
			level++;

			foreach (var childLaneId in parentLane.ChildLaneIds)
			{
				var childLane = lanes.FirstOrDefault(x => x.Id == childLaneId);
				var childLaneModel = Mapper.Map<LaneModel>(childLane);
				MapChildLanes(lanes, childLane, childLaneModel, level);
				childLaneModel.Level = level;
				parentLaneModel.ChildLanes.Add(childLaneModel);
			}
		}