public string GetCard(int boardId, int cardId) { var query = new Query.Cards(); var card = query.GetDetails(boardId, cardId); return(GetCard(boardId, card)); }
public static Tuple <Query.Models.Card, string> Details(int boardId, int cardId) { Server Server = Server.Instance; var query = new Query.Cards(); try { var card = query.GetDetails(boardId, cardId); var scaffold = new Scaffold("/Views/Card/Kanban/details.html", Server.Scaffold); scaffold.Data["list-name"] = card.listName; scaffold.Data["description"] = card.description; scaffold.Data["no-description"] = card.description.Length > 0 ? "hide" : ""; scaffold.Data["has-description"] = card.description.Length <= 0 ? "hide" : ""; scaffold.Data["archive-class"] = card.archived ? "hide" : ""; scaffold.Data["restore-class"] = card.archived ? "" : "hide"; scaffold.Data["delete-class"] = card.archived ? "" : "hide"; return(new Tuple <Query.Models.Card, string>(card, scaffold.Render())); } catch (Exception) { throw new ServiceErrorException("Error loading card details"); } }