LP#1776003: show codes throughout the Physical Characteristics Wizard
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 22 May 2019 18:57:52 +0000 (14:57 -0400)
committerJane Sandberg <sandbej@linnbenton.edu>
Mon, 29 Jul 2019 20:23:41 +0000 (13:23 -0700)
This patch extends on the previous one to show the code (as well as the
label) in all drop-downs used in the Physical Characteristics Wizard. It
also makes the drop-down text accessible for translations, in case there
are any locales where "code: label" is not preferred.

This patch also adds release notes.

To test
-------
[1] Apply the patches and use the web staff MARC editor to edit or
    create an 007 field, then use the Physical Characteristics Wizard.
[2] Verify that the drop-downs now display both the code and the label
    for each value.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/templates/staff/cat/share/t_physchar_wizard.tt2
docs/RELEASE_NOTES_NEXT/Cataloging/Show_Codes_in_Physical_Characteristics_Wizard.adoc [new file with mode: 0644]

index b94374c..2f1c26c 100644 (file)
       <div class="col-md-4">
         <div class="btn-group" uib-dropdown>
           <button type="button" class="btn btn-default" uib-dropdown-toggle>
-           <span style="padding-right: 5px;" ng-if="selected_option">{{selected_option.label()}}</span>
+           <span style="padding-right: 5px;" ng-if="selected_option">[% l('[_1]: [_2]', '{{selected_option.ptype_key()}}', '{{selected_option.label()}}') %]</span>
            <span style="padding-right: 5px;" ng-if="!selected_option">[% l('<unset>') | html %]</span>
            <span class="caret"></span>
          </button>
          <ul uib-dropdown-menu>
            <li ng-repeat="option in values_for_step">
              <a href ng-click="change_ptype(option)">
-              {{option.ptype_key()}}: {{option.label()}}
+              [% l('[_1]: [_2]', '{{option.ptype_key()}}', '{{option.label()}}') %]
              </a>
            </li>
          </ul>
       <div class="col-md-6">
         <div class="btn-group" uib-dropdown>
           <button type="button" class="btn btn-default" uib-dropdown-toggle>
-           <span style="padding-right: 5px;" ng-if="selected_option">{{selected_option.label()}}</span>
+           <span style="padding-right: 5px;" ng-if="selected_option">[% l('[_1]: [_2]', '{{selected_option.value()}}', '{{selected_option.label()}}') %]</span>
            <span style="padding-right: 5px;" ng-if="!selected_option">[% l('<unset>') | html %]</span>
            <span class="caret"></span>
          </button>
          <ul uib-dropdown-menu>
            <li ng-repeat="option in values_for_step">
              <a href ng-click="change_option(option)">
-              {{option.label()}}
+              [% l('[_1]: [_2]', '{{option.value()}}', '{{option.label()}}') %]
              </a>
            </li>
          </ul>
diff --git a/docs/RELEASE_NOTES_NEXT/Cataloging/Show_Codes_in_Physical_Characteristics_Wizard.adoc b/docs/RELEASE_NOTES_NEXT/Cataloging/Show_Codes_in_Physical_Characteristics_Wizard.adoc
new file mode 100644 (file)
index 0000000..f15ced7
--- /dev/null
@@ -0,0 +1,4 @@
+Display Codes in Physical Characteristics Wizard Drop-downs (LP#1776003)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Drop-downs in the Physical Characteristics Wizard in the MARC editor
+now display both code and label.