X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=875d0f341df25a4972b2aa61e2cb54931824ccc0;hb=895c5ddc7ab1754bc7a97c5af9132e22557f49ca;hp=7e660f6b1bf18d1879972800dcf7ab5996d0841e;hpb=26900b02cc656a600d67454547cf1699174c713b;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.theme.js b/mkdru.theme.js index 7e660f6..875d0f3 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -17,30 +17,38 @@ Drupal.theme.prototype.mkdruResult = function(hit, num, detailLink) { return html; }; -Drupal.theme.prototype.mkdruDetail = function(data) { - var html = ''; +Drupal.theme.prototype.mkdruDetail = function(data, linkBack) { + var html = '
'; if (data["md-title"] != undefined) { - html += ''; + html += ''; } if (data["md-date"] != undefined) - html += ''; + html += ''; if (data["md-author"] != undefined) - html += ''; + html += ''; if (data["md-electronic-url"] != undefined) - html += ''; + html += ''; if (data["location"][0]["md-subject"] != undefined) - html += ''; + html += ''; if (data["location"][0]["@name"] != undefined) - html += ''; + html += ''; html += '
Title: '+data["md-title"]; - if (data["md-title-remainder"] !== undefined) { - html += ' : ' + data["md-title-remainder"] + ' '; - } - if (data["md-title-responsibility"] !== undefined) { - html += ' '+ data["md-title-responsibility"] +''; - } - html += '
' + Drupal.t("Title") + ': ' + + data["md-title"]; + if (data["md-title-remainder"] !== undefined) { + html += ' : ' + data["md-title-remainder"] + ' '; + } + if (data["md-title-responsibility"] !== undefined) { + html += ' '+ data["md-title-responsibility"] +''; + } + html += '
Date: ' + data["md-date"] + '
' + Drupal.t("Date") + ': ' + + data["md-date"] + '
Author: ' + data["md-author"] + '
' + Drupal.t("Author") + ': ' + + data["md-author"] + '
URL: ' + data["md-electronic-url"] + '' + '
URL: ' + + data["md-electronic-url"] + '' + '
Subject: ' + data["location"][0]["md-subject"] + '
' + Drupal.t("Subject") + ': ' + + data["location"][0]["md-subject"] + '
Location: ' + data["location"][0]["@name"] + " (" +data["location"][0]["@id"] + ")" + '
' + Drupal.t("Location") + ': ' + + data["location"][0]["@name"] + " (" + data["location"][0]["@id"] + ")" + + '
'; - html += 'Return to result list...'; + html += 'Return to result list...'; return html; }; @@ -92,10 +100,42 @@ Drupal.theme.prototype.mkdruPager = function (pages, start, current, total, prev return html; }; -Drupal.theme.prototype.mkdruTerm = function (term, freq, linkClass, id) { - var html = '' + term + ' (' + freq + ')
'; +Drupal.theme.prototype.mkdruCounts = function(first, last, available, total) { + return first + Drupal.t(' to ') + last + Drupal.t(' of ') + available + + Drupal.t(' available (') + total + Drupal.t(' found)'); +}; + +Drupal.theme.prototype.mkdruStatus = function(activeClients, clients) { + return Drupal.t('Waiting on ') + activeClients + Drupal.t(' out of ') + + clients + Drupal.t(' targets'); +}; + +Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) { + var html = ""; + for (var i = 0; i < terms.length && i < max; i++ ) { + html += Drupal.theme('mkdruFacetTerm', terms[i], facet); + } return html; +}; + +Drupal.theme.prototype.mkdruFacetTerm = function (term, facet) { + var html = '' + term.name + ' (' + term.freq + ')
'; + return html; +}; + +Drupal.theme.prototype.mkdruFacetLimit = function (term, link) { + if (term) { + return '

' + Drupal.t('Only displaying ') + term.name + '

' + + '

' + Drupal.t('Show all...') + '

'; + } }; \ No newline at end of file