Bug 32743: (follow-up) Add markup comments
authorOwen Leonard <oleonard@myacpl.org>
Mon, 30 Jan 2023 12:28:03 +0000 (12:28 +0000)
committerPedro Amorim <pedro.amorim@ptfs-europe.com>
Thu, 9 Feb 2023 11:40:02 +0000 (11:40 +0000)
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ac1e80400d3ab21001a5c0259a09280a7ab1cbfe)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt

index 2f34843..b3d0e7d 100644 (file)
                                         <input type="checkbox" name="close" id="close" />
                                     </li>
                                 [% END %]
-                            [% END %]
+                            [% END # /IF ( invoiceclosedate ) %]
                         </ol>
 
                         <fieldset class="rows">
                                                 [% ELSE %]
                                                     <p title="Define values in authorised value category ADJ_REASON to enable">None</p>
                                                     <input type="hidden" name="reason" id="reason_[% adjustment.adjustment_id | html %]" value="" />
-                                                [% END %]
-                                            [% END %]
+                                                [% END # /IF reasons.0 %]
+                                            [% END # /IF readonly %]
                                         </td>
                                         <td>
                                             [% IF readonly %]
                                                     <input type="checkbox" name="encumber_open" id="encumber_[% adjustment.adjustment_id | html %]"  value="[% adjustment.adjustment_id | html %]" />
                                                 [% END %]
                                             </td>
-                                        [% END %]
+                                        [% END # /IF adjustment.encumber_open  %]
                                         [% UNLESS readonly %]
                                             <td>
                                                 <a class="btn btn-default btn-xs delete_adjustment" href="/cgi-bin/koha/acqui/invoice.pl?op=del_adj&adjustment_id=[% adjustment.adjustment_id | html %]&invoiceid=[% invoiceid | html %]"><i class="fa fa-trash"></i> Delete</a>
                                             </td>
                                         [% END %]
                                     </tr>
-                                [% END %]
-                            </table>
-                        [% END %]
+                                [% END # /FOREACH adjustment %]
+                            </table> <!-- /#invoice_adj_table -->
+                        [% END # /IF adjustments %]
 
                         [% UNLESS readonly %]
                             <p>
                                             <span>None</span>
                                             <div class="hint">Define values in authorised value category ADJ_REASON to enable</div>
                                         </li>
-                                    [% END %]
+                                    [% END # /IF reasons.0 %]
                                     <li>
                                         <label for="note_new">Note: </label>
                                         <input type="text" name="note" id="note_new" value=""/>
                                         <a href="#" id="cancel_invoice_adjustment" class="toggle_invoice_adjustment" style="display:none"><i class="fa fa-remove"></i> Cancel</a>
                                     </li>
                                 </ol>
-                            </fieldset>
+                            </fieldset> <!-- /#add_invoice_adjustment -->
                             <fieldset class="action">
                                 <input type="hidden" name="op" value="mod_adj" />
                                 <input type="submit" class="btn btn-primary" value="Update adjustments" />
                             </fieldset>
-                        [% END %]
+                        [% END #/UNLESS readonly %]
                     </fieldset>
                 </form>
 
                                             <a href="#" class="modify_fund" data-order_id="[% order.ordernumber | html %]" data-budget_id="[% order.budget_id | html %]" data-sort_1="[% order.sort1 | html %]" data-sort_2="[% order.sort2 | html %]" data-sort1="[% order.sort1 | html %]" data-sort2="[% order.sort2 | html %]">Modify fund</a>
                                         </td>
                                     </tr>
-                                [% END %]
+                                [% END # /FOREACH order %]
                             </tbody>
                             <tfoot>
                                 [% FOR tf IN foot_loop %]
                                         <th>[% tf.tax_value | $Price %]</th>
                                         <th>&nbsp;</th>
                                     </tr>
-                                [% END %]
+                                [% END # /FOR tf %]
                                 <tr>
                                     <th colspan="2">Total ([% currency.symbol | html %])</th>
                                     <th class="tax_excluded"></th>
                                     <th>&nbsp;</th>
                                 </tr>
                             </tfoot>
-                        </table>
+                        </table> <!-- /#orderst -->
                     [% ELSE %]
                         <div class="dialog message">
                             <p>No orders yet</p>
                                 <p>Adjustments plus shipping: [% total_adj + shipmentcost | $Price %]</p>
                             [% END %]
                         </div>
-                    [% END %]
+                    [% END # /IF orders_loop.size %]
                     [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %]
                         <br />
                         <h2>Files attached to invoice</h2>
                                     </tr>
                                 [% END %]
                             </tbody>
-                        </table>
-                    [% END %]
+                        </table> <!-- /#invoice_files_table -->
+                    [% END # /IF AcqEnableFiles %]
                 </fieldset>
             </main>
         </div> <!-- /.col-sm-10.col-sm-push-2 -->
             </div>
             <div class="modal-footer">
                 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
-            </div>
-        </div>
-    </div>
-</div>
+            </div> <!-- /.modal-footer -->
+        </div> <!-- /.modal-content -->
+    </div> <!-- /.modal-dialog -->
+</div> <!-- /#updateFund.modal -->
 
 <span style="display:none;" id="all_fund_dropdown">
     [% FOREACH budget IN budgets %]
         [% ELSE %]
             <option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat |html %]">[% budget.b_txt | html %] (inactive)</option>
         [% END %]
-    [% END %]
-</span>
+    [% END # /FOREACH budget %]
+</span> <!-- /#all_fund_dropdown -->
 
 [% MACRO jsinclude BLOCK %]
     [% Asset.js("js/acquisitions-menu.js") | $raw %]