X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=mkdru.theme.js;h=229c482dd6c7870c8f68582a3fbb24ea63dcce5b;hb=2b68f65389b08c871a2ef05550adb5b1b37ab771;hp=a3a0c0e1f8fb0208c72b84490c6ba331695afc86;hpb=2b5e7db83479b99d46023a9e832d374f66fad453;p=mkdru-moved-to-drupal.org.git diff --git a/mkdru.theme.js b/mkdru.theme.js index a3a0c0e..229c482 100644 --- a/mkdru.theme.js +++ b/mkdru.theme.js @@ -17,7 +17,7 @@ Drupal.theme.prototype.mkdruResult = function(hit, num, detailLink) { return html; }; -Drupal.theme.prototype.mkdruDetail = function(data) { +Drupal.theme.prototype.mkdruDetail = function(data, linkBack) { var html = ''; if (data["md-title"] != undefined) { html += ''; html += '
' + Drupal.t("Title") + ': ' @@ -48,7 +48,7 @@ Drupal.theme.prototype.mkdruDetail = function(data) { + data["location"][0]["@name"] + " (" + data["location"][0]["@id"] + ")" + '
'; - html += 'Return to result list...'; + html += 'Return to result list...'; return html; }; @@ -100,32 +100,47 @@ Drupal.theme.prototype.mkdruPager = function (pages, start, current, total, prev return html; }; -Drupal.theme.prototype.mkdruFacet = function (terms, facet, max) { +Drupal.theme.prototype.mkdruCounts = function(first, last, available, total) { + if (last > 0) + return first + Drupal.t(' to ') + last + Drupal.t(' of ') + available + + Drupal.t(' available (') + total + Drupal.t(' found)'); + else + return Drupal.t('No results'); +}; + +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++ ) { - html += Drupal.theme('mkdruFacetTerm', terms[i], facet); + var term = terms[i]; + html += '
'; } - return html; -}; - -Drupal.theme.prototype.mkdruFacetTerm = function (term, facet) { - var html = '
'+name+' (0)
'; + } + } } - 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 +Drupal.theme.prototype.mkdruFacetContainer = function (facetsCfg) { + return ""; +};