Skip to content

Commit

Permalink
fix #169 + adds links in archive results for /ta artists/event/broadc…
Browse files Browse the repository at this point in the history
…ast/show pages
  • Loading branch information
ptberry authored and gsf committed Jun 12, 2015
1 parent 9aa9824 commit 4a2b43d
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions render/archive/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,24 @@ function getSites (item) {
}

function getLink (item) {
if (item.type == 'broadcast' || item.type == 'show') {
return {href: '/wgxc/schedule/' + item.id}
if ((item.type == 'broadcast' || item.type == 'show') && item.sites) {
if (item.sites.indexOf('wgxc') != -1) {
return {href: '/wgxc/schedule/' + item.id}
}
if (item.sites.indexOf('transmissionarts') != -1) {
return {href: '/ta/schedule/' + item.id}
}
}
if (item.type == 'event' && item.sites && item.sites.indexOf('wgxc') != -1) {
return {href: '/wgxc/calendar/' + item.id}
if (item.type == 'event' && item.sites) {
if (item.sites.indexOf('wgxc') != -1) {
return {href: '/wgxc/calendar/' + item.id}
}
if (item.sites.indexOf('transmissionarts') != -1) {
return {href: '/ta/calendar/' + item.id}
}
}
if (item.type == 'artist' && item.categories && item.categories.indexOf('Transmission Artist') != -1) {
return {href: '/ta/artists/' + item.id}
}
return {
href: '/archive/' + item.id,
Expand Down

0 comments on commit 4a2b43d

Please sign in to comment.