From 3365dc4e3c0be9eaa7bcd6ee310bdc09079f5c21 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 11 Mar 2010 18:59:10 +0000 Subject: [PATCH] trim the default display fields in the user req ui. format the title as a link to load the request detail page, added some todo comments git-svn-id: svn://svn.open-ils.org/ILS/trunk@15802 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../web/js/ui/default/acq/picklist/user_request.js | 35 ++++++++++++++++++++++ .../default/acq/picklist/user_request.tt2 | 10 ++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/acq/picklist/user_request.js b/Open-ILS/web/js/ui/default/acq/picklist/user_request.js index 8508316f48..052e42bac7 100644 --- a/Open-ILS/web/js/ui/default/acq/picklist/user_request.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/user_request.js @@ -7,6 +7,41 @@ dojo.require('openils.widget.OrgUnitFilteringSelect'); var contextOrg; function setup() { + + if(reqId) { + drawRequest(); + } else { + drawList(); + } +} + +function drawRequest() { + // hide the grid and the context selector + // draw a detail page for a particular request + // including ability to add request to a picklist + // and to "reject" it (aka apply a cancel reason) +} + + +// format the title data as id:title +function getTitle(idx, item) { + if(item) { + return this.grid.store.getValue(item, 'id') + ':' + + this.grid.store.getValue(item, 'title'); + } + return '' +} + +// turn id:title into a url +function formatTitle(value) { + if(value) { + var parts = value.split(/:/); + return '' + parts[1] + ''; + } +} + +function drawList() { buildGrid(); var connect = function() { diff --git a/Open-ILS/web/templates/default/acq/picklist/user_request.tt2 b/Open-ILS/web/templates/default/acq/picklist/user_request.tt2 index 12126eb820..6fe8cbe378 100644 --- a/Open-ILS/web/templates/default/acq/picklist/user_request.tt2 +++ b/Open-ILS/web/templates/default/acq/picklist/user_request.tt2 @@ -1,11 +1,13 @@ [% WRAPPER 'default/base.tt2' %] [% ctx.page_title = 'Patron Requests' %] +
[% ctx.page_title %]
+
@@ -20,7 +22,8 @@ + + + +
+
[% END %] -- 2.11.0