From: Bill Erickson Date: Tue, 19 Jun 2012 18:24:33 +0000 (-0400) Subject: TPAC: show patron-visible notes in my-account X-Git-Tag: sprint4-merge-nov22~4102 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b1727008e92003d04558c310310eae95fed8959b;p=working%2FEvergreen.git TPAC: show patron-visible notes in my-account Notes display in the 'Account Summary' box on the first page of my-account. Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 5038851c08..8e40799edd 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1436,7 +1436,12 @@ sub load_myopac_main { my $limit = $self->cgi->param('limit') || 0; my $offset = $self->cgi->param('offset') || 0; $self->ctx->{search_ou} = $self->_get_search_lib(); - + $self->ctx->{user}->notes( + $self->editor->search_actor_usr_note({ + usr => $self->ctx->{user}->id, + pub => 't' + }) + ); return $self->prepare_fines($limit, $offset) || Apache2::Const::OK; } diff --git a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 index 9acb4ce93c..922b783b83 100644 --- a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 +++ b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 @@ -81,6 +81,16 @@ + + [% IF ctx.user.notes.0 %] +
+ + [% FOR note IN ctx.user.notes %] + + [% END %] +
[% l('* [_1]: ', note.title) | html %][% note.value | html %]
+
+ [% END %]