|
Lines 235-244
Link Here
|
| 235 |
[%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate | html %] |
235 |
[%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate | html %] |
| 236 |
[% END %] |
236 |
[% END %] |
| 237 |
[% END %] |
237 |
[% END %] |
| 238 |
[% IF ( order.suggestionid ) %] |
238 |
|
|
|
239 |
[% SET suggestion = order.order_object.suggestion %] |
| 240 |
[% IF suggestion %] |
| 241 |
[% SET suggester = suggestion.suggester %] |
| 239 |
<br/> |
242 |
<br/> |
| 240 |
Suggested by: [% order.surnamesuggestedby | html %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby | html %] [% END %] |
243 |
Suggested by: [% suggester.surname | html %][% IF suggester.firstname %] %], [% suggester.firstname | html %] [% END %] |
| 241 |
(<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid | uri %]&op=show">suggestion #[% order.suggestionid | html %]</a>) |
244 |
(<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show">suggestion #[% suggestion.suggestionid | html %]</a>) |
| 242 |
[% END %] |
245 |
[% END %] |
| 243 |
<br /> |
246 |
<br /> |
| 244 |
[% IF ( order.order_internalnote ) %] |
247 |
[% IF ( order.order_internalnote ) %] |
|
Lines 383-392
Link Here
|
| 383 |
"biblio.active_orders+count", |
386 |
"biblio.active_orders+count", |
| 384 |
"biblio.holds+count", |
387 |
"biblio.holds+count", |
| 385 |
"biblio.items+count", |
388 |
"biblio.items+count", |
| 386 |
"biblio.suggestions.suggester", |
|
|
| 387 |
"fund", |
389 |
"fund", |
| 388 |
"current_item_level_holds+count", |
390 |
"current_item_level_holds+count", |
| 389 |
"items" |
391 |
"items", |
|
|
392 |
"suggestion.suggester" |
| 390 |
], |
393 |
], |
| 391 |
"stateSave": true, // remember state on page reload |
394 |
"stateSave": true, // remember state on page reload |
| 392 |
"drawCallback": function (settings) { |
395 |
"drawCallback": function (settings) { |
|
Lines 457-482
Link Here
|
| 457 |
result += escape_str(row.biblio.copyright_date); |
460 |
result += escape_str(row.biblio.copyright_date); |
| 458 |
} |
461 |
} |
| 459 |
} |
462 |
} |
| 460 |
var suggestions = row.biblio.suggestions; |
463 |
let suggestion = row.suggestion; |
| 461 |
if ( suggestions != null && suggestions.length > 0 ) { |
464 |
if ( suggestion.suggester != null ) { |
| 462 |
var suggestion = suggestions[0]; |
465 |
var suggester = suggestion.suggester; |
| 463 |
if ( suggestion.suggester != null ) { |
466 |
var suggested_by = []; |
| 464 |
var suggester = suggestion.suggester; |
467 |
if ( suggester.surname != null ) { |
| 465 |
var suggested_by = []; |
468 |
suggested_by.push(escape_str(suggester.surname)); |
| 466 |
if ( suggester.surname != null ) { |
469 |
} |
| 467 |
suggested_by.push(escape_str(suggester.surname)); |
470 |
if ( suggester.firstname != null ) { |
| 468 |
} |
471 |
suggested_by.push(escape_str(suggester.firstname)); |
| 469 |
if ( suggester.firstname != null ) { |
|
|
| 470 |
suggested_by.push(escape_str(suggester.firstname)); |
| 471 |
} |
| 472 |
|
| 473 |
result += "<br/>" + _("Suggested by: ") + |
| 474 |
'<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=' |
| 475 |
+ encodeURIComponent(suggestion.suggestionid) |
| 476 |
+ '&op=show">' |
| 477 |
+ suggested_by.join(", ") |
| 478 |
+ " (#" + escape_str(suggestions[0].suggestionid) + ")</a>"; // FIXME: could be changed if we allow matching multiple suggestions |
| 479 |
} |
472 |
} |
|
|
473 |
|
| 474 |
result += "<br/>" + _("Suggested by: ") + |
| 475 |
'<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=' |
| 476 |
+ encodeURIComponent(suggestion.suggestion_id) |
| 477 |
+ '&op=show">' |
| 478 |
+ suggested_by.join(", ") |
| 479 |
+ " (#" + escape_str(suggestion.suggestionid) + ")</a>"; |
| 480 |
} |
480 |
} |
| 481 |
result += '</p>'; |
481 |
result += '</p>'; |
| 482 |
} |
482 |
} |