add checkbox on results page
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 14 May 2018 19:24:59 +0000 (15:24 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 18 May 2018 15:03:02 +0000 (11:03 -0400)
TODO: display only when Javascript is enabled
TODO: styling in mobile view (want checkbox to remain to the left
      of the number if possible)

Open-ILS/src/templates/opac/parts/result/table.tt2

index d28e8ec..a9a3391 100644 (file)
                             END;
                         %]
                         <tr class="result_table_row">
-                                            <td class="results_row_count" name="results_row_count">[%
-                                                    result_count; result_count = result_count + 1
-                                                %].</td>
+                                            <td class="results_row_count" name="results_row_count">
+                                                [% IF !rec.mmr_id %]
+                                                <input type="checkbox" id="select-[% rec.bre_id %]" name="selected_record"
+                                                    class="result_record_selector" value="[% rec.bre_id %]"></input>
+                                                [% END %]
+                                                [% result_count; result_count = result_count + 1 %].
+                                            </td>
                                             <td class='result_table_pic_header'>
                                                 <a href="[% mkurl(record_url_path, add_parms, del_parms); %]">
                                                  <img alt="[% l('Book cover') %]"