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 170-186 $(function () { Link Here
170
          }, function (data) {
170
          }, function (data) {
171
171
172
            if (data.auth_status != 'ok') {
172
            if (data.auth_status != 'ok') {
173
              window.alert('Your CGI session cookie is not current. Please refresh the page and try again.');
173
              window.alert(_("Your CGI session cookie is not current. Please refresh the page and try again."));
174
            } else {
174
            } else {
175
              $("#rating_value").val(data.rating_value);
175
              $("#rating_value").val(data.rating_value);
176
176
177
              if (data.rating_value) {
177
              if (data.rating_value) {
178
                $("#rating_value_text").text('your rating: ' + data.rating_value + ', ');
178
                $("#rating_value_text").text(_("your rating:") + ' ' + data.rating_value + ', ');
179
              } else {
179
              } else {
180
                $("#rating_value_text").text('');
180
                $("#rating_value_text").text('');
181
              }
181
              }
182
182
183
              $("#rating_text").text('average rating: ' + data.rating_avg_int + ' (' + data.rating_total + ' votes)');
183
              $("#rating_text").text(_("average rating:") + " " + data.rating_avg_int + ' (' + data.rating_total + ' votes)');
184
184
185
            }
185
            }
186
          }, "json");
186
          }, "json");
Lines 303-309 function renderPagIndexList(index, ul) Link Here
303
    var ini = index - 1;
303
    var ini = index - 1;
304
    var end = ini + totalPagItemList - 1;
304
    var end = ini + totalPagItemList - 1;
305
    li = $("<li />");
305
    li = $("<li />");
306
    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;";
306
    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;";
307
    li.html(html);
307
    li.html(html);
308
    ul.append(li);
308
    ul.append(li);
309
    var title = "";
309
    var title = "";
Lines 311-319 function renderPagIndexList(index, ul) Link Here
311
        if (arrPagination[i] == undefined) continue;
311
        if (arrPagination[i] == undefined) continue;
312
        var li = $("<li />");
312
        var li = $("<li />");
313
        if (arrPagination[i].url != "") {
313
        if (arrPagination[i].url != "") {
314
            title = "See biblio &quot;" + arrPagination[i].title + "&quot; ";
314
            title = _("See biblio") + " &quot;" + arrPagination[i].title + "&quot; ";
315
            if (arrPagination[i].author != "") title += " by &quot;" + arrPagination[i].author + "&quot;";
315
            if (arrPagination[i].author != "") title += " " + _("by") + "&quot;" + arrPagination[i].author + "&quot;";
316
            title += " with biblionumber " + arrPagination[i].biblionumber;
316
            title += " " + _("with biblionumber") + " " + arrPagination[i].biblionumber;
317
            html = "<a href='" + arrPagination[i].url + "' title='" + title + "' class='a_pag' id='a_pag_" + i + "'";
317
            html = "<a href='" + arrPagination[i].url + "' title='" + title + "' class='a_pag' id='a_pag_" + i + "'";
318
            html += " onmouseover='renderPagination(" + i + ", " + (arrPagination.length - 1) + ", $(\"#ul_pagination_list\"), true)'";
318
            html += " onmouseover='renderPagination(" + i + ", " + (arrPagination.length - 1) + ", $(\"#ul_pagination_list\"), true)'";
319
            html += ">" + i + "</a>";
319
            html += ">" + i + "</a>";
Lines 325-331 function renderPagIndexList(index, ul) Link Here
325
    li = $("<li />");
325
    li = $("<li />");
326
    ini = index + 1;
326
    ini = index + 1;
327
    end = (arrPagination.length > index + totalPagItemList)?index + totalPagItemList:arrPagination.length - 1;
327
    end = (arrPagination.length > index + totalPagItemList)?index + totalPagItemList:arrPagination.length - 1;
328
    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;";
328
    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;";
329
    li.html(html);
329
    li.html(html);
330
    ul.append(li);
330
    ul.append(li);
331
}//renderPagIndexList
331
}//renderPagIndexList
Lines 340-346 function renderPagination(index, total, ul, highlIndex) Link Here
340
    var j = 0;
340
    var j = 0;
341
    for (var i = index; i <= total && j < totalPagItemList; i++) {
341
    for (var i = index; i <= total && j < totalPagItemList; i++) {
342
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
342
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
343
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='Go to detail' />");
343
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
344
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
344
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
345
        if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
345
        if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
346
        li.html(html);
346
        li.html(html);
Lines 351-359 function renderPagination(index, total, ul, highlIndex) Link Here
351
    for (i = pag_index_ini; i < index && j < totalPagItemList; i++) {
351
    for (i = pag_index_ini; i < index && j < totalPagItemList; i++) {
352
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
352
        if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
353
        $("#li_pag_" + i).remove();
353
        $("#li_pag_" + i).remove();
354
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='Go to detail' />");
354
        var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
355
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
355
        var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
356
        if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
356
        if (arrPagination[i].author) html += "<br /> " + _("by") + " " + arrPagination[i].author;
357
        li.html(html);
357
        li.html(html);
358
        ul.append(li);
358
        ul.append(li);
359
        j++;
359
        j++;
360
- 

Return to bug 10249