TPAC: show patron-visible notes in my-account
authorBill Erickson <berick@esilibrary.com>
Tue, 19 Jun 2012 18:24:33 +0000 (14:24 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 17 Jul 2012 16:51:04 +0000 (12:51 -0400)
Notes display in the 'Account Summary' box on the first page of
my-account.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates/opac/parts/myopac/main_base.tt2

index 5038851..8e40799 100644 (file)
@@ -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;
 }
 
index 9acb4ce..922b783 100644 (file)
                     </tr>
                 </table>
             </div>
+
+            [% IF ctx.user.notes.0 %]
+            <div class="acct_sum_row">
+                <table>
+                [% FOR note IN ctx.user.notes %]
+                    <tr><td class='public-note-title'>[% l('* [_1]: ', note.title) | html %]</td><td>[% note.value | html %]</td></tr>
+                [% END %]
+                </table>
+            </div>
+            [% END %]
         </div>
     </div>
     <div class="clear-both"></div>