adds get categories
This commit is contained in:
@@ -621,6 +621,7 @@
|
||||
<Compile Include="Release\Roadmap.cs" />
|
||||
<Compile Include="Release\Versions.cs" />
|
||||
<Compile Include="Repository\Controllers\PackageRepositoryController.cs" />
|
||||
<Compile Include="Repository\Models\Category.cs" />
|
||||
<Compile Include="Repository\Models\PacakgeDetails.cs" />
|
||||
<Compile Include="Repository\Models\Package.cs" />
|
||||
<Compile Include="Repository\Models\PackageCompatibility.cs" />
|
||||
|
||||
@@ -123,8 +123,45 @@ namespace OurUmbraco.Repository.Controllers
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public IEnumerable<Models.Category> 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<Models.Package> GetPopular(int maxResults = 10)
|
||||
public IEnumerable<Models.Package> GetPopular(int maxResults)
|
||||
{
|
||||
return GetTestData().Take(maxResults);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace OurUmbraco.Repository.Models
|
||||
{
|
||||
public class Category
|
||||
{
|
||||
public string Icon { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user