From 80598056ee5df348146bd66e255e8aa6bc56de60 Mon Sep 17 00:00:00 2001 From: Shannon Date: Sun, 12 Jun 2016 19:25:34 +0200 Subject: [PATCH] adds get categories --- OurUmbraco/OurUmbraco.csproj | 1 + .../PackageRepositoryController.cs | 39 ++++++++++++++++++- OurUmbraco/Repository/Models/Category.cs | 8 ++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 OurUmbraco/Repository/Models/Category.cs diff --git a/OurUmbraco/OurUmbraco.csproj b/OurUmbraco/OurUmbraco.csproj index 0dc9d0ee..5cfb2b5f 100644 --- a/OurUmbraco/OurUmbraco.csproj +++ b/OurUmbraco/OurUmbraco.csproj @@ -621,6 +621,7 @@ + diff --git a/OurUmbraco/Repository/Controllers/PackageRepositoryController.cs b/OurUmbraco/Repository/Controllers/PackageRepositoryController.cs index 73d278fb..e534e2c0 100644 --- a/OurUmbraco/Repository/Controllers/PackageRepositoryController.cs +++ b/OurUmbraco/Repository/Controllers/PackageRepositoryController.cs @@ -123,8 +123,45 @@ namespace OurUmbraco.Repository.Controllers } }; } + + public IEnumerable GetCategories() + { + return new[] + { + new Models.Category + { + Icon = "icon-male-and-female", + Name = "Collaboration" + }, + new Models.Category + { + Icon = "icon-molecular-network", + Name = "Backoffice extensions" + }, + new Models.Category + { + Icon = "icon-brackets", + Name = "Developer tools" + }, + new Models.Category + { + Icon = "icon-wand", + Name = "Starter kits" + }, + new Models.Category + { + Icon = "icon-medal", + Name = "Umbraco Pro" + }, + new Models.Category + { + Icon = "icon-wrench", + Name = "Website utilities" + } + }; + } - public IEnumerable GetPopular(int maxResults = 10) + public IEnumerable GetPopular(int maxResults) { return GetTestData().Take(maxResults); } diff --git a/OurUmbraco/Repository/Models/Category.cs b/OurUmbraco/Repository/Models/Category.cs new file mode 100644 index 00000000..b2fabb66 --- /dev/null +++ b/OurUmbraco/Repository/Models/Category.cs @@ -0,0 +1,8 @@ +namespace OurUmbraco.Repository.Models +{ + public class Category + { + public string Icon { get; set; } + public string Name { get; set; } + } +} \ No newline at end of file