View | Details | Raw Unified | Return to bug 10249
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-12 / +11 lines)
Lines 184-200 $(function () { Link Here
184
          }, function (data) {
184
          }, function (data) {
185
185
186
            if (data.auth_status != 'ok') {
186
            if (data.auth_status != 'ok') {
187
              window.alert('Your CGI session cookie is not current. Please refresh the page and try again.');
187
              window.alert(_("Your CGI session cookie is not current. Please refresh the page and try again."));
188
            } else {
188
            } else {
189
              $("#rating_value").val(data.rating_value);
189
              $("#rating_value").val(data.rating_value);
190
190
191
              if (data.rating_value) {
191
              if (data.rating_value) {
192
                $("#rating_value_text").text('your rating: ' + data.rating_value + ', ');
192
                $("#rating_value_text").text(_("your rating:") + ' ' + data.rating_value + ', ');
193
              } else {
193
              } else {
194
                $("#rating_value_text").text('');
194
                $("#rating_value_text").text('');
195
              }
195
              }
196
196
197
              $("#rating_text").text('average rating: ' + data.rating_avg_int + ' (' + data.rating_total + ' votes)');
197
              $("#rating_text").text(_("average rating:") + " " + data.rating_avg_int + ' (' + data.rating_total + ' votes)');
198
198
199
            }
199
            }
200
          }, "json");
200
          }, "json");
Lines 317-323 function renderPagIndexList(index, ul) Link Here
317
    var ini = index - 1;
317
    var ini = index - 1;
318
    var end = ini + totalPagItemList - 1;
318
    var end = ini + totalPagItemList - 1;
319
    li = $("<li />");
319
    li = $("<li />");
320
    html = (index > pag_index_ini)?"<a href='#' id='rew_list_index' onclick='rewindList()' title='Click to rewind the list to " + ini + " - " + end + "'>&laquo;</a>":"&laquo;";
320
    html = (index > pag_index_ini)?"<a href='#' id='rew_list_index' onclick='rewindList()' title='" + _("Click to rewind the list to") + " " + ini + " - " + end + "'>&laquo;</a>":"&laquo;";
321
    li.html(html);
321
    li.html(html);
322
    ul.append(li);
322
    ul.append(li);
323
    var title = "";
323
    var title = "";
Lines 325-333 function renderPagIndexList(index, ul) Link Here
325
        if (arrPagination[i] == undefined) continue;
325
        if (arrPagination[i] == undefined) continue;
326
        var li = $("<li />");
326
        var li = $("<li />");
327
        if (arrPagination[i].url != "") {
327
        if (arrPagination[i].url != "") {
328
            title = "See biblio &quot;" + arrPagination[i].title + "&quot; ";
328
            title = _("See biblio") + " &quot;" + arrPagination[i].title + "&quot; ";
329
            if (arrPagination[i].author != "") title += " by &quot;" + arrPagination[i].author + "&quot;";
329
            if (arrPagination[i].author != "") title += " " + _("by") + "&quot;" + arrPagination[i].author + "&quot;";
330
            title += " with biblionumber " + arrPagination[i].biblionumber;
330
            title += " " + _("with biblionumber") + " " + arrPagination[i].biblionumber;
331
            html = "<a href='" + arrPagination[i].url + "' title='" + title + "' class='a_pag' id='a_pag_" + i + "'";
331
            html = "<a href='" + arrPagination[i].url + "' title='" + title + "' class='a_pag' id='a_pag_" + i + "'";
332
            html += " onmouseover='renderPagination(" + i + ", " + (arrPagination.length - 1) + ", $(\"#ul_pagination_list\"), true)'";
332
            html += " onmouseover='renderPagination(" + i + ", " + (arrPagination.length - 1) + ", $(\"#ul_pagination_list\"), true)'";
333
            html += ">" + i + "</a>";
333
            html += ">" + i + "</a>";
Lines 339-345 function renderPagIndexList(index, ul) Link Here
339
    li = $("<li />");
339
    li = $("<li />");
340
    ini = index + 1;
340
    ini = index + 1;
341
    end = (arrPagination.length > index + totalPagItemList)?index + totalPagItemList:arrPagination.length - 1;
341
    end = (arrPagination.length > index + totalPagItemList)?index + totalPagItemList:arrPagination.length - 1;
342
    html = (end <= arrPagination.length - 1 && (end - index) >= totalPagItemList)?"<a href='#' id='fw_list_index' onclick='forwardList()' title='Click to forward the list to " + ini + " - " + end + "'>&raquo;</a>":"&raquo;";
342
    html = (end <= arrPagination.length - 1 && (end - index) >= totalPagItemList)?"<a href='#' id='fw_list_index' onclick='forwardList()' title='" + _("Click to forward the list to") + " " + ini + " - " + end + "'>&raquo;</a>":"&raquo;";
343
    li.html(html);
343
    li.html(html);
344
    ul.append(li);
344
    ul.append(li);
345
}//renderPagIndexList
345
}//renderPagIndexList
Lines 354-360 function renderPagination(index, total, ul, highlIndex) Link Here
354
    var j = 0;
354
    var j = 0;
355
    for (var i = index; i <= total && j < totalPagItemList; i++) {
355
    for (var i = index; i <= total && j < totalPagItemList; i++) {
356
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
356
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
357
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='Go to detail' />");
357
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
358
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
358
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
359
        if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
359
        if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
360
        li.html(html);
360
        li.html(html);
Lines 365-373 function renderPagination(index, total, ul, highlIndex) Link Here
365
    for (i = pag_index_ini; i < index && j < totalPagItemList; i++) {
365
    for (i = pag_index_ini; i < index && j < totalPagItemList; i++) {
366
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
366
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
367
        $("#li_pag_" + i).remove();
367
        $("#li_pag_" + i).remove();
368
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='Go to detail' />");
368
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
369
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
369
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
370
        if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
370
        if (arrPagination[i].author) html += "<br /> " + _("by") + " " + arrPagination[i].author;
371
        li.html(html);
371
        li.html(html);
372
        ul.append(li);
372
        ul.append(li);
373
        j++;
373
        j++;
374
- 

Return to bug 10249