Bug 14790 - Add OPAC view link to items editor
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / members-update.tt
index 38b022c..47a5a07 100644 (file)
@@ -1,3 +1,6 @@
+[% USE Branches %]
+[% USE Categories %]
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Patrons &rsaquo; Update patron records</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'patron-search.inc' %]
 
-[%
-    SET field_display_names = {
-        surname         => "Surname"
-        firstname       => "First name"
-        title           => "Title"
-        othernames      => "Other names"
-        initials        => "Initials"
-        streetnumber    => "Street number"
-        streettype      => "Street type"
-        address         => "Address"
-        address2        => "Address 2"
-        city            => "City"
-        state           => "State"
-        zipcode         => "Zip code"
-        country         => "Country"
-        email           => "Email"
-        phone           => "Primary Phone"
-        mobile          => "Primary Mobile Phone"
-        fax             => "Fax"
-        emailpro        => "Secondary email"
-        phonepro        => "Secondary phone"
-        B_streetnumber  => "Alternate address - street number"
-        B_streettype    => "Alternate address - street type"
-        B_address       => "Alternate address"
-        B_address2      => "Alternate address 2"
-        B_city          => "Alternate address - city"
-        B_state         => "Alternate address - state"
-        B_zipcode       => "Alternate address - zip code"
-        B_email         => "Alternate address - email"
-        B_phone         => "Alternate address - phone"
-        contactnote     => "Alternate address - contact note"
-        dateofbirth     => "Date of birth"
-        contactname     => "Contact - last name"
-        contactfirstname=> "Contact - first name"
-        contacttitle    => "Contact - title"
-        relationship    => "Contact - relationship"
-        ethnicity       => "Ethnicity"
-        ethnotes        => "Ethnicity notes"
-        sex             => "Sex"
-        altcontactfirstname => "Alternate contact - first name"
-        altcontactsurname   => "Alternate contact - surname"
-        altcontactaddress1  => "Alternate contact - address"
-        altcontactaddress2  => "Alternate contact - address 2"
-        altcontactaddress3  => "Alternate contact - city"
-        altcontactstate     => "Alternate contact - state"
-        altcontactzipcode   => "Alternate contact - zip code"
-        altcontactcountry   => "Alternate contact - country"
-        altcontactphone     => "Alternate contact - phone"
-        smsalertnumber      => "SMS alert number"
-    }
-%]
+[% BLOCK display_names %]
+[% SWITCH field %]
+[% CASE 'branchcode'          %]<span>Home library (branchcode)</span>
+[% CASE 'surname'             %]<span>Surname</span>
+[% CASE 'firstname'           %]<span>First name</span>
+[% CASE 'title'               %]<span>Title</span>
+[% CASE 'othernames'          %]<span>Other names</span>
+[% CASE 'initials'            %]<span>Initials</span>
+[% CASE 'streetnumber'        %]<span>Street number</span>
+[% CASE 'streettype'          %]<span>Street type</span>
+[% CASE 'address'             %]<span>Address</span>
+[% CASE 'address2'            %]<span>Address 2</span>
+[% CASE 'city'                %]<span>City</span>
+[% CASE 'state'               %]<span>State</span>
+[% CASE 'zipcode'             %]<span>ZIP/Postal code</span>
+[% CASE 'country'             %]<span>Country</span>
+[% CASE 'email'               %]<span>Email</span>
+[% CASE 'phone'               %]<span>Primary phone</span>
+[% CASE 'mobile'              %]<span>Other phone</span>
+[% CASE 'fax'                 %]<span>Fax</span>
+[% CASE 'emailpro'            %]<span>Secondary email</span>
+[% CASE 'phonepro'            %]<span>Secondary phone</span>
+[% CASE 'B_streetnumber'      %]<span>Alternate address: Street number</span>
+[% CASE 'B_streettype'        %]<span>Alternate address: Street type</span>
+[% CASE 'B_address'           %]<span>Alternate address: Address</span>
+[% CASE 'B_address2'          %]<span>Alternate address: Address 2</span>
+[% CASE 'B_city'              %]<span>Alternate address: City</span>
+[% CASE 'B_state'             %]<span>Alternate address: State</span>
+[% CASE 'B_zipcode'           %]<span>Alternate address: ZIP/Postal code</span>
+[% CASE 'B_email'             %]<span>Alternate address: Email</span>
+[% CASE 'B_phone'             %]<span>Alternate address: Phone</span>
+[% CASE 'contactnote'         %]<span>Alternate address: Contact note</span>
+[% CASE 'dateofbirth'         %]<span>Date of birth</span>
+[% CASE 'contactname'         %]<span>Contact: Last name</span>
+[% CASE 'contactfirstname'    %]<span>Contact: First name</span>
+[% CASE 'contacttitle'        %]<span>Contact: Title</span>
+[% CASE 'relationship'        %]<span>Contact: Relationship</span>
+[% CASE 'sex'                 %]<span>Sex</span>
+[% CASE 'altcontactfirstname' %]<span>Alternate contact: First name</span>
+[% CASE 'altcontactsurname'   %]<span>Alternate contact: Surname</span>
+[% CASE 'altcontactaddress1'  %]<span>Alternate contact: Address</span>
+[% CASE 'altcontactaddress2'  %]<span>Alternate contact: Address 2</span>
+[% CASE 'altcontactaddress3'  %]<span>Alternate contact: City</span>
+[% CASE 'altcontactstate'     %]<span>Alternate contact: State</span>
+[% CASE 'altcontactzipcode'   %]<span>Alternate contact: ZIP/Postal code</span>
+[% CASE 'altcontactcountry'   %]<span>Alternate contact: Country</span>
+[% CASE 'altcontactphone'     %]<span>Alternate contact: Phone</span>
+[% CASE 'smsalertnumber'      %]<span>SMS alert number</span>
+[% CASE %][% field %]
+[% END %]
+[% END %]
+
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo; Update patron records</div>
 
 <div id="doc2" class="yui-t7">
@@ -75,7 +79,7 @@
                     <div id="pending_updates">
                             [% FOREACH pm IN PendingModifications %]
                                 [% SET borrowernumber = pm.borrowernumber %]
-                                <h3><a href="#panel_modify_[% pm.borrowernumber %]">[% borrowers.$borrowernumber.surname %], [% borrowers.$borrowernumber.firstname %]</a></h3>
+                                <h3><a href="#panel_modify_[% pm.borrowernumber %]">[% borrowers.$borrowernumber.surname %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname %][% END %] - [% Categories.GetName( borrowers.$borrowernumber.categorycode ) %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) %]) ([% borrowers.$borrowernumber.cardnumber %])</a></h3>
                                 <div id="panel_modify_[% pm.borrowernumber %]">
                                     <div style="background-color:#E6F0F2;padding:.5em;margin:.3em 0;">
                                         <input type="radio" id="approve_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="approve" />
 
                                         <input type="radio" id="ignore_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="ignore" checked="checked"/>
                                         <label for="ignore_modify_[% pm.borrowernumber %]">Ignore</label>
+                                        | <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber %]" >Patron details</a>
                                     </div>
                                         <table>
                                             <tr>
                                                 <th>Field</th>
-                                                <th>From</th>
-                                                <th>To</th>
+                                                <th>Old value</th>
+                                                <th>New value</th>
                                             </tr>
 
 
                                             [% FOREACH key IN pm.keys %]
-                                                [% IF field_display_names.$key %]
+                                                [% IF ( key != "timestamp" ) %]
                                                     [% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %]
                                                         <tr>
-                                                            <td>[% field_display_names.$key %]</td>
-                                                            <td>[% borrowers.$borrowernumber.$key %]</td>
-                                                            <td>[% pm.$key %]</td>
+                                                            <td>[% PROCESS display_names field = key %]</td>
+                                                            [% IF ( key == "dateofbirth" ) %]
+                                                                <td>[% borrowers.$borrowernumber.$key | $KohaDates %]</td>
+                                                                <td>[% pm.$key | $KohaDates %]</td>
+                                                            [% ELSE %]
+                                                                <td>[% borrowers.$borrowernumber.$key %]</td>
+                                                                <td>[% pm.$key %]</td>
+                                                            [% END %]
                                                         </tr>
                                                     [% END %]
                                                 [% END %]