From 66e6a034bda46828d668da8f92b2d468c0de1ac7 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 15 May 2014 17:15:37 -0400 Subject: [PATCH] item status UI continued Signed-off-by: Bill Erickson --- Open-ILS/src/templates/staff/cat/item/index.tt2 | 6 +- .../src/templates/staff/cat/item/t_circs_pane.tt2 | 150 +++++++++++++++++++- .../templates/staff/cat/item/t_summary_pane.tt2 | 154 ++++++++++----------- Open-ILS/src/templates/staff/css/style.css.tt2 | 27 +++- Open-ILS/web/js/ui/default/staff/cat/item/app.js | 60 +++++--- 5 files changed, 290 insertions(+), 107 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/item/index.tt2 b/Open-ILS/src/templates/staff/cat/item/index.tt2 index aee8eaf2b3..9e1a5408de 100644 --- a/Open-ILS/src/templates/staff/cat/item/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/index.tt2 @@ -18,11 +18,13 @@ #item-status-form { padding-bottom: 10px; margin-bottom: 10px; - border-bottom: 1px solid #CCC; + /*border-bottom: 1px solid #CCC; */ } -

[% l('Scan Item') %]

+

[% l('Item Status Display') %]

+ +

[% l('Scan Item') %]

diff --git a/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 index f4cbcacaca..c61397bb01 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 @@ -1 +1,149 @@ -

summary

+
+ +
+
+ [% l('Previous Circ Group') %] +
+
+ [% l('Most Recent Circ Group') %] +
+
+ + + +
+
[% l('Total Circs') %]
+
+ {{prev_circ_summary.num_circs()}} +
+
[% l('Total Circs') %]
+
+ {{circ_summary.num_circs()}} +
+
+ +
+
[% l('Checkout Date') %]
+
+ {{prev_circ_summary.start_time() | date:'short'}} +
+
[% l('Checkout Date') %]
+
+ {{circ.xact_start() | date:'short'}} +
+
+ +
+
[% l('Checkout Workstation') %]
+
+ {{prev_circ_summary.checkout_workstation()}} +
+
[% l('Checkout Workstation') %]
+
+ {{circ.workstation().name()}} +
+
+ +
+
[% l('Last Renewed On') %]
+
+ {{prev_circ_summary.last_renewal_time() | date:'short'}} +
+
[% l('Last Renewed On') %]
+
+ {{circ_summary.last_renewal_time() | date:'short'}} +
+
+ +
+
[% l('Renewal Workstation') %]
+
+ {{prev_circ_summary.last_renewal_workstation()}} +
+
[% l('Renewal Workstation') %]
+
+ {{circ_summary.last_renewal_workstation()}} +
+
+ +
+
[% l('Stop Fines Reason') %]
+
+ {{prev_circ_summary.last_stop_fines()}} +
+
[% l('Stop Fines Reason') %]
+
+ {{circ.stop_fines()}} +
+
+ +
+
[% l('Stop Fines Time') %]
+
+ {{prev_circ_summary.last_stop_fines_time() | date:'short'}} +
+
[% l('Stop Fines Time') %]
+
+ {{circ.stop_fines_time() | date:'short'}} +
+
+ +
+
[% l('Checkin Time') %]
+
+ {{prev_circ_summary.last_checkin_time() | date:'short'}} +
+
[% l('Checkin Time') %]
+
+ {{circ.checkin_time() | date:'short'}} +
+
+ +
+
[% l('Checkin Scan Time') %]
+
+ {{prev_circ_summary.last_checkin_scan_time() | date:'short'}} +
+
[% l('Checkin Scan Time') %]
+
+ {{circ.checkin_scan_time() | date:'short'}} +
+
+ +
+
[% l('Checkin Workstation') %]
+
+ {{prev_circ_summary.last_checkin_workstation()}} +
+
[% l('Checkin Workstation') %]
+
+ {{circ.checkin_workstation.name()}} +
+
+ + +
+ diff --git a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 index 1a6119be08..c16e1914ab 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 @@ -1,140 +1,140 @@ -
+
-
[% l('Barcode') %]
-
{{copy.barcode()}}
+
[% l('Barcode') %]
+
{{copy.barcode()}}
-
[% l('Circ Library') %]
-
{{copy.circ_lib().shortname()}}
+
[% l('Circ Library') %]
+
{{copy.circ_lib().shortname()}}
-
[% l('Item Call #') %]
-
{{copy.call_number().label()}}
+
[% l('Item Call #') %]
+
{{copy.call_number().label()}}
-
[% l('Status') %]
-
{{copy.status().name()}}
+
[% l('Status') %]
+
{{copy.status().name()}}
-
[% l('Price') %]
-
{{copy.price()}}
+
[% l('Price') %]
+
{{copy.price()}}
-
[% l('Owning Library') %]
-
{{copy.circ_lib().shortname()}}
+
[% l('Owning Library') %]
+
{{copy.circ_lib().shortname()}}
-
[% l('Renewal Type') %]
-
+
[% l('Renewal Type') %]
+
[% l('OPAC') %]
[% l('Desk') %]
[% l('Phone') %]
-
[% l('Due Date') %]
-
{{circ.due_date() | date:'short'}}
+
[% l('Due Date') %]
+
{{circ.due_date() | date:'short'}}
-
[% l('ISBN') %]
-
+
[% l('ISBN') %]
+
{{copy.call_number().record().simple_record().isbn()}}
-
[% l('Copy Location') %]
-
{{copy.location().name()}}
+
[% l('Copy Location') %]
+
{{copy.location().name()}}
-
[% l('Total Circs') %]
-
{{total_circs}}
+
[% l('Total Circs') %]
+
{{total_circs}}
-
[% l('Checkout Date') %]
-
{{circ.xact_start() | date:'short'}}
+
[% l('Checkout Date') %]
+
{{circ.xact_start() | date:'short'}}
-
[% l('Date Created') %]
-
{{copy.create_date() | date:'short'}}
+
[% l('Date Created') %]
+
{{copy.create_date() | date:'short'}}
-
[% l('Loan Duration') %]
-
{{circ.duration()}}
+
[% l('Loan Duration') %]
+
{{circ.duration()}}
-
[% l('Total Circs - Current Year') %]
-
{{total_circs_this_year}}
+
[% l('Total Circs - Current Year') %]
+
{{total_circs_this_year}}
-
[% l('Checkout Workstation') %]
-
{{circ.workstation().name()}}
+
[% l('Checkout Workstation') %]
+
{{circ.workstation().name()}}
-
[% l('Date Active') %]
-
{{copy.active_date() | date:'short'}}
+
[% l('Date Active') %]
+
{{copy.active_date() | date:'short'}}
-
[% l('Fine Level') %]
-
{{circ.duration_rule().name()}}
+
[% l('Fine Level') %]
+
{{circ.duration_rule().name()}}
-
[% l('Total Circs - Prev Year') %]
-
{{total_circs_prev_year}}
+
[% l('Total Circs - Prev Year') %]
+
{{total_circs_prev_year}}
-
[% l('Duration Rule') %]
-
{{circ.duration_rule().name()}}
+
[% l('Duration Rule') %]
+
{{circ.duration_rule().name()}}
-
[% l('Status Changed') %]
-
{{copy.status_changed_time() | date:'short'}}
+
[% l('Status Changed') %]
+
{{copy.status_changed_time() | date:'short'}}
-
[% l('Reference') %]
-
{{copy.ref()}}
+
[% l('Reference') %]
+
{{copy.ref()}}
-
[% l('Renewal Workstation') %]
-
{{circ_summary.last_renewal_workstation()}}
+
[% l('Renewal Workstation') %]
+
{{circ_summary.last_renewal_workstation()}}
-
[% l('Recurring Fine Rule') %]
-
{{circ.recurring_fine_rule().name()}}
+
[% l('Recurring Fine Rule') %]
+
{{circ.recurring_fine_rule().name()}}
-
[% l('Copy ID') %]
-
{{copy.id()}}
+
[% l('Copy ID') %]
+
{{copy.id()}}
-
[% l('OPAC Visible') %]
-
{{copy.opac_visible()}}
+
[% l('OPAC Visible') %]
+
{{copy.opac_visible()}}
-
[% l('Remaining Renewals') %]
-
{{circ.renewal_remaining()}}
+
[% l('Remaining Renewals') %]
+
{{circ.renewal_remaining()}}
-
[% l('Max Fine Rule') %]
-
{{circ.max_fine_rule().name()}}
+
[% l('Max Fine Rule') %]
+
{{circ.max_fine_rule().name()}}
-
[% l('TCN') %]
-
{{copy.call_number().record().tcn_value()}}
+
[% l('TCN') %]
+
{{copy.call_number().record().tcn_value()}}
-
[% l('Holdable') %]
-
{{copy.opac_visible()}}
+
[% l('Holdable') %]
+
{{copy.opac_visible()}}
-
+
-
[% l('Checkin Time') %]
-
+
[% l('Checkin Time') %]
+
{{circ.checkin_time() || circ_summary.last_checkin_time() | date:'short'}}
-
[% l('Floating') %]
-
{{copy.floating()}}
+
[% l('Floating') %]
+
{{copy.floating()}}
-
[% l('Circulate') %]
-
{{copy.circulate()}}
+
[% l('Circulate') %]
+
{{copy.circulate()}}
-
+
-
[% l('Checkin Scan Time') %]
-
+
[% l('Checkin Scan Time') %]
+
{{circ.checkin_scan_time() || circ_summary.last_checkin_scan_time() | date:'short'}}
@@ -142,18 +142,18 @@
-
+
-
[% l('Circ Modifier') %]
-
{{copy.circ_modifier().name()}}
+
[% l('Circ Modifier') %]
+
{{copy.circ_modifier().name()}}
-
+
-
[% l('Checkin Workstation') %]
-
+
[% l('Checkin Workstation') %]
+
{{circ.checkin_workstation().name() || circ_summary.last_checkin_workstation().name()}}
diff --git a/Open-ILS/src/templates/staff/css/style.css.tt2 b/Open-ILS/src/templates/staff/css/style.css.tt2 index efa50f690e..c4f1b7cec1 100644 --- a/Open-ILS/src/templates/staff/css/style.css.tt2 +++ b/Open-ILS/src/templates/staff/css/style.css.tt2 @@ -115,7 +115,12 @@ table.list tr.selected td { /* used for th-like things in grids */ .header-label { - font-weight: bold; + font-weight: bold; +} + +.header-label-big { + font-weight: bold; + font-size: 120%; } /* ---------------------------------------------------------------------- @@ -298,17 +303,29 @@ table.list tr.selected td { /* simple flex container for consistent-width cell-based structures */ -.flex-container-striped > div.flex-row:nth-child(odd) { - background-color: rgb(248, 248, 248); +.flex-container-striped > .flex-row:nth-child(odd) { + background-color: #f5f5f5; } .flex-container-bordered .flex-cell { - border: 1px solid rgb(224, 224, 224); + border-bottom: 1px solid #ddd; +} +.flex-row { + display: flex; } -.flex-row {display: flex} .flex-cell { flex: 1; padding: 5px; } + +/* present cells in small rounded wells */ +.flex-cell-well { + border-radius: 4px; + border: 1px solid #ddd; + background-color: #f5f5f5; + /* wells looks better with a little space between them */ + margin-bottom: 4px; +} + .flex-2 { flex: 2; } diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 1fcdf169bd..065215848d 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -183,40 +183,60 @@ function($scope , $location , $routeParams , egCore , itemSvc) { }); } - function loadCurrentCirc() { + // if loadPrev load the two most recent circulations + function loadCurrentCirc(loadPrev) { delete $scope.circ; delete $scope.circ_summary; + delete $scope.prev_circ_summary; egCore.pcrud.search('circ', {target_copy : copyId}, - { flesh : 1, + { flesh : 2, flesh_fields : { circ : [ + 'usr', 'workstation', 'checkin_workstation', 'duration_rule', 'max_fine_rule', 'recurring_fine_rule' - ] + ], + au : ['card'] }, order_by : {circ : 'xact_start desc'}, - limit : 1 + limit : 1 } ).then(function(circ) { - if (circ) { - - // load the circ chain summary for the current circ - $scope.circ = circ; - - egCore.net.request( - 'open-ils.circ', - 'open-ils.circ.renewal_chain.retrieve_by_circ.summary', - egCore.auth.token(), circ.id() - ).then(function(summary) { - $scope.circ_summary = summary; - }); - } + if (!circ) return; + + $scope.circ = circ; + + // load the chain for this circ + egCore.net.request( + 'open-ils.circ', + 'open-ils.circ.renewal_chain.retrieve_by_circ.summary', + egCore.auth.token(), $scope.circ.id() + ).then(function(summary) { + $scope.circ_summary = summary.summary; + }); + + if (!loadPrev) return; + + // load the chain for the previous circ, plus the user + egCore.net.request( + 'open-ils.circ', + 'open-ils.circ.prev_renewal_chain.retrieve_by_circ.summary', + egCore.auth.token(), $scope.circ.id() + ).then(function(summary) { + $scope.prev_circ_summary = summary.summary; + return summary.usr; + }).then(function(user_id) { + return egCore.pcrud.retrieve('au', user_id, + {flesh : 1, flesh_fields : {au : ['card']}}); + }).then(function(user) { + $scope.prev_circ_usr = user; + }); }); } @@ -254,9 +274,6 @@ function($scope , $location , $routeParams , egCore , itemSvc) { }); } - function loadPrevCirc() { - } - // we don't need all data on all tabs, so fetch what's needed when needed. function loadTabData() { @@ -267,8 +284,7 @@ function($scope , $location , $routeParams , egCore , itemSvc) { break; case 'circs': - loadCurrentCirc(); - loadPrevCirc(); + loadCurrentCirc(true); break; } } -- 2.11.0