X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=1871750510b759d719d82e831a591cf0b916c2a2;hb=c0ec0ac847e2587a3efccdb7e47958451765a9a5;hp=7e660f6b1bf18d1879972800dcf7ab5996d0841e;hpb=26900b02cc656a600d67454547cf1699174c713b;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.theme.js b/mkdru.theme.js index 7e660f6..1871750 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,40 @@ 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, selections) { + var html = ""; + for (var i = 0; i < terms.length && i < max; i++ ) { + var term = terms[i]; + html += '
'; + } + //TODO, meed to look up target name from ID + var sel = selections[facet]; + if (terms.length == 0 && sel && sel.length) { + for (var i=0; i'+sel[i]+'
(0)
'; + } + } + } return html; -}; \ No newline at end of file +}; + +Drupal.theme.prototype.mkdruFacetContainer = function (facets, facetCfg) { + return ""; +};