From: Jakub Skoczen Date: Thu, 3 Mar 2011 13:10:09 +0000 (+0100) Subject: User link/recipe logic X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=6a0a28756c9223edd39919b00a95de83f7ec2770;p=mkdruding2.git User link/recipe logic --- diff --git a/mkdruding2.js b/mkdruding2.js index d74b6bb..8321feb 100644 --- a/mkdruding2.js +++ b/mkdruding2.js @@ -1,10 +1,13 @@ Drupal.theme.mkdruResult = function(hit, num, detailLink) { + var link = choose_url(hit); + if (!link) link = choose_url(hit['location'][0]); var html = ""; html += '
  • ' - + '

    ' - + '' - + hit["md-title"] + '

    '; + + '

    '; + if (link) html += ''; + html += hit["md-title"]; + if (link) html += ''; + html += '

    '; html += '
    ' + '

    ' + '
    '