Move the authority control set config interfaces back into conify
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 22 Jun 2011 20:49:35 +0000 (16:49 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 11 Jul 2011 17:48:30 +0000 (13:48 -0400)
Really, that's where they make sense.  And they're done.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
19 files changed:
Open-ILS/web/js/ui/default/cat/authority/common.js [deleted file]
Open-ILS/web/js/ui/default/conify/global/cat/authority/common.js [new file with mode: 0644]
Open-ILS/web/templates/default/cat/authority/browse_axis.tt2 [deleted file]
Open-ILS/web/templates/default/cat/authority/browse_axis_authority_field_map.tt2 [deleted file]
Open-ILS/web/templates/default/cat/authority/control_set.tt2 [deleted file]
Open-ILS/web/templates/default/cat/authority/control_set_authority_field.tt2 [deleted file]
Open-ILS/web/templates/default/cat/authority/control_set_bib_field.tt2 [deleted file]
Open-ILS/web/templates/default/cat/authority/thesaurus.tt2 [deleted file]
Open-ILS/web/templates/default/conify/global/authority/authority_field.tt2.old [deleted file]
Open-ILS/web/templates/default/conify/global/authority/bib_field.tt2.old [deleted file]
Open-ILS/web/templates/default/conify/global/authority/control_set.tt2.old [deleted file]
Open-ILS/web/templates/default/conify/global/authority/thesaurus.tt2.old [deleted file]
Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/conify/global/cat/authority/control_set.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/conify/global/cat/authority/control_set_authority_field.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/conify/global/cat/authority/control_set_bib_field.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/conify/global/cat/authority/thesaurus.tt2 [new file with mode: 0644]
Open-ILS/xul/staff_client/chrome/content/main/menu.js

diff --git a/Open-ILS/web/js/ui/default/cat/authority/common.js b/Open-ILS/web/js/ui/default/cat/authority/common.js
deleted file mode 100644 (file)
index bb30b48..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* To be used by interfaces for editing child tables of acs. */
-function render_control_set_metadata(control_set) {
-    var anchor = dojo.byId("control-set-metadata");
-    anchor.href = oilsBasePath + "/cat/authority/control_set?focus=" +
-        control_set.id();
-    anchor.innerHTML = dojo.string.substitute(
-        localeStrings.CONTROL_SET_METADATA, [
-            control_set.id(), control_set.name(), control_set.description()
-        ]
-    );
-    openils.Util.show("control-set-metadata-holder");
-}
-
-/* To be used by interfaces for editing child tables of acsaf.  They not
- * only want to know what acsaf they belong to, but for convenience they
- * should also have handy the acs id to which their parent acsaf belongs,
- * so they can provide the most helpful "back" link.
- */
-function render_authority_field_metadata(authority_field, control_set_id) {
-    var anchor = dojo.byId("authority-field-metadata");
-    var href = oilsBasePath +
-        "/cat/authority/control_set_authority_field?focus=" +
-        authority_field.id();
-    if (control_set_id) href += "&acs=" + control_set_id;
-
-    anchor.href = href;
-    anchor.innerHTML = dojo.string.substitute(
-        localeStrings.AUTHORITY_FIELD_METADATA, [
-            "id", "tag", "sf_list", "name", "description"
-        ].map(function(k) {
-            var v = authority_field[k]();
-            return (v == null) ? "" : v;
-        })
-    );
-    openils.Util.show("authority-field-metadata-holder");
-}
diff --git a/Open-ILS/web/js/ui/default/conify/global/cat/authority/common.js b/Open-ILS/web/js/ui/default/conify/global/cat/authority/common.js
new file mode 100644 (file)
index 0000000..13fdfdb
--- /dev/null
@@ -0,0 +1,36 @@
+/* To be used by interfaces for editing child tables of acs. */
+function render_control_set_metadata(control_set) {
+    var anchor = dojo.byId("control-set-metadata");
+    anchor.href = oilsBasePath +
+        "/conify/global/cat/authority/control_set?focus=" + control_set.id();
+    anchor.innerHTML = dojo.string.substitute(
+        localeStrings.CONTROL_SET_METADATA, [
+            control_set.id(), control_set.name(), control_set.description()
+        ]
+    );
+    openils.Util.show("control-set-metadata-holder");
+}
+
+/* To be used by interfaces for editing child tables of acsaf.  They not
+ * only want to know what acsaf they belong to, but for convenience they
+ * should also have handy the acs id to which their parent acsaf belongs,
+ * so they can provide the most helpful "back" link.
+ */
+function render_authority_field_metadata(authority_field, control_set_id) {
+    var anchor = dojo.byId("authority-field-metadata");
+    var href = oilsBasePath +
+        "/conify/global/cat/authority/control_set_authority_field?focus=" +
+        authority_field.id();
+    if (control_set_id) href += "&acs=" + control_set_id;
+
+    anchor.href = href;
+    anchor.innerHTML = dojo.string.substitute(
+        localeStrings.AUTHORITY_FIELD_METADATA, [
+            "id", "tag", "sf_list", "name", "description"
+        ].map(function(k) {
+            var v = authority_field[k]();
+            return (v == null) ? "" : v;
+        })
+    );
+    openils.Util.show("authority-field-metadata-holder");
+}
diff --git a/Open-ILS/web/templates/default/cat/authority/browse_axis.tt2 b/Open-ILS/web/templates/default/cat/authority/browse_axis.tt2
deleted file mode 100644 (file)
index fc31b6e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = "Configure Authority Browse Axes" %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
-        <div>Browse Axes</div>
-        <div>
-            <button dojoType="dijit.form.Button" onClick="aba_grid.showCreateDialog()">New Browse Axis</button>
-            <button dojoType="dijit.form.Button" onClick="aba_grid.deleteSelected()">Delete Selected</button>
-        </div>
-    </div>
-    <div>
-        <table  jsId="aba_grid"
-                dojoType="openils.widget.AutoGrid"
-                autoHeight="true"
-                defaultCellWidth="'auto'"
-                fieldOrder="['code','name','description']"
-                suppressEditFields="['id']"
-                query="{id: '*'}"
-                fmClass="aba"
-                editOnEnter="true">
-        </table>
-    </div>
-</div>
-<script type="text/javascript">
-    dojo.require("openils.widget.AutoGrid");
-
-    function my_init() {
-        aba_grid.loadAll({"order_by": {"aba": "code"}});
-    }
-
-    openils.Util.addOnLoad(my_init);
-</script>
-[% END %]
diff --git a/Open-ILS/web/templates/default/cat/authority/browse_axis_authority_field_map.tt2 b/Open-ILS/web/templates/default/cat/authority/browse_axis_authority_field_map.tt2
deleted file mode 100644 (file)
index c12dfa8..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = "Configure Browse Axis-Authority Field Maps" %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
-        <div>Browse Axis-Authority Field Maps</div>
-        <div>
-            <button dojoType="dijit.form.Button" onClick="abaafm_grid.showCreateDialog()">New Browse Axis-Authority Field Map</button>
-            <button dojoType="dijit.form.Button" onClick="abaafm_grid.deleteSelected()">Delete Selected</button>
-        </div>
-    </div>
-    <div id="authority-field-metadata-holder" class="hidden">
-        Showing only browse axis-authority field maps linked to authority field:
-        <a id="authority-field-metadata"></a>
-    </div>
-    <div>
-        <table  jsId="abaafm_grid"
-                dojoType="openils.widget.AutoGrid"
-                autoHeight="true"
-                defaultCellWidth="'auto'"
-                suppressEditFields="['id']"
-                fieldOrder="['axis','field']"
-                query="{id: '*'}"
-                fmClass="abaafm"
-                editOnEnter="true">
-        </table>
-    </div>
-</div>
-<script type="text/javascript"
-    src="[% ctx.media_prefix %]/js/ui/default/cat/authority/common.js"></script>
-<script type="text/javascript">
-    dojo.require("openils.widget.AutoGrid");
-    dojo.require("openils.CGI");
-    dojo.require("openils.PermaCrud");
-
-    dojo.requireLocalization("openils.authority", "authority");
-    var localeStrings =
-        dojo.i18n.getLocalization("openils.authority", "authority");
-
-    var cgi, pcrud;
-
-    function my_init() {
-        var authority_field, control_set_id;
-        var where = {"id": {"!=": null}};
-
-        cgi = new openils.CGI();
-        pcrud = new openils.PermaCrud();
-
-        authority_field = cgi.param("acsaf");
-        control_set_id = cgi.param("acs");
-
-        if (authority_field) {
-            /* This block not only limits the scope of our search for abaafm
-               objects, but makes sure that we create/update only abaafm's
-               that link back to the authority field (acsaf) we're interested
-               in.  */
-            authority_field = pcrud.retrieve("acsaf", authority_field);
-            where.field = authority_field.id();
-            render_authority_field_metadata(authority_field, control_set_id);
-
-            abaafm_grid.overrideEditWidgets.field =
-                new dijit.form.TextBox({"disabled": true});
-            abaafm_grid.overrideEditWidgets.field.shove =
-                {"create": authority_field.id()};
-        }
-
-        abaafm_grid.loadAll({"order_by": {"abaafm": "axis"}}, where);
-    }
-
-    openils.Util.addOnLoad(my_init);
-</script>
-[% END %]
diff --git a/Open-ILS/web/templates/default/cat/authority/control_set.tt2 b/Open-ILS/web/templates/default/cat/authority/control_set.tt2
deleted file mode 100644 (file)
index 4d1e97d..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = "Configure Authority Control Sets" %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
-        <div>Control Sets</div>
-        <div>
-            <button dojoType="dijit.form.Button" onClick="acs_grid.showCreateDialog()">New Control Set</button>
-            <button dojoType="dijit.form.Button" onClick="acs_grid.deleteSelected()">Delete Selected</button>
-        </div>
-    </div>
-    <div>
-    <table  jsId="acs_grid"
-            dojoType="openils.widget.AutoGrid"
-            autoHeight="true"
-            defaultCellWidth="'auto'"
-            fieldOrder="['name','description','id']"
-            suppressEditFields="['id']"
-            query="{id: '*'}"
-            fmClass="acs"
-            editOnEnter="true">
-            <thead>
-                <tr>
-                    <th name="Other properties"
-                        field="id" formatter="format_acs_id"></th>
-                </tr>
-            </thead>
-    </table>
-</div>
-
-<script type="text/javascript">
-    dojo.require("openils.widget.AutoGrid");
-    dojo.require("openils.CGI");
-    dojo.requireLocalization("openils.authority", "authority");
-    var localeStrings =
-        dojo.i18n.getLocalization("openils.authority", "authority");
-    var acs_cache = {};
-    var cgi;
-
-    function format_acs_id(id) {
-        if (id) {
-            var tlen = acs_cache[id].thesauri() ?
-                acs_cache[id].thesauri().length : 0;
-            var alen = acs_cache[id].authority_fields() ?
-                acs_cache[id].authority_fields().length : 0;
-
-            return "<a href='" + oilsBasePath +
-                "/cat/authority/thesaurus?acs=" + id + "'>" +
-                dojo.string.substitute(localeStrings.THESAURI, [tlen]) +
-                "</a> &nbsp;" + " <a href='" + oilsBasePath +
-                "/cat/authority/control_set_authority_field?acs=" +
-                id + "'>" +
-                dojo.string.substitute(localeStrings.AUTHORITY_FIELDS, [alen]) +
-                "</a>";
-        }
-    }
-
-    function acs_grid_loader() {
-        acs_cache = {};
-        acs_grid.resetStore();
-        acs_grid.showLoadProgressIndicator();
-        fieldmapper.standardRequest(
-            ["open-ils.cat", "open-ils.cat.authority.control_set.retrieve"], {
-                "async": true,
-                "params": [acs_grid.displayLimit, acs_grid.displayOffset, cgi.param("focus")],
-                "onresponse": function(r) {
-                    if (r = openils.Util.readResponse(r)) {
-                        acs_cache[r.id()] = r;
-                        acs_grid.store.newItem(r.toStoreItem());
-                    }
-                },
-                "oncomplete": function() {
-                    acs_grid.hideLoadProgressIndicator();
-                }
-            }
-        );
-    }
-
-    openils.Util.addOnLoad(
-        function() {
-            cgi = new openils.CGI();
-
-            acs_grid.onPostCreate = function(obj) {acs_cache[obj.id()] = obj;};
-            acs_grid.dataLoader = acs_grid_loader;
-            acs_grid_loader();
-        }
-    );
-</script>
-[% END %]
diff --git a/Open-ILS/web/templates/default/cat/authority/control_set_authority_field.tt2 b/Open-ILS/web/templates/default/cat/authority/control_set_authority_field.tt2
deleted file mode 100644 (file)
index b4c88cf..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = "Configure Authority Authority Fields" %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
-        <div>Authority Fields</div>
-        <div>
-            <button dojoType="dijit.form.Button" onClick="acsaf_grid.showCreateDialog()">New Authority Field</button>
-            <button dojoType="dijit.form.Button" onClick="acsaf_grid.deleteSelected()">Delete Selected</button>
-        </div>
-    </div>
-    <div id="control-set-metadata-holder" class="hidden">
-        Showing only authority fields linked to control set:
-        <a id="control-set-metadata"></a>
-    </div>
-    <div>
-        <table  jsId="acsaf_grid"
-                dojoType="openils.widget.AutoGrid"
-                autoHeight="true"
-                defaultCellWidth="'12%'"
-                fieldOrder="['id','name','description','main_entry','control_set','tag','sf_list','bib_fields','axis_maps']"
-                suppressEditFields="['id']"
-                query="{id: '*'}"
-                fmClass="acsaf"
-                editOnEnter="true">
-            <thead>
-                <tr>
-                    <th field="bib_fields" name="Controlled Bib Fields"
-                        get="get_just_id" formatter="format_bib_fields"></th>
-                    <th field="axis_maps" name="Axes"
-                        get="get_just_id" formatter="format_axis_maps"></th>
-                </tr>
-            </thead>
-        </table>
-    </div>
-</div>
-<script type="text/javascript"
-    src="[% ctx.media_prefix %]/js/ui/default/cat/authority/common.js"></script>
-<script type="text/javascript">
-    dojo.require("openils.widget.AutoGrid");
-    dojo.require("openils.CGI");
-    dojo.require("openils.PermaCrud");
-
-    dojo.requireLocalization("openils.authority", "authority");
-    var localeStrings =
-        dojo.i18n.getLocalization("openils.authority", "authority");
-
-    var cgi, pcrud, control_set;
-    var acsaf_cache = {};
-
-    function acsaf_grid_loader() {
-        acsaf_cache = {};
-        acsaf_grid.resetStore();
-        acsaf_grid.showLoadProgressIndicator();
-        fieldmapper.standardRequest(
-            ["open-ils.cat",
-                "open-ils.cat.authority.control_set_authority_field.retrieve"],{
-                "async": true,
-                "params": [
-                    acsaf_grid.displayLimit, acsaf_grid.displayOffset,
-                    control_set.id(), cgi.param("focus")
-                ],
-                "onresponse": function(r) {
-                    if (r = openils.Util.readResponse(r)) {
-                        acsaf_cache[r.id()] = r;
-                        acsaf_grid.store.newItem(r.toStoreItem());
-                    }
-                },
-                "oncomplete": function() {
-                    acsaf_grid.hideLoadProgressIndicator();
-                }
-            }
-        );
-    }
-
-    function get_just_id(row_index, item) {
-        if (item) return this.grid.store.getValue(item, "id");
-    }
-
-    function format_axis_maps(id) {
-        if (id) {
-            var text = acsaf_cache[id].axis_maps().map(
-                function(f) { return f.axis().name(); }
-            ).sort().join(", ") || localeStrings.NONE_LINK;
-            var href = "browse_axis_authority_field_map?";
-            if (control_set)
-                href += "acs=" + control_set.id() + "&amp;";
-            href += "acsaf=" + id;
-            return "<a href='" + href + "'>"  + text + "</a>";
-        }
-    }
-
-    function format_bib_fields(id) {
-        if (id) {
-            var text = acsaf_cache[id].bib_fields().map(
-                function(f) { return f.tag(); }
-            ).sort().join(", ") || localeStrings.NONE_LINK;
-            var href = "control_set_bib_field?";
-            if (control_set)
-                href += "acs=" + control_set.id() + "&amp;";
-            href += "acsaf=" + id;
-            return "<a href='" + href + "'>"  + text + "</a>";
-        }
-    }
-
-    function my_init() {
-        cgi = new openils.CGI();
-        pcrud = new openils.PermaCrud();
-
-        control_set = cgi.param("acs");
-        if (control_set) {
-            control_set = pcrud.retrieve("acs", control_set);
-            render_control_set_metadata(control_set);
-
-            acsaf_grid.overrideEditWidgets.control_set =
-                new dijit.form.TextBox({"disabled": true});
-            acsaf_grid.overrideEditWidgets.control_set.shove =
-                {"create": control_set.id()};
-        }
-
-        acsaf_grid.onPostCreate = function(o) { acsaf_cache[o.id()] = o; };
-        acsaf_grid.dataLoader = acsaf_grid_loader;
-        acsaf_grid_loader();
-    }
-
-    openils.Util.addOnLoad(my_init);
-</script>
-[% END %]
diff --git a/Open-ILS/web/templates/default/cat/authority/control_set_bib_field.tt2 b/Open-ILS/web/templates/default/cat/authority/control_set_bib_field.tt2
deleted file mode 100644 (file)
index 6cca21b..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = "Configure Authority Control Set Bib Fields" %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
-        <div>Control Set Bib Fields</div>
-        <div>
-            <button dojoType="dijit.form.Button" onClick="acsbf_grid.showCreateDialog()">New Control Set Bib Field</button>
-            <button dojoType="dijit.form.Button" onClick="acsbf_grid.deleteSelected()">Delete Selected</button>
-        </div>
-    </div>
-    <div id="authority-field-metadata-holder" class="hidden">
-        Showing only control set bib fields linked to authority field:
-        <a id="authority-field-metadata"></a>
-    </div>
-    <div>
-        <table  jsId="acsbf_grid"
-                dojoType="openils.widget.AutoGrid"
-                autoHeight="true"
-                defaultCellWidth="'auto'"
-                suppressEditFields="['id']"
-                fieldOrder="['tag','authority_field']"
-                query="{id: '*'}"
-                fmClass="acsbf"
-                editOnEnter="true">
-        </table>
-    </div>
-</div>
-<script type="text/javascript"
-    src="[% ctx.media_prefix %]/js/ui/default/cat/authority/common.js"></script>
-<script type="text/javascript">
-    dojo.require("openils.widget.AutoGrid");
-    dojo.require("openils.CGI");
-    dojo.require("openils.PermaCrud");
-
-    dojo.requireLocalization("openils.authority", "authority");
-    var localeStrings =
-        dojo.i18n.getLocalization("openils.authority", "authority");
-
-    var cgi, pcrud;
-
-    function my_init() {
-        var authority_field, control_set_id;
-        var where = {"id": {"!=": null}};
-
-        cgi = new openils.CGI();
-        pcrud = new openils.PermaCrud();
-
-        authority_field = cgi.param("acsaf");
-        control_set_id = cgi.param("acs");
-
-        if (authority_field) {
-            /* This block not only limits the scope of our search for acsbf
-               objects, but makes sure that we create/update only acsbf's
-               that link back to the authority field (acsaf) we're interested
-               in.  */
-            authority_field = pcrud.retrieve("acsaf", authority_field);
-            where.authority_field = authority_field.id();
-            render_authority_field_metadata(authority_field, control_set_id);
-
-            acsbf_grid.overrideEditWidgets.authority_field =
-                new dijit.form.TextBox({"disabled": true});
-            acsbf_grid.overrideEditWidgets.authority_field.shove =
-                {"create": authority_field.id()};
-        }
-
-        acsbf_grid.loadAll({"order_by": {"acsbf": "tag"}}, where);
-    }
-
-    openils.Util.addOnLoad(my_init);
-</script>
-[% END %]
diff --git a/Open-ILS/web/templates/default/cat/authority/thesaurus.tt2 b/Open-ILS/web/templates/default/cat/authority/thesaurus.tt2
deleted file mode 100644 (file)
index 5e4c2bd..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = "Configure Authority Thesauri" %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
-        <div>Thesauri</div>
-        <div>
-            <button dojoType="dijit.form.Button" onClick="at_grid.showCreateDialog()">New Thesaurus</button>
-            <button dojoType="dijit.form.Button" onClick="at_grid.deleteSelected()">Delete Selected</button>
-        </div>
-    </div>
-    <div id="control-set-metadata-holder" class="hidden">
-        Showing only thesauri linked to control set:
-        <a id="control-set-metadata"></a>
-    </div>
-    <div>
-        <table  jsId="at_grid"
-                dojoType="openils.widget.AutoGrid"
-                autoHeight="true"
-                defaultCellWidth="'auto'"
-                fieldOrder="['code','control_set','name','description']"
-                suppressEditFields="['id']"
-                query="{id: '*'}"
-                fmClass="at"
-                editOnEnter="true">
-        </table>
-    </div>
-</div>
-<script type="text/javascript"
-    src="[% ctx.media_prefix %]/js/ui/default/cat/authority/common.js"></script>
-<script type="text/javascript">
-    dojo.require("openils.widget.AutoGrid");
-    dojo.require("openils.CGI");
-    dojo.require("openils.PermaCrud");
-
-    dojo.requireLocalization("openils.authority", "authority");
-    var localeStrings =
-        dojo.i18n.getLocalization("openils.authority", "authority");
-
-    var cgi, pcrud;
-
-    function my_init() {
-        var control_set;
-        var where = {"code": {"!=": null}};
-
-        cgi = new openils.CGI();
-        pcrud = new openils.PermaCrud();
-
-        control_set = cgi.param("acs");
-        if (control_set) {
-            control_set = pcrud.retrieve("acs", control_set);
-            where.control_set = control_set.id();
-            render_control_set_metadata(control_set);
-
-            at_grid.overrideEditWidgets.control_set =
-                new dijit.form.TextBox({"disabled": true});
-            at_grid.overrideEditWidgets.control_set.shove =
-                {"create": control_set.id()};
-        }
-
-        at_grid.loadAll({"order_by": {"at": "code"}}, where);
-    }
-
-    openils.Util.addOnLoad(my_init);
-</script>
-[% END %]
diff --git a/Open-ILS/web/templates/default/conify/global/authority/authority_field.tt2.old b/Open-ILS/web/templates/default/conify/global/authority/authority_field.tt2.old
deleted file mode 100644 (file)
index 2ae8cc8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = 'Configure Control Set Authority Fields' %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
-        <div>Thesauri</div>
-        <div>
-            <button dojoType='dijit.form.Button' onClick='acsafGrid.showCreateDialog()'>New Control Set Authority Field</button>
-            <button dojoType='dijit.form.Button' onClick='acsafGrid.deleteSelected()'>Delete Selected</button>
-        </div>
-    </div>
-    <div>
-    <table  jsId="acsafGrid"
-            dojoType="openils.widget.AutoGrid"
-            autoHeight='true'
-            fieldOrder="['control_set','name','tag','sf_list','description','main_entry']"
-            suppressFields="['id']"
-            suppressEditFields="['id']"
-            query="{id: '*'}"
-            fmClass='acsaf'
-            editOnEnter='true'/>
-</div>
-
-<script type="text/javascript">
-    dojo.require("openils.widget.PCrudAutocompleteBox");
-    dojo.require('openils.widget.AutoGrid');
-
-    openils.Util.addOnLoad(
-        function() {
-            acsafGrid.overrideEditWidgets.control_set =
-                new openils.widget.PCrudAutocompleteBox({
-                    "fmclass": "acs", "searchAttr": "name"
-                });
-            acsafGrid.overrideEditWidgets.control_set.shove = {"create": ""};
-            acsafGrid.loadAll({order_by:{acsaf : 'name'}}, {"id": {"!=": null}});
-        }
-    );
-</script>
-[% END %]
-
-
diff --git a/Open-ILS/web/templates/default/conify/global/authority/bib_field.tt2.old b/Open-ILS/web/templates/default/conify/global/authority/bib_field.tt2.old
deleted file mode 100644 (file)
index 4023d73..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = 'Configure Control Set Bibliographic Fields' %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
-        <div>Thesauri</div>
-        <div>
-            <button dojoType='dijit.form.Button' onClick='acsbfGrid.showCreateDialog()'>New Control Set Bibliographic Field</button>
-            <button dojoType='dijit.form.Button' onClick='acsbfGrid.deleteSelected()'>Delete Selected</button>
-        </div>
-    </div>
-    <div>
-    <table  jsId="acsbfGrid"
-            dojoType="openils.widget.AutoGrid"
-            autoHeight='true'
-            fieldOrder="['tag','authority_field']"
-            suppressFields="['id']"
-            suppressEditFields="['id']"
-            query="{id: '*'}"
-            fmClass='acsbf'
-            editOnEnter='true'/>
-</div>
-
-<script type="text/javascript">
-    dojo.require("openils.widget.PCrudAutocompleteBox");
-    dojo.require('openils.widget.AutoGrid');
-
-    openils.Util.addOnLoad(
-        function() {
-            acsbfGrid.overrideEditWidgets.authority_field =
-                new openils.widget.PCrudAutocompleteBox({
-                    "fmclass": "acsaf", "searchAttr": "name"
-                });
-            acsbfGrid.overrideEditWidgets.authority_field.shove = {"create": ""};
-            acsbfGrid.loadAll({order_by:{acsbf : 'tag'}}, {"id": {"!=": null}});
-        }
-    );
-</script>
-[% END %]
-
-
diff --git a/Open-ILS/web/templates/default/conify/global/authority/control_set.tt2.old b/Open-ILS/web/templates/default/conify/global/authority/control_set.tt2.old
deleted file mode 100644 (file)
index c072d1c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = 'Configure Authority Control Sets' %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
-        <div>Control Sets</div>
-        <div>
-            <button dojoType='dijit.form.Button' onClick='ctlSetGrid.showCreateDialog()'>New Control Set</button>
-            <button dojoType='dijit.form.Button' onClick='ctlSetGrid.deleteSelected()'>Delete Selected</button>
-        </div>
-    </div>
-    <div>
-    <table  jsId="ctlSetGrid"
-            dojoType="openils.widget.AutoGrid"
-            autoHeight='true'
-            fieldOrder="['name','description']"
-            suppressFields="['id']"
-            suppressEditFields="['id']"
-            query="{id: '*'}"
-            fmClass='acs'
-            editOnEnter='true'/>
-</div>
-
-<script type="text/javascript">
-    dojo.require('openils.widget.AutoGrid');
-    openils.Util.addOnLoad(
-        function() {
-            ctlSetGrid.loadAll({order_by:{acs : 'name'}}, {"id": {"!=": null}});
-        }
-    );
-
-</script>
-[% END %]
-
-
diff --git a/Open-ILS/web/templates/default/conify/global/authority/thesaurus.tt2.old b/Open-ILS/web/templates/default/conify/global/authority/thesaurus.tt2.old
deleted file mode 100644 (file)
index 8061f92..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-[% WRAPPER default/base.tt2 %]
-[% ctx.page_title = 'Configure Authority Thesaurus' %]
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
-        <div>Thesauri</div>
-        <div>
-            <button dojoType='dijit.form.Button' onClick='thesGrid.showCreateDialog()'>New Thesaurus</button>
-            <button dojoType='dijit.form.Button' onClick='thesGrid.deleteSelected()'>Delete Selected</button>
-        </div>
-    </div>
-    <div>
-    <table  jsId="thesGrid"
-            dojoType="openils.widget.AutoGrid"
-            autoHeight='true'
-            fieldOrder="['code','name','description','control_set]"
-            query="{code:'*'}"
-            fmClass='at'
-            editOnEnter='true'/>
-</div>
-
-<script type="text/javascript">
-    dojo.require("openils.widget.PCrudAutocompleteBox");
-    dojo.require('openils.widget.AutoGrid');
-
-    openils.Util.addOnLoad(
-        function() {
-            thesGrid.overrideEditWidgets.control_set =
-                new openils.widget.PCrudAutocompleteBox({
-                    "fmclass": "acs", "searchAttr": "name"
-                });
-            thesGrid.overrideEditWidgets.control_set.shove = {"create": ""};
-            thesGrid.loadAll({order_by:{at : 'name'}}, {"id": {"!=": null}});
-        }
-    );
-</script>
-[% END %]
-
-
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis.tt2 b/Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis.tt2
new file mode 100644 (file)
index 0000000..fc31b6e
--- /dev/null
@@ -0,0 +1,33 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Configure Authority Browse Axes" %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
+        <div>Browse Axes</div>
+        <div>
+            <button dojoType="dijit.form.Button" onClick="aba_grid.showCreateDialog()">New Browse Axis</button>
+            <button dojoType="dijit.form.Button" onClick="aba_grid.deleteSelected()">Delete Selected</button>
+        </div>
+    </div>
+    <div>
+        <table  jsId="aba_grid"
+                dojoType="openils.widget.AutoGrid"
+                autoHeight="true"
+                defaultCellWidth="'auto'"
+                fieldOrder="['code','name','description']"
+                suppressEditFields="['id']"
+                query="{id: '*'}"
+                fmClass="aba"
+                editOnEnter="true">
+        </table>
+    </div>
+</div>
+<script type="text/javascript">
+    dojo.require("openils.widget.AutoGrid");
+
+    function my_init() {
+        aba_grid.loadAll({"order_by": {"aba": "code"}});
+    }
+
+    openils.Util.addOnLoad(my_init);
+</script>
+[% END %]
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2 b/Open-ILS/web/templates/default/conify/global/cat/authority/browse_axis_authority_field_map.tt2
new file mode 100644 (file)
index 0000000..8bb1af1
--- /dev/null
@@ -0,0 +1,71 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Configure Browse Axis-Authority Field Maps" %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
+        <div>Browse Axis-Authority Field Maps</div>
+        <div>
+            <button dojoType="dijit.form.Button" onClick="abaafm_grid.showCreateDialog()">New Browse Axis-Authority Field Map</button>
+            <button dojoType="dijit.form.Button" onClick="abaafm_grid.deleteSelected()">Delete Selected</button>
+        </div>
+    </div>
+    <div id="authority-field-metadata-holder" class="hidden">
+        Showing only browse axis-authority field maps linked to authority field:
+        <a id="authority-field-metadata"></a>
+    </div>
+    <div>
+        <table  jsId="abaafm_grid"
+                dojoType="openils.widget.AutoGrid"
+                autoHeight="true"
+                defaultCellWidth="'auto'"
+                suppressEditFields="['id']"
+                fieldOrder="['axis','field']"
+                query="{id: '*'}"
+                fmClass="abaafm"
+                editOnEnter="true">
+        </table>
+    </div>
+</div>
+<script type="text/javascript"
+    src="[% ctx.media_prefix %]/js/ui/default/conify/global/cat/authority/common.js"></script>
+<script type="text/javascript">
+    dojo.require("openils.widget.AutoGrid");
+    dojo.require("openils.CGI");
+    dojo.require("openils.PermaCrud");
+
+    dojo.requireLocalization("openils.authority", "authority");
+    var localeStrings =
+        dojo.i18n.getLocalization("openils.authority", "authority");
+
+    var cgi, pcrud;
+
+    function my_init() {
+        var authority_field, control_set_id;
+        var where = {"id": {"!=": null}};
+
+        cgi = new openils.CGI();
+        pcrud = new openils.PermaCrud();
+
+        authority_field = cgi.param("acsaf");
+        control_set_id = cgi.param("acs");
+
+        if (authority_field) {
+            /* This block not only limits the scope of our search for abaafm
+               objects, but makes sure that we create/update only abaafm's
+               that link back to the authority field (acsaf) we're interested
+               in.  */
+            authority_field = pcrud.retrieve("acsaf", authority_field);
+            where.field = authority_field.id();
+            render_authority_field_metadata(authority_field, control_set_id);
+
+            abaafm_grid.overrideEditWidgets.field =
+                new dijit.form.TextBox({"disabled": true});
+            abaafm_grid.overrideEditWidgets.field.shove =
+                {"create": authority_field.id()};
+        }
+
+        abaafm_grid.loadAll({"order_by": {"abaafm": "axis"}}, where);
+    }
+
+    openils.Util.addOnLoad(my_init);
+</script>
+[% END %]
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/control_set.tt2 b/Open-ILS/web/templates/default/conify/global/cat/authority/control_set.tt2
new file mode 100644 (file)
index 0000000..69ba1d2
--- /dev/null
@@ -0,0 +1,88 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Configure Authority Control Sets" %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
+        <div>Control Sets</div>
+        <div>
+            <button dojoType="dijit.form.Button" onClick="acs_grid.showCreateDialog()">New Control Set</button>
+            <button dojoType="dijit.form.Button" onClick="acs_grid.deleteSelected()">Delete Selected</button>
+        </div>
+    </div>
+    <div>
+    <table  jsId="acs_grid"
+            dojoType="openils.widget.AutoGrid"
+            autoHeight="true"
+            defaultCellWidth="'auto'"
+            fieldOrder="['name','description','id']"
+            suppressEditFields="['id']"
+            query="{id: '*'}"
+            fmClass="acs"
+            editOnEnter="true">
+            <thead>
+                <tr>
+                    <th name="Other properties"
+                        field="id" formatter="format_acs_id"></th>
+                </tr>
+            </thead>
+    </table>
+</div>
+
+<script type="text/javascript">
+    dojo.require("openils.widget.AutoGrid");
+    dojo.require("openils.CGI");
+    dojo.requireLocalization("openils.authority", "authority");
+    var localeStrings =
+        dojo.i18n.getLocalization("openils.authority", "authority");
+    var acs_cache = {};
+    var cgi;
+
+    function format_acs_id(id) {
+        if (id) {
+            var tlen = acs_cache[id].thesauri() ?
+                acs_cache[id].thesauri().length : 0;
+            var alen = acs_cache[id].authority_fields() ?
+                acs_cache[id].authority_fields().length : 0;
+
+            return "<a href='" + oilsBasePath +
+                "/conify/global/cat/authority/thesaurus?acs=" + id + "'>" +
+                dojo.string.substitute(localeStrings.THESAURI, [tlen]) +
+                "</a> &nbsp;" + " <a href='" + oilsBasePath +
+                "/conify/global/cat/authority/control_set_authority_field?acs=" +
+                id + "'>" +
+                dojo.string.substitute(localeStrings.AUTHORITY_FIELDS, [alen]) +
+                "</a>";
+        }
+    }
+
+    function acs_grid_loader() {
+        acs_cache = {};
+        acs_grid.resetStore();
+        acs_grid.showLoadProgressIndicator();
+        fieldmapper.standardRequest(
+            ["open-ils.cat", "open-ils.cat.authority.control_set.retrieve"], {
+                "async": true,
+                "params": [acs_grid.displayLimit, acs_grid.displayOffset, cgi.param("focus")],
+                "onresponse": function(r) {
+                    if (r = openils.Util.readResponse(r)) {
+                        acs_cache[r.id()] = r;
+                        acs_grid.store.newItem(r.toStoreItem());
+                    }
+                },
+                "oncomplete": function() {
+                    acs_grid.hideLoadProgressIndicator();
+                }
+            }
+        );
+    }
+
+    openils.Util.addOnLoad(
+        function() {
+            cgi = new openils.CGI();
+
+            acs_grid.onPostCreate = function(obj) {acs_cache[obj.id()] = obj;};
+            acs_grid.dataLoader = acs_grid_loader;
+            acs_grid_loader();
+        }
+    );
+</script>
+[% END %]
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/control_set_authority_field.tt2 b/Open-ILS/web/templates/default/conify/global/cat/authority/control_set_authority_field.tt2
new file mode 100644 (file)
index 0000000..2f60bcc
--- /dev/null
@@ -0,0 +1,127 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Configure Authority Authority Fields" %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
+        <div>Authority Fields</div>
+        <div>
+            <button dojoType="dijit.form.Button" onClick="acsaf_grid.showCreateDialog()">New Authority Field</button>
+            <button dojoType="dijit.form.Button" onClick="acsaf_grid.deleteSelected()">Delete Selected</button>
+        </div>
+    </div>
+    <div id="control-set-metadata-holder" class="hidden">
+        Showing only authority fields linked to control set:
+        <a id="control-set-metadata"></a>
+    </div>
+    <div>
+        <table  jsId="acsaf_grid"
+                dojoType="openils.widget.AutoGrid"
+                autoHeight="true"
+                defaultCellWidth="'12%'"
+                fieldOrder="['id','name','description','main_entry','control_set','tag','sf_list','bib_fields','axis_maps']"
+                suppressEditFields="['id']"
+                query="{id: '*'}"
+                fmClass="acsaf"
+                editOnEnter="true">
+            <thead>
+                <tr>
+                    <th field="bib_fields" name="Controlled Bib Fields"
+                        get="get_just_id" formatter="format_bib_fields"></th>
+                    <th field="axis_maps" name="Axes"
+                        get="get_just_id" formatter="format_axis_maps"></th>
+                </tr>
+            </thead>
+        </table>
+    </div>
+</div>
+<script type="text/javascript"
+    src="[% ctx.media_prefix %]/js/ui/default/conify/global/cat/authority/common.js"></script>
+<script type="text/javascript">
+    dojo.require("openils.widget.AutoGrid");
+    dojo.require("openils.CGI");
+    dojo.require("openils.PermaCrud");
+
+    dojo.requireLocalization("openils.authority", "authority");
+    var localeStrings =
+        dojo.i18n.getLocalization("openils.authority", "authority");
+
+    var cgi, pcrud, control_set;
+    var acsaf_cache = {};
+
+    function acsaf_grid_loader() {
+        acsaf_cache = {};
+        acsaf_grid.resetStore();
+        acsaf_grid.showLoadProgressIndicator();
+        fieldmapper.standardRequest(
+            ["open-ils.cat",
+                "open-ils.cat.authority.control_set_authority_field.retrieve"],{
+                "async": true,
+                "params": [
+                    acsaf_grid.displayLimit, acsaf_grid.displayOffset,
+                    control_set.id(), cgi.param("focus")
+                ],
+                "onresponse": function(r) {
+                    if (r = openils.Util.readResponse(r)) {
+                        acsaf_cache[r.id()] = r;
+                        acsaf_grid.store.newItem(r.toStoreItem());
+                    }
+                },
+                "oncomplete": function() {
+                    acsaf_grid.hideLoadProgressIndicator();
+                }
+            }
+        );
+    }
+
+    function get_just_id(row_index, item) {
+        if (item) return this.grid.store.getValue(item, "id");
+    }
+
+    function format_axis_maps(id) {
+        if (id) {
+            var text = acsaf_cache[id].axis_maps().map(
+                function(f) { return f.axis().name(); }
+            ).sort().join(", ") || localeStrings.NONE_LINK;
+            var href = "browse_axis_authority_field_map?";
+            if (control_set)
+                href += "acs=" + control_set.id() + "&amp;";
+            href += "acsaf=" + id;
+            return "<a href='" + href + "'>"  + text + "</a>";
+        }
+    }
+
+    function format_bib_fields(id) {
+        if (id) {
+            var text = acsaf_cache[id].bib_fields().map(
+                function(f) { return f.tag(); }
+            ).sort().join(", ") || localeStrings.NONE_LINK;
+            var href = "control_set_bib_field?";
+            if (control_set)
+                href += "acs=" + control_set.id() + "&amp;";
+            href += "acsaf=" + id;
+            return "<a href='" + href + "'>"  + text + "</a>";
+        }
+    }
+
+    function my_init() {
+        cgi = new openils.CGI();
+        pcrud = new openils.PermaCrud();
+
+        control_set = cgi.param("acs");
+        if (control_set) {
+            control_set = pcrud.retrieve("acs", control_set);
+            render_control_set_metadata(control_set);
+
+            acsaf_grid.overrideEditWidgets.control_set =
+                new dijit.form.TextBox({"disabled": true});
+            acsaf_grid.overrideEditWidgets.control_set.shove =
+                {"create": control_set.id()};
+        }
+
+        acsaf_grid.onPostCreate = function(o) { acsaf_cache[o.id()] = o; };
+        acsaf_grid.dataLoader = acsaf_grid_loader;
+        acsaf_grid_loader();
+    }
+
+    openils.Util.addOnLoad(my_init);
+</script>
+[% END %]
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/control_set_bib_field.tt2 b/Open-ILS/web/templates/default/conify/global/cat/authority/control_set_bib_field.tt2
new file mode 100644 (file)
index 0000000..28b9916
--- /dev/null
@@ -0,0 +1,71 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Configure Authority Control Set Bib Fields" %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
+        <div>Control Set Bib Fields</div>
+        <div>
+            <button dojoType="dijit.form.Button" onClick="acsbf_grid.showCreateDialog()">New Control Set Bib Field</button>
+            <button dojoType="dijit.form.Button" onClick="acsbf_grid.deleteSelected()">Delete Selected</button>
+        </div>
+    </div>
+    <div id="authority-field-metadata-holder" class="hidden">
+        Showing only control set bib fields linked to authority field:
+        <a id="authority-field-metadata"></a>
+    </div>
+    <div>
+        <table  jsId="acsbf_grid"
+                dojoType="openils.widget.AutoGrid"
+                autoHeight="true"
+                defaultCellWidth="'auto'"
+                suppressEditFields="['id']"
+                fieldOrder="['tag','authority_field']"
+                query="{id: '*'}"
+                fmClass="acsbf"
+                editOnEnter="true">
+        </table>
+    </div>
+</div>
+<script type="text/javascript"
+    src="[% ctx.media_prefix %]/js/ui/default/conify/global/cat/authority/common.js"></script>
+<script type="text/javascript">
+    dojo.require("openils.widget.AutoGrid");
+    dojo.require("openils.CGI");
+    dojo.require("openils.PermaCrud");
+
+    dojo.requireLocalization("openils.authority", "authority");
+    var localeStrings =
+        dojo.i18n.getLocalization("openils.authority", "authority");
+
+    var cgi, pcrud;
+
+    function my_init() {
+        var authority_field, control_set_id;
+        var where = {"id": {"!=": null}};
+
+        cgi = new openils.CGI();
+        pcrud = new openils.PermaCrud();
+
+        authority_field = cgi.param("acsaf");
+        control_set_id = cgi.param("acs");
+
+        if (authority_field) {
+            /* This block not only limits the scope of our search for acsbf
+               objects, but makes sure that we create/update only acsbf's
+               that link back to the authority field (acsaf) we're interested
+               in.  */
+            authority_field = pcrud.retrieve("acsaf", authority_field);
+            where.authority_field = authority_field.id();
+            render_authority_field_metadata(authority_field, control_set_id);
+
+            acsbf_grid.overrideEditWidgets.authority_field =
+                new dijit.form.TextBox({"disabled": true});
+            acsbf_grid.overrideEditWidgets.authority_field.shove =
+                {"create": authority_field.id()};
+        }
+
+        acsbf_grid.loadAll({"order_by": {"acsbf": "tag"}}, where);
+    }
+
+    openils.Util.addOnLoad(my_init);
+</script>
+[% END %]
diff --git a/Open-ILS/web/templates/default/conify/global/cat/authority/thesaurus.tt2 b/Open-ILS/web/templates/default/conify/global/cat/authority/thesaurus.tt2
new file mode 100644 (file)
index 0000000..b8f80f7
--- /dev/null
@@ -0,0 +1,65 @@
+[% WRAPPER default/base.tt2 %]
+[% ctx.page_title = "Configure Authority Thesauri" %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class="oils-header-panel">
+        <div>Thesauri</div>
+        <div>
+            <button dojoType="dijit.form.Button" onClick="at_grid.showCreateDialog()">New Thesaurus</button>
+            <button dojoType="dijit.form.Button" onClick="at_grid.deleteSelected()">Delete Selected</button>
+        </div>
+    </div>
+    <div id="control-set-metadata-holder" class="hidden">
+        Showing only thesauri linked to control set:
+        <a id="control-set-metadata"></a>
+    </div>
+    <div>
+        <table  jsId="at_grid"
+                dojoType="openils.widget.AutoGrid"
+                autoHeight="true"
+                defaultCellWidth="'auto'"
+                fieldOrder="['code','control_set','name','description']"
+                suppressEditFields="['id']"
+                query="{id: '*'}"
+                fmClass="at"
+                editOnEnter="true">
+        </table>
+    </div>
+</div>
+<script type="text/javascript"
+    src="[% ctx.media_prefix %]/js/ui/default/conify/global/cat/authority/common.js"></script>
+<script type="text/javascript">
+    dojo.require("openils.widget.AutoGrid");
+    dojo.require("openils.CGI");
+    dojo.require("openils.PermaCrud");
+
+    dojo.requireLocalization("openils.authority", "authority");
+    var localeStrings =
+        dojo.i18n.getLocalization("openils.authority", "authority");
+
+    var cgi, pcrud;
+
+    function my_init() {
+        var control_set;
+        var where = {"code": {"!=": null}};
+
+        cgi = new openils.CGI();
+        pcrud = new openils.PermaCrud();
+
+        control_set = cgi.param("acs");
+        if (control_set) {
+            control_set = pcrud.retrieve("acs", control_set);
+            where.control_set = control_set.id();
+            render_control_set_metadata(control_set);
+
+            at_grid.overrideEditWidgets.control_set =
+                new dijit.form.TextBox({"disabled": true});
+            at_grid.overrideEditWidgets.control_set.shove =
+                {"create": control_set.id()};
+        }
+
+        at_grid.loadAll({"order_by": {"at": "code"}}, where);
+    }
+
+    openils.Util.addOnLoad(my_init);
+</script>
+[% END %]
index de70805..e0e1453 100644 (file)
@@ -961,11 +961,11 @@ main.menu.prototype = {
             ],
             'cmd_server_admin_authority_control_set': [
                 ['oncommand'],
-                function(event) { open_eg_web_page('cat/authority/control_set', null, event); }
+                function(event) { open_eg_web_page('conify/global/cat/authority/control_set', null, event); }
             ],
             'cmd_server_admin_authority_browse_axis': [
                 ['oncommand'],
-                function(event) { open_eg_web_page('cat/authority/browse_axis', null, event); }
+                function(event) { open_eg_web_page('conify/global/cat/authority/browse_axis', null, event); }
             ],
             'cmd_server_admin_booking_resource': [
                 ['oncommand'],