webstaff: skeleton of the serials management page app
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 13 Apr 2017 19:36:32 +0000 (15:36 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 30 May 2017 16:06:35 +0000 (12:06 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/serials/manage/index.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/serials/manage/t_manage.tt2 [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/serials/manage/app.js [new file with mode: 0644]

diff --git a/Open-ILS/src/templates/staff/serials/manage/index.tt2 b/Open-ILS/src/templates/staff/serials/manage/index.tt2
new file mode 100644 (file)
index 0000000..1b36a48
--- /dev/null
@@ -0,0 +1,17 @@
+[%
+  WRAPPER "staff/base.tt2";
+  ctx.page_title = l("Serials Management"); 
+  ctx.page_app = "egSerialsApp";
+%]
+
+[% BLOCK APP_JS %]
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/grid.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/serials/manage/app.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/cat/services/record.js"></script>
+
+[% END %]
+
+<div ng-view></div>
+
+[% END %]
+
diff --git a/Open-ILS/src/templates/staff/serials/manage/t_manage.tt2 b/Open-ILS/src/templates/staff/serials/manage/t_manage.tt2
new file mode 100644 (file)
index 0000000..a85c64b
--- /dev/null
@@ -0,0 +1,27 @@
+<div ng-show="bib_id" class="row col-md-12">
+  <eg-record-summary record-id="bib_id" no-marc-link="true" record="summary_record"></eg-record-summary>
+</div>
+
+<div class="row col-md-12 pad-vert">
+  <div class="col-md-12">
+    <uib-tabset active="active_tab"> 
+      <!-- note that non-numeric index values must be enclosed in single-quotes,
+           otherwise selecting the active table won't work cleanly -->
+      <uib-tab index="'create-subscription'" heading="[% l('Create Subscription') %]">
+        <p>Create Subscription TODO</p>
+      </uib-tab>
+      <uib-tab index="'frequency'" heading="[% l('Frequency') %]">
+        <p>Frequency TODO</p>
+      </uib-tab>
+      <uib-tab index="'view-issues'" heading="[% l('View Issues') %]">
+        <p>View Issues TODO</p>
+      </uib-tab>
+      <uib-tab index="'receive-issues'" heading="[% l('Receive Issues') %]">
+        <p>Receive TODO</p>
+      </uib-tab>
+      <uib-tab index="'bindery'" heading="[% l('Bindery') %]">
+        <p>Bindery TODO</p>
+      </uib-tab>
+    </uib-tabset>
+  </div>
+</div>
diff --git a/Open-ILS/web/js/ui/default/staff/serials/manage/app.js b/Open-ILS/web/js/ui/default/staff/serials/manage/app.js
new file mode 100644 (file)
index 0000000..72fc8d7
--- /dev/null
@@ -0,0 +1,35 @@
+angular.module('egSerialsApp', ['ui.bootstrap','ngRoute','egCoreMod','egGridMod','ngToast'])
+
+.config(['ngToastProvider', function(ngToastProvider) {
+  ngToastProvider.configure({
+    verticalPosition: 'bottom',
+    animation: 'fade'
+  });
+}])
+
+.config(function($routeProvider, $locationProvider, $compileProvider) {
+    $locationProvider.html5Mode(true);
+    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|blob):/); // grid export
+
+    var resolver = {delay : function(egStartup) {return egStartup.go()}};
+
+    $routeProvider.when('/serials/manage/:bib_id', {
+        templateUrl: './serials/manage/t_manage',
+        controller: 'ManageCtrl',
+        resolve : resolver
+    });
+
+    $routeProvider.when('/serials/manage/:bib_id/:active_tab', {
+        templateUrl: './serials/manage/t_manage',
+        controller: 'ManageCtrl',
+        resolve : resolver
+    });
+})
+
+.controller('ManageCtrl',
+       ['$scope','$routeParams','$location','$window','$q',
+function($scope , $routeParams , $location , $window , $q
+) {
+    $scope.bib_id = $routeParams.bib_id;
+    $scope.active_tab = $routeParams.active_tab ?  $routeParams.active_tab : 'create-subscription';
+}])