package tree is basically done, got the editor updated to work with the server data to display the initial screen and details
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name umbraco.resources.ourPackageRepositoryResource
|
||||
* @description handles data for package installations
|
||||
**/
|
||||
function ourPackageRepositoryResource($q, $http, umbDataFormatter, umbRequestHelper) {
|
||||
|
||||
var baseurl = "http://localhost:24292/webapi/packages/v1";
|
||||
|
||||
return {
|
||||
|
||||
getDetails: function (packageId) {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(baseurl + "/getdetails/" + packageId),
|
||||
'Failed to get package details');
|
||||
},
|
||||
|
||||
getCategories: function () {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(baseurl + "/getcategories"),
|
||||
'Failed to query packages');
|
||||
},
|
||||
|
||||
getPopular: function (maxResults) {
|
||||
|
||||
if (maxResults === undefined) {
|
||||
maxResults = 10;
|
||||
}
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(baseurl + "/GetPopular?maxResults=" + maxResults),
|
||||
'Failed to query packages');
|
||||
},
|
||||
|
||||
getLatest: function (pageIndex, pageSize, category) {
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
$http.get(baseurl + "/GetLatest?pageIndex=" + pageIndex + "&pageSize=" + pageSize + "&category=" + category),
|
||||
'Failed to query packages');
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
angular.module('umbraco.resources').factory('ourPackageRepositoryResource', ourPackageRepositoryResource);
|
||||
@@ -51,7 +51,7 @@
|
||||
<i class="icon-download-alt"></i> <strong>{{ package.downloads }}</strong>
|
||||
</small>
|
||||
<small class="umb-package-karma">
|
||||
<i class="icon-hearts"></i> <strong>{{ package.karma }}</strong>
|
||||
<i class="icon-hearts"></i> <strong>{{ package.ownerInfo.karma }}</strong>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<i class="icon-download-alt"></i> <strong>{{ package.downloads }}</strong>
|
||||
</small>
|
||||
<small class="umb-package-karma">
|
||||
<i class="icon-hearts"></i> <strong>{{ package.karma }}</strong>
|
||||
<i class="icon-hearts"></i> <strong>{{ package.ownerInfo.karma }}</strong>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -11,22 +11,22 @@
|
||||
{
|
||||
"name": "Packages",
|
||||
"icon": "icon-cloud",
|
||||
"view": "views/packagesNew/views/repo.html",
|
||||
"view": "views/packager/views/repo.html",
|
||||
"active": true
|
||||
},
|
||||
{
|
||||
"name": "Installed",
|
||||
"icon": "icon-box",
|
||||
"view": "views/packagesNew/views/installed.html"
|
||||
"view": "views/packager/views/installed.html"
|
||||
},
|
||||
{
|
||||
"name": "Install local",
|
||||
"icon": "icon-add",
|
||||
"view": "views/packagesNew/views/install-local.html"
|
||||
"view": "views/packager/views/install-local.html"
|
||||
}
|
||||
];
|
||||
|
||||
$timeout(function() {
|
||||
$timeout(function () {
|
||||
navigationService.syncTree({ tree: "packager", path: "-1" });
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function PackagesRepoController($scope, $route, $location, $timeout) {
|
||||
function PackagesRepoController($scope, $route, $location, $timeout, ourPackageRepositoryResource, $q) {
|
||||
|
||||
var vm = this;
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
vm.loading = false;
|
||||
vm.pagination = {
|
||||
pageNumber: 1,
|
||||
totalPages: 10
|
||||
totalPages: 10,
|
||||
pageSize: 12
|
||||
};
|
||||
|
||||
vm.selectCategory = selectCategory;
|
||||
@@ -19,221 +20,235 @@
|
||||
vm.prevPage = prevPage;
|
||||
vm.goToPage = goToPage;
|
||||
|
||||
//vm.categories = [
|
||||
// {
|
||||
// "id": 1,
|
||||
// "icon": "icon-male-and-female",
|
||||
// "name": "All",
|
||||
// "active": true
|
||||
// },
|
||||
// {
|
||||
// "icon": "icon-male-and-female",
|
||||
// "name": "Collaboration"
|
||||
// },
|
||||
// {
|
||||
// "id": 2,
|
||||
// "icon": "icon-molecular-network",
|
||||
// "name": "Backoffice extensions"
|
||||
// },
|
||||
// {
|
||||
// "id": 3,
|
||||
// "icon": "icon-brackets",
|
||||
// "name": "Developer tools"
|
||||
// },
|
||||
// {
|
||||
// "id": 4,
|
||||
// "icon": "icon-wand",
|
||||
// "name": "Starter kits"
|
||||
// },
|
||||
// {
|
||||
// "id": 5,
|
||||
// "icon": "icon-medal",
|
||||
// "name": "Umbraco Pro"
|
||||
// },
|
||||
// {
|
||||
// "id": 6,
|
||||
// "icon": "icon-wrench",
|
||||
// "name": "Website utilities"
|
||||
// }
|
||||
//];
|
||||
|
||||
vm.categories = [
|
||||
{
|
||||
"id": 1,
|
||||
"icon": "icon-male-and-female",
|
||||
"name": "All",
|
||||
"active": true
|
||||
},
|
||||
{
|
||||
"icon": "icon-male-and-female",
|
||||
"name": "Collaboration"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"icon": "icon-molecular-network",
|
||||
"name": "Backoffice extensions"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"icon": "icon-brackets",
|
||||
"name": "Developer tools"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"icon": "icon-wand",
|
||||
"name": "Starter kits"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"icon": "icon-medal",
|
||||
"name": "Umbraco Pro"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"icon": "icon-wrench",
|
||||
"name": "Website utilities"
|
||||
}
|
||||
];
|
||||
//vm.packages = [
|
||||
// {
|
||||
// "id": 1,
|
||||
// "name": "uSightly",
|
||||
// "description": "An HTML5 audio player based on jPlayer",
|
||||
// "karma": "1",
|
||||
// "downloads": "1672",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/150283/635768313097111400_usightlylogopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 2,
|
||||
// "name": "Kill IE6",
|
||||
// "description": "A simple port of the IE6 warning script (http://code.google.com/p/ie6-upgrade-warning/) to use in your Umbraco websites.",
|
||||
// "karma": "11",
|
||||
// "downloads": "688",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/9138/634697622367666000_offroadcode-100x100.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 3,
|
||||
// "name": "Examine Media Indexer",
|
||||
// "description": "CogUmbracoExamineMediaIndexer",
|
||||
// "karma": "3",
|
||||
// "downloads": "1329",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/50703/634782902373558000_cogworks.jpg?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 4,
|
||||
// "name": "SVG Icon Picker",
|
||||
// "description": "A picker, for picking icons from an SVG spritesheet.",
|
||||
// "karma": "5",
|
||||
// "downloads": "8",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/154472/635997115126742822_logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 5,
|
||||
// "name": "Pipeline CRM",
|
||||
// "description": "Pipeline is a social CRM that lives in Umbraco back-office. It tracks opportunities and helps teams collaborate with timelines and tasks. It stores information about your customers and your interactions with them. It integrates with your website, capturing opportunities from forms and powering personal portals.",
|
||||
// "karma": "3",
|
||||
// "downloads": "105",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/152476/635917291068518788_pipeline-crm-logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 6,
|
||||
// "name": "uSightly",
|
||||
// "description": "An HTML5 audio player based on jPlayer",
|
||||
// "karma": "1",
|
||||
// "downloads": "1672",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/150283/635768313097111400_usightlylogopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 7,
|
||||
// "name": "Kill IE6",
|
||||
// "description": "A simple port of the IE6 warning script (http://code.google.com/p/ie6-upgrade-warning/) to use in your Umbraco websites.",
|
||||
// "karma": "11",
|
||||
// "downloads": "688",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/9138/634697622367666000_offroadcode-100x100.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 8,
|
||||
// "name": "Examine Media Indexer",
|
||||
// "description": "CogUmbracoExamineMediaIndexer",
|
||||
// "karma": "3",
|
||||
// "downloads": "1329",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/50703/634782902373558000_cogworks.jpg?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 9,
|
||||
// "name": "SVG Icon Picker",
|
||||
// "description": "A picker, for picking icons from an SVG spritesheet.",
|
||||
// "karma": "5",
|
||||
// "downloads": "8",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/154472/635997115126742822_logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// },
|
||||
// {
|
||||
// "id": 10,
|
||||
// "name": "Pipeline CRM",
|
||||
// "description": "Pipeline is a social CRM that lives in Umbraco back-office. It tracks opportunities and helps teams collaborate with timelines and tasks. It stores information about your customers and your interactions with them. It integrates with your website, capturing opportunities from forms and powering personal portals.",
|
||||
// "karma": "3",
|
||||
// "downloads": "105",
|
||||
// "icon":"https://our.umbraco.org/media/wiki/152476/635917291068518788_pipeline-crm-logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
// }
|
||||
//];
|
||||
|
||||
vm.packages = [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "uSightly",
|
||||
"description": "An HTML5 audio player based on jPlayer",
|
||||
"karma": "1",
|
||||
"downloads": "1672",
|
||||
"icon":"https://our.umbraco.org/media/wiki/150283/635768313097111400_usightlylogopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Kill IE6",
|
||||
"description": "A simple port of the IE6 warning script (http://code.google.com/p/ie6-upgrade-warning/) to use in your Umbraco websites.",
|
||||
"karma": "11",
|
||||
"downloads": "688",
|
||||
"icon":"https://our.umbraco.org/media/wiki/9138/634697622367666000_offroadcode-100x100.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Examine Media Indexer",
|
||||
"description": "CogUmbracoExamineMediaIndexer",
|
||||
"karma": "3",
|
||||
"downloads": "1329",
|
||||
"icon":"https://our.umbraco.org/media/wiki/50703/634782902373558000_cogworks.jpg?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "SVG Icon Picker",
|
||||
"description": "A picker, for picking icons from an SVG spritesheet.",
|
||||
"karma": "5",
|
||||
"downloads": "8",
|
||||
"icon":"https://our.umbraco.org/media/wiki/154472/635997115126742822_logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Pipeline CRM",
|
||||
"description": "Pipeline is a social CRM that lives in Umbraco back-office. It tracks opportunities and helps teams collaborate with timelines and tasks. It stores information about your customers and your interactions with them. It integrates with your website, capturing opportunities from forms and powering personal portals.",
|
||||
"karma": "3",
|
||||
"downloads": "105",
|
||||
"icon":"https://our.umbraco.org/media/wiki/152476/635917291068518788_pipeline-crm-logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "uSightly",
|
||||
"description": "An HTML5 audio player based on jPlayer",
|
||||
"karma": "1",
|
||||
"downloads": "1672",
|
||||
"icon":"https://our.umbraco.org/media/wiki/150283/635768313097111400_usightlylogopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Kill IE6",
|
||||
"description": "A simple port of the IE6 warning script (http://code.google.com/p/ie6-upgrade-warning/) to use in your Umbraco websites.",
|
||||
"karma": "11",
|
||||
"downloads": "688",
|
||||
"icon":"https://our.umbraco.org/media/wiki/9138/634697622367666000_offroadcode-100x100.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Examine Media Indexer",
|
||||
"description": "CogUmbracoExamineMediaIndexer",
|
||||
"karma": "3",
|
||||
"downloads": "1329",
|
||||
"icon":"https://our.umbraco.org/media/wiki/50703/634782902373558000_cogworks.jpg?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "SVG Icon Picker",
|
||||
"description": "A picker, for picking icons from an SVG spritesheet.",
|
||||
"karma": "5",
|
||||
"downloads": "8",
|
||||
"icon":"https://our.umbraco.org/media/wiki/154472/635997115126742822_logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "Pipeline CRM",
|
||||
"description": "Pipeline is a social CRM that lives in Umbraco back-office. It tracks opportunities and helps teams collaborate with timelines and tasks. It stores information about your customers and your interactions with them. It integrates with your website, capturing opportunities from forms and powering personal portals.",
|
||||
"karma": "3",
|
||||
"downloads": "105",
|
||||
"icon":"https://our.umbraco.org/media/wiki/152476/635917291068518788_pipeline-crm-logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
}
|
||||
];
|
||||
|
||||
vm.package = {
|
||||
"name": "Merchello",
|
||||
"description": "<p>Merchello is a high performance, designer friendly, open source Umbraco ecommerce package built for the store owner.</p> <p><strong>What Merchello does for you</strong></p> <p>In version 1, Merchello supports a large variety of products with options that can be attached to a single warehouse, processes orders, manages taxes and shipping, and sends out email notifications to your customers. The beauty of Merchello is that while it oversees all of your products, orders, and store settings, it allows Umbraco to maintain your content. This seamless integration gives you the flexibility to build your store in any way imagineable on a robust platform capable of handling a wide variety of store sizes.</p> <p><strong>Find out more on our website</strong></p> <p><strong><a href="https://merchello.com">https://merchello.com</a></strong></p> <p><strong>Contribute</strong></p> <p>We would love and need your help. If you want to contribute to Merchello's core, the easiest way to get started is to fork the project on https://github.com/merchello/Merchello and open src/Merchello.sln in Visual Studio. We're excited to see what you do!</p> <p><strong>Starter Kit</strong></p> <p>We have built a simple starter kit for Merchello called Bazaar, and you can download it below in the package files tab.</p>",
|
||||
"compatibility": [
|
||||
{
|
||||
"version": "7.4.x",
|
||||
"percentage": "100"
|
||||
},
|
||||
{
|
||||
"version": "7.3.x",
|
||||
"percentage": "86"
|
||||
},
|
||||
{
|
||||
"version": "7.2.x",
|
||||
"percentage": "93"
|
||||
},
|
||||
{
|
||||
"version": "7.1.x",
|
||||
"percentage": "100"
|
||||
}
|
||||
],
|
||||
"information": {
|
||||
"owner": "Rusty Swayne",
|
||||
"ownerAvatar": "https://our.umbraco.org/media/upload/d476d257-a494-46d9-9a00-56c2f94a55c8/our-profile.jpg?width=200&height=200&mode=crop",
|
||||
"ownerKarma": "2673",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Lee"
|
||||
},
|
||||
{
|
||||
"name": "Jason Prothero"
|
||||
}
|
||||
],
|
||||
"created": "18/12/2013",
|
||||
"currentVersion": "2.0.0",
|
||||
"netVersion": "4.5",
|
||||
"license": "MIT",
|
||||
"downloads": "4198",
|
||||
"karma": "53"
|
||||
},
|
||||
"externalSources": [
|
||||
{
|
||||
"name": "Source code",
|
||||
"url": "https://github.com/merchello/Merchello"
|
||||
},
|
||||
{
|
||||
"name": "Issue tracker",
|
||||
"url": "http://issues.merchello.com/youtrack/oauth?state=%2Fyoutrack%2FrootGo"
|
||||
}
|
||||
],
|
||||
"images": [
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
},
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
},
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
},
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
},
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
},
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
},
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
},
|
||||
{
|
||||
"thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
"source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
}
|
||||
]
|
||||
};
|
||||
//vm.package = {
|
||||
// "name": "Merchello",
|
||||
// "description": "<p>Merchello is a high performance, designer friendly, open source Umbraco ecommerce package built for the store owner.</p> <p><strong>What Merchello does for you</strong></p> <p>In version 1, Merchello supports a large variety of products with options that can be attached to a single warehouse, processes orders, manages taxes and shipping, and sends out email notifications to your customers. The beauty of Merchello is that while it oversees all of your products, orders, and store settings, it allows Umbraco to maintain your content. This seamless integration gives you the flexibility to build your store in any way imagineable on a robust platform capable of handling a wide variety of store sizes.</p> <p><strong>Find out more on our website</strong></p> <p><strong><a href="https://merchello.com">https://merchello.com</a></strong></p> <p><strong>Contribute</strong></p> <p>We would love and need your help. If you want to contribute to Merchello's core, the easiest way to get started is to fork the project on https://github.com/merchello/Merchello and open src/Merchello.sln in Visual Studio. We're excited to see what you do!</p> <p><strong>Starter Kit</strong></p> <p>We have built a simple starter kit for Merchello called Bazaar, and you can download it below in the package files tab.</p>",
|
||||
// "compatibility": [
|
||||
// {
|
||||
// "version": "7.4.x",
|
||||
// "percentage": "100"
|
||||
// },
|
||||
// {
|
||||
// "version": "7.3.x",
|
||||
// "percentage": "86"
|
||||
// },
|
||||
// {
|
||||
// "version": "7.2.x",
|
||||
// "percentage": "93"
|
||||
// },
|
||||
// {
|
||||
// "version": "7.1.x",
|
||||
// "percentage": "100"
|
||||
// }
|
||||
// ],
|
||||
// "information": {
|
||||
// "owner": "Rusty Swayne",
|
||||
// "ownerAvatar": "https://our.umbraco.org/media/upload/d476d257-a494-46d9-9a00-56c2f94a55c8/our-profile.jpg?width=200&height=200&mode=crop",
|
||||
// "ownerKarma": "2673",
|
||||
// "contributors": [
|
||||
// {
|
||||
// "name": "Lee"
|
||||
// },
|
||||
// {
|
||||
// "name": "Jason Prothero"
|
||||
// }
|
||||
// ],
|
||||
// "created": "18/12/2013",
|
||||
// "currentVersion": "2.0.0",
|
||||
// "netVersion": "4.5",
|
||||
// "license": "MIT",
|
||||
// "downloads": "4198",
|
||||
// "karma": "53"
|
||||
// },
|
||||
// "externalSources": [
|
||||
// {
|
||||
// "name": "Source code",
|
||||
// "url": "https://github.com/merchello/Merchello"
|
||||
// },
|
||||
// {
|
||||
// "name": "Issue tracker",
|
||||
// "url": "http://issues.merchello.com/youtrack/oauth?state=%2Fyoutrack%2FrootGo"
|
||||
// }
|
||||
// ],
|
||||
// "images": [
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// },
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// },
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// },
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// },
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// },
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// },
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// },
|
||||
// {
|
||||
// "thumbnail": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png?bgcolor=fff&height=154&width=281&format=png",
|
||||
// "source": "https://our.umbraco.org/media/wiki/104946/635591947547374885_Product-Listpng.png"
|
||||
// }
|
||||
// ]
|
||||
//};
|
||||
|
||||
function init() {
|
||||
|
||||
vm.loading = true;
|
||||
|
||||
$timeout(function () {
|
||||
vm.loading = false;
|
||||
}, 500);
|
||||
$q.all([
|
||||
ourPackageRepositoryResource.getCategories()
|
||||
.then(function(cats) {
|
||||
vm.categories = cats;
|
||||
}),
|
||||
ourPackageRepositoryResource.getPopular(10)
|
||||
.then(function(pack) {
|
||||
vm.popular = pack;
|
||||
}),
|
||||
ourPackageRepositoryResource.getLatest(vm.pagination.pageNumber - 1, vm.pagination.pageSize, "")
|
||||
.then(function(pack) {
|
||||
vm.packages = pack.packages;
|
||||
vm.pagination.totalPages = Math.ceil(pack.total / vm.pagination.pageSize);
|
||||
})
|
||||
])
|
||||
.then(function() {
|
||||
vm.loading = false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -246,7 +261,12 @@
|
||||
}
|
||||
|
||||
function showPackageDetails(selectedPackage) {
|
||||
vm.packageViewState = "packageDetails";
|
||||
ourPackageRepositoryResource.getDetails(selectedPackage.id)
|
||||
.then(function(pack) {
|
||||
vm.package = pack;
|
||||
vm.packageViewState = "packageDetails";
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function setPackageViewState(state) {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
<!-- LIST -->
|
||||
<div class="umb-packages-view-wrapper" ng-if="vm.packageViewState === 'packageList' && vm.loading === false">
|
||||
|
||||
|
||||
<hr/>
|
||||
<div class="umb-packages-section">
|
||||
<div class="umb-packages-search">
|
||||
<input class="-full-width-input" type="text" name="name" value="" placeholder="Search for packages" umb-auto-focus>
|
||||
@@ -28,7 +29,7 @@
|
||||
<h4><strong>Popular</strong></h4>
|
||||
<div class="umb-packages clearfix">
|
||||
|
||||
<div class="umb-package" ng-repeat="package in vm.packages">
|
||||
<div class="umb-package" ng-repeat="package in vm.popular">
|
||||
<a class="umb-package-link" href="" ng-click="vm.showPackageDetails(package)">
|
||||
|
||||
<div class="umb-package-icon">
|
||||
@@ -39,12 +40,12 @@
|
||||
<div class="umb-package-name">{{ package.name }}</div>
|
||||
<div class="umb-package-description">{{ package.description | limitTo: 40 }}<span ng-if="package.description > (package.description | limitTo: 40)">...</span></div>
|
||||
|
||||
<div class="umb-package-numbers">
|
||||
<div class="umb-package-numbers">
|
||||
<small class="umb-package-downloads">
|
||||
<i class="icon-download-alt"></i> <strong>{{ package.downloads }}</strong>
|
||||
</small>
|
||||
<small class="umb-package-karma">
|
||||
<i class="icon-hearts"></i> <strong>{{ package.karma }}</strong>
|
||||
<i class="icon-hearts"></i> <strong>{{ package.ownerInfo.karma }}</strong>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
@@ -75,7 +76,7 @@
|
||||
<i class="icon-download-alt"></i> <strong>{{ package.downloads }}</strong>
|
||||
</small>
|
||||
<small class="umb-package-karma">
|
||||
<i class="icon-hearts"></i> <strong>{{ package.karma }}</strong>
|
||||
<i class="icon-hearts"></i> <strong>{{ package.ownerInfo.karma }}</strong>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
@@ -137,12 +138,12 @@
|
||||
<div class="umb-package-details__section">
|
||||
<div class="umb-package-details__owner-profile">
|
||||
<div class="umb-package-details__owner-profile-avatar">
|
||||
<img class="umb-avatar" ng-src="{{vm.package.information.ownerAvatar}}" />
|
||||
<img class="umb-avatar" ng-src="{{vm.package.ownerInfo.ownerAvatar}}" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="umb-package-details__owner-profile-name">{{ vm.package.information.owner }}</div>
|
||||
<div class="umb-package-details__owner-profile-name">{{ vm.package.ownerInfo.owner }}</div>
|
||||
<div class="umb-package-details__owner-profile-karma">
|
||||
{{ vm.package.information.owner }} has <strong>{{ vm.package.information.ownerKarma }}</strong> karma points
|
||||
{{ vm.package.ownerInfo.owner }} has <strong>{{ vm.package.ownerInfo.karma }}</strong> karma points
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,24 +155,24 @@
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">Owner:</div>
|
||||
<div>{{vm.package.information.owner}}</div>
|
||||
<div>{{vm.package.ownerInfo.owner}}</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">Contributors:</div>
|
||||
<div ng-repeat="contributor in vm.package.information.contributors">
|
||||
<div ng-repeat="contributor in vm.package.ownerInfo.contributors">
|
||||
<a class="umb-package-details__link" href="{{ contributor.profileUrl }}" target="_blank">{{ contributor.name }}<span ng-if="!$last">, </span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">Created:</div>
|
||||
<div>{{vm.package.information.created}}</div>
|
||||
<div>{{vm.package.created}}</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">Current version:</div>
|
||||
<div>{{vm.package.information.created}}</div>
|
||||
<div>{{vm.package.latestVersion}}</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
@@ -181,17 +182,17 @@
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">License:</div>
|
||||
<div>{{vm.package.information.license}}</div>
|
||||
<div>{{vm.package.licenseName}}</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">Downloads:</div>
|
||||
<div>{{vm.package.information.downloads}}</div>
|
||||
<div>{{vm.package.downloads}}</div>
|
||||
</div>
|
||||
|
||||
<div class="umb-package-details__information-item">
|
||||
<div class="umb-package-details__information-item-label">Karma:</div>
|
||||
<div>{{vm.package.information.karma}}</div>
|
||||
<div>{{vm.package.ownerInfo.karma}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@ using umbraco.cms.businesslogic.packager;
|
||||
using Umbraco.Core.Models.EntityBase;
|
||||
using Umbraco.Core.Services;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
@@ -91,6 +92,17 @@ namespace Umbraco.Web.Trees
|
||||
protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var menu = new MenuItemCollection();
|
||||
|
||||
// Root actions
|
||||
menu.Items.Add<ActionNew>(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias)))
|
||||
.ConvertLegacyMenuItem(null, Constants.Trees.Packages, queryStrings.GetValue<string>("application"));
|
||||
|
||||
if (id == "created")
|
||||
{
|
||||
menu.Items.Add<RefreshNode, ActionRefresh>(
|
||||
Services.TextService.Localize(string.Format("actions/{0}", ActionRefresh.Instance.Alias)), true);
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,8 +183,8 @@ namespace umbraco.presentation.developer.packages
|
||||
else
|
||||
{
|
||||
ClientTools
|
||||
.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadPackages>().Tree.Alias)
|
||||
.SyncTree("-1,init," + loadPackages.PACKAGE_TREE_PREFIX + createdPackage.Data.Id, true);
|
||||
.SetActiveTreeType(Constants.Trees.Packages)
|
||||
.SyncTree("-1,created," + createdPackage.Data.Id, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user