diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-08-07 17:33:13 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-08-07 17:33:13 -0400 |
commit | 2804e28ef22ded73a95da4508f7630db1db3c97d (patch) | |
tree | a5be9863a5260206a5272ec895a779a37112cf4d /js | |
parent | 863d76769a7e90f00f5b003a5bcfe8758054cf27 (diff) |
Rename guix-web.js to guix-packages.js.
* guix-web (javascripts): Update.
* js/guix-packages.js: New file.
* js/guix-web.js: Delete it.
Diffstat (limited to 'js')
-rw-r--r-- | js/guix-packages.js (renamed from js/guix-web.js) | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/guix-web.js b/js/guix-packages.js index 8cdbd53..9c4c450 100644 --- a/js/guix-web.js +++ b/js/guix-packages.js @@ -40,6 +40,12 @@ guix.controller = function() { }; guix.view = function(ctrl) { + function renderName(package) { + var name = package.name; + + return m("a", { href: "/package/".concat(name) }, name); + } + function renderHomepage(package) { if(package.homepage) { return m("a", { href: package.homepage }, package.homepage); @@ -65,7 +71,6 @@ guix.view = function(ctrl) { } return [ - m("h1", "GNU Guix"), m("h2", [ "Packages", m("span.badge", ctrl.packages().length) @@ -94,7 +99,7 @@ guix.view = function(ctrl) { m("tbody", [ ctrl.visiblePackages().map(function(package) { return m("tr", [ - m("td", package.name), + m("td", renderName(package)), m("td", package.version), m("td", package.synopsis), m("td", renderHomepage(package)), |