From: Jason Etheridge Date: Tue, 18 Oct 2016 17:48:50 +0000 (-0400) Subject: webstaff: Acquisitions Administration X-Git-Tag: sprint4-merge-nov22^2~30 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0430fe6b4fbf6562c6d9c76c1a910ae90b47ffd5;p=working%2FEvergreen.git webstaff: Acquisitions Administration FIXME: * Acq Admin -> Distribution Formulas -> Formula Detail Page : render problem, no uncaught exceptions * Acq Admin -> Funds : TypeError: openils.XUL.localStorage is not a function Signed-off-by: Jason Etheridge Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/templates/staff/admin/acq/index.tt2 b/Open-ILS/src/templates/staff/admin/acq/index.tt2 new file mode 100644 index 0000000000..f5a8b7a371 --- /dev/null +++ b/Open-ILS/src/templates/staff/admin/acq/index.tt2 @@ -0,0 +1,15 @@ +[% + WRAPPER "staff/base.tt2"; + ctx.page_title = l("Acquisitions Administration"); + ctx.page_app = "egAcqAdmin"; +%] + +[% BLOCK APP_JS %] + + + +[% END %] + +
+ +[% END %] diff --git a/Open-ILS/src/templates/staff/admin/acq/t_splash.tt2 b/Open-ILS/src/templates/staff/admin/acq/t_splash.tt2 new file mode 100644 index 0000000000..47237954df --- /dev/null +++ b/Open-ILS/src/templates/staff/admin/acq/t_splash.tt2 @@ -0,0 +1,49 @@ + +
+
+ [% l('Acquisitions Administration') %] +
+
+ +
+ +[% + interfaces = [ + [ l('Currency Types'), "./admin/acq/currency_type/list" ] + ,[ l('Distribution Formulas'), "./admin/acq/conify/distribution_formula" ] + ,[ l('EDI Accounts'), "./admin/acq/conify/edi_account" ] + ,[ l('EDI Messages'), "./admin/acq/po/edi_messages" ] + ,[ l('Exchange Rates'), "./admin/acq/conify/exchange_rate" ] + ,[ l('Fund Tags'), "./admin/acq/conify/fund_tag" ] + ,[ l('Funding Sources'), "./admin/acq/funding_source/list" ] + ,[ l('Funds'), "./admin/acq/fund/list" ] + ,[ l('Providers'), "./admin/acq/conify/provider" ] + ,[ l('Claim Event Types'), "./admin/acq/conify/claim_event_type" ] + ,[ l('Claim Policies'), "./admin/acq/conify/claim_policy" ] + ,[ l('Claim Policy Actions'), "./admin/acq/conify/claim_policy_action" ] + ,[ l('Claim Types'), "./admin/acq/conify/claim_type" ] + ,[ l('Invoice Item Types'), "./admin/acq/conify/invoice_item_type" ] + ,[ l('Invoice Payment Method'), "./admin/acq/conify/invoice_payment_method" ] + ,[ l('Cancel Reasons'), "./admin/acq/conify/cancel_reason" ] + ,[ l('Line Item Alerts'), "./admin/acq/conify/lineitem_alert" ] + ,[ l('Line Item MARC Attribute Definitions'), "./admin/acq/conify/lineitem_marc_attr_def" ] + ]; + + USE table(interfaces, rows=9); +%] + +[% FOREACH row = table.rows %] +
+ [% FOREACH item = row %][% IF item.1 %] + + [% END %][% END %] +
+[% END %] + +
+ diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index 953f2d1146..262ceef559 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -369,6 +369,12 @@
  • + + + [% l('Acquisitions Administration') %] + +
  • +
  • [% l('Reports') %] diff --git a/Open-ILS/web/js/ui/default/staff/admin/acq/app.js b/Open-ILS/web/js/ui/default/staff/admin/acq/app.js new file mode 100644 index 0000000000..245725ec67 --- /dev/null +++ b/Open-ILS/web/js/ui/default/staff/admin/acq/app.js @@ -0,0 +1,60 @@ +angular.module('egAcqAdmin', + ['ngRoute', 'ui.bootstrap', 'egCoreMod','egUiMod']) + +.config(['$routeProvider','$locationProvider','$compileProvider', + function($routeProvider , $locationProvider , $compileProvider) { + + $locationProvider.html5Mode(true); + $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); + var resolver = {delay : function(egStartup) {return egStartup.go()}}; + + var eframe_template = + ''; + + $routeProvider.when('/admin/acq/:noun/:verb/:extra?', { + template: eframe_template, + controller: 'EmbedAcqCtl', + resolve : resolver + }); + + // default page + $routeProvider.otherwise({ + templateUrl : './admin/acq/t_splash', + resolve : resolver + }); +}]) + +.controller('EmbedAcqCtl', + ['$scope','$routeParams','$location','egCore', +function($scope , $routeParams , $location , egCore) { + + $scope.funcs = { + ses : egCore.auth.token(), + } + + var acq_path = '/eg/'; + + if ($routeParams.noun == 'conify') { + acq_path += 'conify/global/acq/' + $routeParams.verb + + (typeof $routeParams.extra != 'undefined' + ? '/' + $routeParams.extra + : '') + + location.search; + } else { + acq_path += 'acq/' + + $routeParams.noun + '/' + $routeParams.verb + + (typeof $routeParams.extra != 'undefined' + ? '/' + $routeParams.extra + : '') + + location.search; + } + + // embed URL must include protocol/domain or it will be loaded via + // push-state, resulting in an infinitely nested pages. + $scope.acq_admin_url = + $location.absUrl().replace(/\/eg\/staff.*/, acq_path); + + console.log('Loading Admin Acq URL: ' + $scope.acq_admin_url); + +}]) +